This file contains hidden or 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 | |
YEAR0="2008"; YEAR1="2010"; STOCK="IBM"; wget -qO- "http://ichart.finance.yahoo.com/table.csv?s=$STOCK&a=00&b=1&c=$YEAR0&d=11&e=31&f=$YEAR1&g=d" \ | |
| cut -d, -f1,7 \ | |
| sort -n \ | |
| grep -v Date \ | |
| gnuplot -p -e \ | |
"set datafile separator ','; | |
set xdata time; set timefmt '%Y-%m-%d'; | |
set format x \"%b %d\\n%Y\"; | |
plot '-' using 1:2 with lines title '$STOCK'" |
This file contains hidden or 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 | |
mkdir ~/build | |
cd ~/build | |
wget "http://prdownloads.sourceforge.net/wine/wine-1.3.9.tar.bz2" | |
tar -xvf "wine-1.3.9.tar.bz2" | |
cd wine-1.3.9 | |
# http://bugs.winehq.org/show_bug.cgi?id=16822#attach_32614 | |
wget -O ME_mouse_id_32614.patch http://bugs2.winehq.org/attachment.cgi?id=32614 |
This file contains hidden or 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 | |
# reqs: wmctrl, zenity | |
wmctrl -l \ | |
| sed 's/\([^ ]\+\) \+\([^ ]\+\) \+\([^ ]\+\) \+\(.*\)$/\1:\4/' \ | |
| grep -v "^0x[0-9a-f]\+:$" \ | |
| sed 's/\(0x[0-9a-f]\+\):\(.\+\)/\1\n\2/' \ | |
| zenity --list --title "Windows" --text "Window list" --column="ID" \ | |
--column "Window" --hide-column=1 \ | |
| xargs wmctrl -i -a |
This file contains hidden or 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 | |
if($data_pos < @data) { | |
# data on line | |
$self->window()->addstr($data[$data_pos]); | |
} else { | |
# tilde on line | |
$self->window()->addstr("~"); | |
} | |
# or this |
This file contains hidden or 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 diacritic for underlining | |
perl -CS -ple 's/./$&\x{332}/g' |
This file contains hidden or 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 | |
BOLD_FONT="Lucida Sans:size=6:bold" | |
NORM_FONT="Lucida Sans:size=6:normal" | |
if [ "$1" = "format-color" ]; then | |
sed 's,\[3\([0-9]\)\(;1\)\?m,${color\1},g' \ | |
| sed 's,\[2m,${font '"$BOLD_FONT"'},g' \ | |
| sed 's,\[0m,${color}${font '"$NORM_FONT"'},g' \ | |
| sed 's/^\(\*\) \([A-Z0-9]\+\)/${color8}\1${color} ${font '"$BOLD_FONT"'}${color4}\2${color}${font '"$NORM_FONT"'}/g' | |
exit | |
elif [ "$1" = "format" ]; then |
This file contains hidden or 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/perl | |
# Requires: figlet | |
use Time::HiRes qw/sleep/; | |
while(<>) { | |
@F = split; | |
for my $word (@F) { | |
print "\n" x 5; | |
system "figlet", "-tcWf", "big", "$word"; | |
sleep(0.1 + 0.2*(length $word)/3); |
This file contains hidden or 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/perl -CS | |
%lookup = ( a => "\x{1d00}", b => "\x{299}", c => "\x{1d04}", d => "\x{1d05}", | |
e => "\x{1d07}", f => "\x{493}", g => "\x{262}", h => "\x{29c}", | |
i => "\x{26a}", j => "\x{1d0a}", k => "\x{1d0b}", l => "\x{29f}", | |
m => "\x{1d0d}", n => "\x{274}", o => "\x{1d0f}", p => "\x{1d18}", | |
q => "\x{1eb}", r => "\x{280}", s => "s", t => "\x{1d1b}", | |
u => "\x{1d1c}", v => "\x{1d20}", w => "\x{1d21}", x => "x", | |
y => "\x{28f}", z => "\x{1d22}",); | |
while(<>) { s,[a-z],$lookup{$&} // $&,ge; print; } |
This file contains hidden or 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/perl | |
use strict; | |
no warnings;# "recursion"; | |
use WWW::Scripter; | |
use YAML qw/LoadFile/; | |
use File::HomeDir; | |
use File::Spec; | |
use HTML::TreeBuilder::XPath; |
This file contains hidden or 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/perl | |
# Requires: figlet | |
use Time::HiRes qw/sleep/; | |
use IO::File; | |
use Lingua::Sentence; | |
my $opt_s = 0; | |
my $opt_w = 1; | |
my $opt_q = 0; | |
while(@ARGV && $ARGV[0] =~ /^-[wsq]$/) { |
OlderNewer