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
λ ~ → echo 'echo $1 $2 $3' | bash -s - 10 11 12 | |
10 11 12 |
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 | |
if [ $# -lt 3 ]; then | |
echo "Usage: <mode> <github username> <gist filename>" >&2 | |
echo " mode is:" >&2 | |
echo " -o output the file to stdout" >&2 | |
echo " -s store the file in a temporary location, and print the temp filename" >&2 | |
echo " -x execute the script" >&2 | |
echo " (to pass arguments to the downloaeded script, add a \"-\" and add" >&2 | |
echo " add the args for the downloaded script after that)" >&2 |
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 | |
echo $(find . -type f | grep -v .git | wc -l) |
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
TMP_FILE=$(mktemp) | |
for var in "$@" | |
do | |
echo $var >> $TMP_FILE | |
done | |
GNUPLOT_FILE=$(mktemp) | |
gnuplot <<DeadBeef | |
set style line 1 linetype 2 |
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
for var in "$@" | |
do | |
echo $var | |
done |
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 ruby | |
def usage(stdout = false) | |
stream = stdout ? $stdout : $stderr | |
bin = File.basename($0) | |
indent = " " * (bin.length() + "Usage: ".length()) | |
stream.puts("Usage: #{bin} [--help|-h]") | |
stream.puts(indent + " [--vertical]") |
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 ruby | |
def usage(stdout = false) | |
stream = stdout ? $stdout : $stderr | |
bin = File.basename($0) | |
indent = " " * (bin.length() + "Usage: ".length()) | |
stream.puts("Usage: #{bin} [--help|-h]") | |
stream.puts(indent + " [--yes|--no|--maybe]") |
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/python2 | |
import warnings | |
warnings.simplefilter('ignore', DeprecationWarning) | |
import httplib2, urllib, time | |
from urllib import urlencode | |
try: | |
import json | |
except ImportError: |
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 python | |
import curses | |
from curses import KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT | |
MAP = [ | |
'#### ####', | |
'# #### #', | |
'# #', | |
'## ##', |
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
This gist will host random code listings for blogger posts. |