start new:
tmux
start new with session name:
tmux new -s myname
| // http://go.googlecode.com/hg-history/release-branch.r60/doc/GoCourseDay1.pdf | |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os/exec" | |
| "strconv" | |
| s "strings" |
| /** | |
| * Draws a smiley inside the given rectangle. The mood value (0...1) is used | |
| * to make the smiley happy or sad. | |
| * | |
| * @param rect Rectangle to draw the smiley into | |
| * @param mood Happy (= 1) or sad (= 0) or anything in between | |
| */ | |
| -(void)drawSmileyInRect:(CGRect)rect withMood:(float)mood { | |
| CGContextRef ctx = UIGraphicsGetCurrentContext(); | |
| CGContextSaveGState(ctx); |
| 0.0.0-{alpha, beta, chi, delta, eta, gamma, omega, omicron, sigma, theta, upsilon, xi, zeta} |
| def isEven(n) | |
| n % 2 == 0 | |
| end |
| // cisc and ccscanf | |
| <? | |
| require_once('db-connect-string.php'); | |
| pg_connect($db_connect_string); | |
| $res = pg_query("SELECT ac.id + 100000 AS id, ac.name, am.full_name FROM accounts ac JOIN active_members am ON am.account = ac.id ORDER BY full_name"); | |
| header('Content-Type: text/plain; charset=utf-8'); | |
| function utfPadding($str, $len) { |
| package main | |
| import ( | |
| "bufio" | |
| "errors" | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "strings" | |
| ) |
| #!/bin/sh | |
| # FROM http://stackoverflow.com/questions/307503/whats-the-best-way-to-check-that-environment-variables-are-set-in-unix-shellscr | |
| [ -z "$LINGUA" ] && echo "Need to set LINGUA" && exit 1; | |
| [ -z "$MANUAL" ] && echo "Need to set MANUAL" && exit 1; | |
| git add -u . | |
| commit_msg=`tempfile` | |
| echo "($LINGUA) Use latest reviewed $MANUAL manual translation" > $commit_msg | |
| echo >> $commit_msg |
| #!/bin/sh | |
| # http://tuxradar.com/content/xdotool-script-your-mouse | |
| xdotool mousemove 2470 220 | |
| xdotool click 1 | |
| sleep 30 | |
| xdotool mousemove 2555 427 | |
| xdotool click 1 | |
| sleep 2 |
| #!/bin/sh | |
| url="$1" | |
| # http://stackoverflow.com/questions/11711339/getting-webpage-title-img-metadata-info-from-linux-terminal | |
| title=$(wget $url -O - | grep \<title\>|sed "s/\<title\>\([^<]*\).*/\1/" | tr ' ' '_') | |
| links -dump $url >> "$title".txt |