Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use 5.010;
use warnings;
use strict;
# Important: This script will ONLY print the image links if both the thumbnail
# and original image are found.
" version 1.0... works fine, been using it for the last 4 years
map <leader>z oLogger::log(print_r($<Esc>mta, 1), "/tmp/tmpfs/mikey-log");<Esc>`ta
" version 2.0..not so much...
map <leader>z :call InsertLoggerStatement(b:current_syntax)<Cr>
function InsertLoggerStatement (syn)
if a:syn == "php"
normal oLogger::log(print_r($
normal <Esc>
/usr/bin/perl -e 'unless ( $] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$_ $_\n" }}' > auto/if_perl.c
/usr/bin/perl /usr/share/perl/5.10/ExtUtils/xsubpp -prototypes -typemap \
/usr/share/perl/5.10/ExtUtils/typemap if_perl.xs >> auto/if_perl.c
Undefined subroutine &ExtUtils::ParseXS::errors called at /usr/share/perl/5.10/ExtUtils/xsubpp line 41.
make[1]: *** [auto/if_perl.c] Error 255
make[1]: Leaving directory `/tmp/tmpfs/sjohnson/vim74/src'
make: *** [first] Error 2
sjohnson@web1:/tmp/sjohnson/findex$ find . \( -type d -a -name bork \) -o -print
.
./foo
./foo/bar
./foo/baz
./foo/blarg
./foo/blarg/bork
./bork/bar
./bork/foo
sjohnson@web1:/tmp/sjohnson/findex$ find . -print
# y u no work
sjohnson@web1:~/http$ find . -xdev -a \( -path ./template_c -a -prune \) -o \( -type f -a \( -iname "*.php" -o -iname "*.pl" -o -iname "*.tpl" \) -a print \) > job2.txt
find: paths must precede expression: print
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
sjohnson@web1:/tmp/sjohnson/blah$ rar x stuff.rar ; echo "errorlevel: $?"
RAR 5.00 beta 8 Copyright (c) 1993-2013 Alexander Roshal 22 Aug 2013
Trial version Type RAR -? for help
Extracting from stuff.rar
Extracting bad.txt OK
Extracting text.txt 69%
sjohnson@web1:/tmp/sjohnson$ insert
^C
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 8, in <module>
sjohnson@web1:/tmp/sjohnson$ import CommandNotFound
File "/usr/lib/python2.6/dist-packages/CommandNotFound/__init__.py", line 1, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python2.6/dist-packages/CommandNotFound/CommandNotFound.py", line 5, in <module>
from util import gettext_wrapper as _
File "/usr/lib/python2.6/dist-packages/CommandNotFound/util.py", line 5, in <module>
sjohnson@web1:~/http$ animal() { echo pig ; }
sjohnson@web1:~/http$ animal
pig
sjohnson@web1:~/http$ type animal
animal is a function
animal ()
{
echo pig
}
sjohnson@web1:~/http$ unset animal
11:59:01 weechat | Key:
11:59:01 weechat | ctrl-P => /complete_word
11:59:04 weechat |
11:59:04 weechat | Key:
11:59:04 weechat | ctrl-N => /complete_word reverse
00 | ############################## | 3.4%
01 | ################################### | 4.0%
02 | ######################### | 2.9%
03 | ######################### | 2.9%
04 | ###################################### | 4.3%
05 | ############################################ | 5.0%
06 | ############################### | 3.5%
07 | ############################################ | 4.9%
08 | #################################################### | 5.9%
09 | ################################################# | 5.5%