Skip to content

Instantly share code, notes, and snippets.

# aarobc's /etc/inputrc
# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.
# Be 8 bit clean.
set input-meta on
set output-meta on
#!/usr/bin/perl
use strict;
use warnings;
use v5.10.0;
use Sjohnson::Database qw(getTBMDSN);
use Sjohnson::Shortcuts qw(slurp);
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
use Data::Dumper;
# ---
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
use Data::Dumper;
my @stuff = ( { a => 1, b => 2} );
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
# Notice that the values are all equal for some of the keys
my @stuff = (
{ a => "1", b => "2", c => '4'},
use Term::ANSIColor qw(:constants);
use 5.010;
while (<STDIN>) {
my @words = split(' ');
foreach my $word (@words) {
s/c/k/;
s/ti/sj/;
s/ity$/itet/;
Test Summary Report
-------------------
t/gif.t (Wstat: 0 Tests: 1 Failed: 1)
Failed test: 1
Parse errors: Bad plan. You planned 0 tests but ran 1.
t/png.t (Wstat: 0 Tests: 2 Failed: 1)
Failed test: 2
Files=3, Tests=5, 0 wallclock secs ( 0.03 usr + 0.05 sys = 0.08 CPU)
Result: FAIL
Failed 2/3 test programs. 2/5 subtests failed.
sjohnson@web1:~/bin$ url_deparse
feature enabled: decryption
feature enabled: colour plaintext
http://smu/bogus/?q=h.cart.ecart&t=3&dm=2&a=view&g=supp,grp,&l[supp]=TBM&l[grp]=E&supp=TBM&grp=E&boid=330519&u=102246
parse_url results:
Array
(
func! FixShiftGlobal()
if getcmdtype() == ":"
let gcp = getcmdpos()-1
let head = strpart(getcmdline(), 0, gcp)
if head ==# "G" || head ==# "'<,'>G" || head =~# '^\.,\.+\d\+G$'
return "\<BS>g/"
endif
endif
return '/'
endfunc
# new and improved!
#
# N.B.: how I felt about legacy tar syntax: http://i.imgur.com/fsZI0.jpg
tar () {
local main_arg="$1"
if [ "${main_arg:0:1}" != "-" ] ; then
main_arg="-$main_arg"
fi