As configured in my dotfiles.
start new:
tmux
start new with session name:
alias server='open http://localhost:8000 && python -m SimpleHTTPServer' |
function convertMS(ms) { | |
var d, h, m, s; | |
s = Math.floor(ms / 1000); | |
m = Math.floor(s / 60); | |
s = s % 60; | |
h = Math.floor(m / 60); | |
m = m % 60; | |
d = Math.floor(h / 24); | |
h = h % 24; | |
return { d: d, h: h, m: m, s: s }; |
As configured in my dotfiles.
start new:
tmux
start new with session name:
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
<script> | |
angular.directive('tj:focus', function(){ | |
return function(scope, element){ | |
element[0].focus(); | |
}; | |
}); | |
</script> | |
<div> | |
<input type="text" ng:model="model" tj:focus /> |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
#!/bin/bash | |
function make_image_dir () { | |
TARGET_DIR=$1 | |
if [ ! -d "${TARGET_DIR}" ]; then | |
mkdir "${TARGET_DIR}" | |
fi | |
} | |
function ignore_image_dir () { |
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CoffeeScript: source.coffee |