As configured in my dotfiles.
start new:
tmux
start new with session name:
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
| wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt | |
| sudo mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository | |
| sudo chmod o+x /usr/sbin/add-apt-repository | |
| sudo chown root:root /usr/sbin/add-apt-repository | |
| sudo add-apt-repository ppa:webupd8team/sublime-text-2 |
| ; A REPL-based, annotated Seesaw tutorial | |
| ; Please visit https://github.com/daveray/seesaw for more info | |
| ; | |
| ; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
| ; Seesaw's basic features and philosophy, but only scratches the surface | |
| ; of what's available. It only assumes knowledge of Clojure. No Swing or | |
| ; Java experience is needed. | |
| ; | |
| ; This material was first presented in a talk at @CraftsmanGuild in | |
| ; Ann Arbor, MI. |
| from flask import Flask | |
| from flask import request | |
| app = Flask(__name__) | |
| #Normally this would be an external file like object, but here | |
| #it's inlined | |
| FORM_PAGE = """ | |
| <html> | |
| <head> | |
| <title>Flask Form</title> |
| #!/bin/bash | |
| LINES=$(tput lines) | |
| COLUMNS=$(tput cols) | |
| declare -A snowflakes | |
| declare -A lastflakes | |
| clear |
| (defn clj->js | |
| "Recursively transforms ClojureScript maps into Javascript objects, | |
| other ClojureScript colls into JavaScript arrays, and ClojureScript | |
| keywords into JavaScript strings." | |
| [x] | |
| (cond | |
| (string? x) x | |
| (keyword? x) (name x) | |
| (map? x) (.strobj (reduce (fn [m [k v]] | |
| (assoc m (clj->js k) (clj->js v))) {} x)) |
| def remote_ip | |
| if forwarded = request.env["HTTP_X_FORWARDED_FOR"] | |
| forwarded.split(",").first | |
| elsif addr = request.env["REMOTE_ADDR"] | |
| addr | |
| end | |
| end |
| function countCSSRules() { | |
| var results = '', | |
| log = ''; | |
| if (!document.styleSheets) { | |
| return; | |
| } | |
| for (var i = 0; i < document.styleSheets.length; i++) { | |
| countSheet(document.styleSheets[i]); | |
| } | |
| function countSheet(sheet) { |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/sh | |
| # pandoc -f markdown+lhs -t html5 --smart --css https://raw.github.com/richleland/pygments-css/master/default.css s5topdf.lhs | |
| # pandoc -f markdown+lhs -t html5 --smart --css s5topdf.css s5topdf.lhs | |
| pandoc -f markdown+lhs -t html5 --smart s5topdf.lhs |