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
# Use this screen configuration with: | |
# screen -O -d -R build-hosts -c ~/.screenrc-build-hosts | |
startup_message off | |
chdir | |
autodetach on | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]' | |
screen -t shell0 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
use strict; | |
use Config; | |
my $home = ( getpwuid $< )[7]; | |
my $cpan = "$home/.cpan"; | |
# The .packlist and perllocal.pod files aren't useful, so remove them along | |
# with any directories left empty along the way. | |
#END { | |
# use File::Find; | |
# |
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
package MyCGI; | |
use base 'CGI'; | |
use strict; | |
our $ShowAll = 0; # set via $MyCGI::ShowAll | |
sub a { | |
my ( $self, @param ) = @_; |
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 strict; | |
use Getopt::Long qw< :config auto_version bundling no_ignore_case >; | |
use Pod::Usage; | |
my %Opt = ( # could use %ARGV if so inclined | |
'dry-run' => 0, | |
'verbose' => 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
my $log_regex = qr{ | |
^ (?<revision> \d (?: [.]\d )+ ) \n | |
^ log \n | |
^ [@]r\d+ \s+ (?<user> \w+ ) \s+ [|] \s+ | |
(?<year> \d\d\d\d)- | |
(?<month> \d\d)- | |
(?<day> \d\d)T | |
(?<hour> \d\d): | |
(?<minute> \d\d): | |
(?<second> \d\d) |
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
my $dbh = DBI->connect( $dsn, | |
$Opt{'user'} // '', | |
$Opt{'password'} // '', | |
{ AutoCommit => 1, | |
PrintError => 0, | |
RaiseError => 0, | |
HandleError => sub { warn shift }, | |
Callbacks => { | |
ChildCallbacks => { | |
execute => sub { |
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 | |
# | |
# Bookmarks for filesystem paths. For example, | |
# > go add logs /var/log | |
# > go logs | |
# > pwd | |
# /var/log | |
go () { | |
if [[ $# -eq 0 ]]; then |
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
my %value_for = ( | |
field1 => 'value1', | |
field2 => 'value2', | |
field3 => 'value3', | |
# ... | |
); | |
my $sth = $dbh->prepare(<<"SQL"); | |
INSERT INTO table (@{[ join ',', keys %value_for ]}) | |
VALUES (@{[ join ',', ('?') x scalar keys %value_for ]}) |
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
# vim: ft=muttrc | |
# These were taken from Fedora's configuration. | |
#color normal white default | |
color hdrdefault red default | |
color quoted brightblue default | |
color signature red default | |
color indicator brightyellow red | |
color error brightred default |
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 | |
# Generate a relatively secure password. | |
apg -n 10 -m 8 -x 8 -t -a0 -MNCl | |
perl -Mutf8 -MConvert::Braille -e 'print brailleUnicodeToAscii("⠚⠥⠎⠞ ⠁⠝⠕⠞⠓⠑⠗ ⠷⠃⠇⠊⠝⠙⠾ ⠏⠑⠗⠇ ⠓⠁⠉⠅⠑⠗")' | |
# Convert a 16:9 720p .mkv file to a 4:3 .avi file. | |
mencoder $file1.mkv -oac mp3lame -ovc xvid -xvidencopts pass=1 \ | |
-vf scale=720:352 -o $file2.avi |
OlderNewer