Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
package net.shadowraze.vote4diamondz; | |
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.CharBuffer; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; | |
import java.nio.channels.SocketChannel; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# ~/.tmux.conf | |
# | |
# See the following files: | |
# | |
# /opt/local/share/doc/tmux/t-williams.conf | |
# /opt/local/share/doc/tmux/screen-keys.conf | |
# /opt/local/share/doc/tmux/vim-keys.conf | |
# | |
# URLs to read: | |
# |
#~/.mutt/aliases | |
alias nick Nicholas Levandoski <nick.levandoski@auglug.org> | |
alias tim Timothy Pitt <timothy.pitt@auglug.org> | |
alias steven Steven Jackson <sjackson@auglug.org> | |
alias kaleb Kaleb Hornsby <kaleb.hornsby@auglug.org> | |
alias alug-admin nick, tim, steven |
private String split(String pInputString, String pDelim, int pMaxLength) { | |
int len = pInputString.length(); | |
int times = len / pMaxLength; | |
boolean remainder = len % pMaxLength != 0; | |
int startIdx = 0; | |
int endIdx = pMaxLength; | |
StringBuilder res = new StringBuilder(); | |
if (len <= pMaxLength) { | |
return pInputString; | |
} else { |
As configured in my dotfiles.
start new:
tmux
start new with session name:
mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})' --port=27015 test |
mongo --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})' --port=27015 test |
// execute on ready state | |
jQuery.extend({ | |
getQueryParameters : function (str) { | |
return (str || document.location.search).replace(/(^\?)/, '').split("&").map(function (n) { | |
return n = n.split("="), this[n[0]] = n[1], this | |
}.bind({}))[0]; | |
} | |
}); |
// https://github.com/Monwara/node-logging/blob/master/logging.js | |
function prettyPrintObj(o, excludes) { | |
excludes = typeof excludes === 'undefined' ? EXCLUDES : excludes; | |
if (!o || typeof o !== 'object' || !Object.keys(o).length) { | |
return '*'.grey + ' ' + 'n/a'.green + '\n'; | |
} | |
var rows = []; |