This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo -n 'Spinning down unused ATA drives:' | |
/usr/bin/lsscsi | /bin/grep -w -F ATA | /bin/cut -c54- \ | |
| while read dev ; do | |
if /bin/mount | /bin/grep -q -E "^$dev[^/]* " ; then continue ; fi | |
echo -n " $dev," | |
/sbin/hdparm -q -Y "$dev" | |
done | |
echo ' done.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.012; | |
use warnings; | |
use Benchmark 'cmpthese'; | |
use lib 'lib'; | |
use Plack::Util (); | |
BEGIN { *header_iter = \&Plack::Util::header_iter } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is actually a collage of bits from various config files | |
LoadModule dav_module lib/httpd/modules/mod_dav.so | |
LoadModule dav_fs_module lib/httpd/modules/mod_dav_fs.so | |
DavLockDB "/var/db/httpd/davlock" | |
# the following BrowserMatch lines were part of the sample config from the Slackware Apache package | |
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully | |
BrowserMatch "MS FrontPage" redirect-carefully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --pretty='format:%x1B[33m%H%Creset%n%Cgreen%ar%Creset %an <%ae>%n%x20 %x20 %x1B[1m%s%Creset%n' | |
git config --global format.pretty 'format:%x1B[33m%H%Creset%n%Cgreen%ar%Creset %an <%ae>%n%x20 %x20 %x1B[1m%s%Creset%n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
.bookmark-item[container="true"][label="★"] { | |
list-style-image: url('chrome://browser/skin/places/unsortedBookmarks.png') !important; | |
-moz-image-region: rect(0px 16px 16px 0px) !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* the network your computer is on, and the subnet mask of that network */ | |
var local_network = '192.168.1.0'; | |
var local_netmask = '255.255.255.0'; | |
/* the host and port of your regular proxy, if any; otherwise an empty string */ | |
var upstreamProxy = ''; | |
/* space-separated list of hosts or domains that should always be connected to directly without using a proxy */ | |
var directZones = 'plasmasturm.org delicious.com paulgraham.com yahoo.com'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TITLE="$1" | |
shift | |
printf '\e]0;%s\007' "$TITLE" | |
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# polyglot Makefile (embedding a Perl script) | |
output.txt: input.txt Makefile | |
perl -x Makefile $< > $@ | |
#!/usr/bin/perl | |
q-ignore: | |
-; | |
use strict; | |
# rest of Perl script; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/share/texmf/bin/dvipdft 2007-06-28 04:50:14.000000000 +0200 | |
+++ dvipdft 2009-04-13 06:13:05.000000000 +0200 | |
@@ -31,7 +31,14 @@ | |
$progname --help | |
$progname --version" | |
-tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX` | |
+# before we create the tmpdir, set trap for cleanup | |
+trap 'rm -rf $tmpdir ; exit 1' 1 2 3 7 13 15 | |
+trap 'rm -rf $tmpdir' 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s![^\x00-\xff]!\= '&#' . char2nr(submatch(0)) . ';' !g |
OlderNewer