How-To: Replace a MKIV ALH Diesel Injection Pump without Changing the Timing Belt
July 27th, 2016This "How-To" can be applied to the exchange or replacement of either the 10‑mm or 11‑mm injection pump on an ALH engine, though the instructions will be slanted toward a manual transmission TDI.
Performance tuning 3ware 9000 Series Cards
July 27th, 2016Good article on performance tuning the 3ware 9000 series cards.
How to recursively process files through directories
July 27th, 2016use File::Find;
sub eachFile {
my $filename = $_;
my $fullpath = $File::Find::name;
#remember that File::Find changes your CWD,
#so you can call open with just $_
if (-e $filename) { print "$filename exists!\n"; }
}
find (\&eachFile, "mydir/");How to pass X11 display rights to "su"
July 27th, 20161. Log in to the system, issue the following commands and save their output for further reference
echo "$DISPLAY" xauth listYou will see something similar to this:
% echo $DISPLAY localhost:10.0
% xauth list
ubuntu/unix:12 MIT-MAGIC-COOKIE-1 9e7f2b822e5c1cdd96d048adfb870519
ubuntu/unix:11 MIT-MAGIC-COOKIE-1 1eaf535afee8b2de2f0ab9bcab7ef149
ubuntu/unix:10 MIT-MAGIC-COOKIE-1 3bd9602df5fe354c19e39f211ee4668b
Note the value after the semicolon in the DISPLAY value (10 in this case, in red), note that the last entry is the cookie you're interested in (also in red).
2. Switch the user (su ...), and run the following commands:
% su -
Password:
~# export DISPLAY=localhost:10.0 # this is the previously saved DISPLAY value
~# xauth add ubuntu/unix:10 MIT-MAGIC-COOKIE-1 3bd9602df5fe354c19e39f211ee4668b # this is the last entry from xauth list output
After this your X session should work.
Add a prefix string to beginning of each line
July 27th, 2016Various ways to add a prefix to every line in a file.
