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: | |
# |
# 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 |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
# I prefer ctrl-a - helps when dealing with machines that only have Screen | |
unbind C-b | |
set -g prefix C-a | |
# Making windows purrty | |
set-window-option -g status-bg cyan | |
set-window-option -g status-fg black | |
set-window-option -g window-status-current-bg black | |
set-window-option -g window-status-current-fg white |
<?xml version='1.0' encoding='UTF-8'?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" > | |
<plist version='1.0'> | |
<dict> | |
<key>Label</key><string>org.macports.mongodb</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/opt/local/bin/daemondo</string> | |
<string>--label=mongodb</string> |
#!/bin/bash | |
# | |
# SSH Exit Codes | |
# | |
# Using SSH in scripting is pretty standard, but sometimes you want to stop execution of a script | |
# if a command inside an SSH session fails to exit cleanly (return 0). The key to remember is that | |
# the ssh command's exit code will be that of the *last executed* command inside the ssh session, just | |
# like a bash script ends with the exit code of the last command executed unless you specifically | |
# call exit. | |
# |
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
#!/bin/bash | |
#################################### | |
# Exit if program echo does not exist (this allows us to do one line if statements) | |
[ ! -x "$(which echo)" ] && exit 1 | |
######################################## | |
# pretty printing functions | |
function print_status { echo -e "\x1B[01;34m[*]\x1B[0m $1"; } | |
function print_good { echo -e "\x1B[01;32m[*]\x1B[0m $1"; } |
knexjs ( http://knexjs.org/ ) is SQL query builder.
This gist is a simple knexjs sample.
npm run build
in the local foldernode index.js --createSchema
: Create the database schema. (The default SQL client is sqlite3. The schema is created by db_schema.js )