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
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 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb | |
sudo dpkg -i elasticsearch-1.1.1.deb |
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=foo | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/usr/local/bin/bar |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
class EmptyCollectionContractResolver : DefaultContractResolver { | |
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) { | |
JsonProperty property = base.CreateProperty(member, memberSerialization); | |
Predicate<object> shouldSerialize = property.ShouldSerialize; | |
property.ShouldSerialize = obj => (shouldSerialize == null || shouldSerialize(obj)) && !IsEmptyCollection(property, obj); | |
return property; | |
} | |
private bool IsEmptyCollection(JsonProperty property, object target) { |