Scripts to look up program documentation.
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 | |
sudo apt-get install gir1.2-clutter-1.0 gir1.2-champlain-0.12 --no-install-recommend | |
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 | |
#DISPLAY=:0 | |
SIZE="1024x700" | |
SCREEN_HEIGHT=`xrandr -q | grep '*' | head -1 | grep -o 'x[0-9]\+' | grep -o '[0-9]\+'` | |
if [ "$SCREEN_HEIGHT" = "1024" ]; then | |
SIZE="1280x1000" | |
fi | |
Xephyr -screen "$SIZE" :1 & | |
sleep 3 |
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
function v = colonop(a,d,b) | |
% COLONOP Demonstrate how the built-in a:d:b is constructed. | |
% | |
% v = colonop(a,b) constructs v = a:1:b. | |
% v = colonop(a,d,b) constructs v = a:d:b. | |
% | |
% v = a:d:b is not constructed using repeated addition. If the | |
% textual representation of d in the source code cannot be | |
% exactly represented in binary floating point, then repeated | |
% addition will appear to have accumlated roundoff error. In |
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 bash | |
usage() { cat <<- DOCUMENT | |
$PROGNAME [-h] [-t] [-k key] [-l login] [server] | |
Utility for automatically exporting ssh keys into remote servers for authentication. | |
Checks $HOME/.ssh for id_rsa.pub or id_dsa.pub and appends them into | |
the authorized_keys of remote host | |
AUTHOR: Sang Han |

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
Iteration is a pesky thing...it makes your algorithms slow. So what if I could | |
calculate factorials without iteration? | |
Save the following in a file, `chmod a+x` it and run like `./fact.pl 5` | |
Just don't pass in negative numbers or you'll slowly use up system resources. |
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 v5.16; | |
no strict; # DANGER | |
no warnings; | |
# 43 + 10 = 53 | |
say"Happy birthday to ".($_-2?you:programmer)for+0..3 | |
; |
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
all: libtowel.so | |
perl towel.pl | |
-@#LD_PRELOAD="`pwd`/libtowel.so" perl towel.pl | |
libtowel.so: towel.c | |
$(CC) -shared -fPIC -o $@ $< | |
clean: | |
rm -Rf _Inline/ libtowel.so |
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
DateTime does stringify | |
2014-06-29T21:49:50 | |
---- | |
PDL does not stringify | |
0 |