Skip to content

Instantly share code, notes, and snippets.

View suderman's full-sized avatar

Jon Suderman suderman

View GitHub Profile
@suderman
suderman / install-python-cheetah.sh
Created August 1, 2012 21:15
Install Python Cheetah
#!/bin/sh
cd /tmp
curl http://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz -o cheetah.tar.gz
tar -zxvf cheetah.tar.gz
cd Cheetah-2.4.4
sudo python setup.py install
@suderman
suderman / test.sh
Created July 28, 2012 05:48
test.sh
#!/bin/sh
# Check for symlink and create symbolic links
command -v symlink >/dev/null 2>&1 || { curl https://raw.github.com/suderman/symlink/master/install.sh | sh; }
cd ~/.dotfiles && symlink symlinks.yml
# Now that SSH is all set up, update remote origins for password-less pushing
if [ -f ~/.ssh/id_rsa ]; then
echo "has ssh"
@suderman
suderman / mysql.sh
Created July 11, 2012 19:49
After brew install mysql
#!/bin/sh
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
mkdir -p ~/Library/LaunchAgents
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
cp "$(brew --prefix mysql)/homebrew.mxcl.mysql.plist" ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
@suderman
suderman / userstyle.css
Created May 29, 2012 21:39
Campfire CSS
#Tabs { min-width: 520px !important; }
.Left, .speak { width: 100% !important; }
#input { width: 440px !important; }
#Wrapper { padding-left: 0 !important; padding-right: 0 !important; }
.Left .col, .Full .col { padding: 5px 0 0 !important; background: #fff !important; }
#todays_transcript { padding: 5px !important; }
#Sidebar { right: 0 !important; }
#SidebarTop, #search_form, #guest_access, #files, #room_locking { display: none !important; }
@suderman
suderman / .tmux.conf
Created March 10, 2012 00:14
Tmux Goodness
# Report that we can handle 256 colors
set -g default-terminal "screen-256color"
# act like GNU screen
unbind C-b
set -g prefix C-a
# OhMyZsh ftw!
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
Source https://github.com/Lokaltog/vim-powerline
let g:Powerline_symbols = 'fancy'
@suderman
suderman / statusline.vim
Created September 26, 2011 22:50
Scrooloose Statusline
"statusline setup
set statusline=%f "tail of the filename
"display a warning if fileformat isnt unix
set statusline+=%#warningmsg#
set statusline+=%{&ff!='unix'?'['.&ff.']':''}
set statusline+=%*
"display a warning if file encoding isnt utf-8
set statusline+=%#warningmsg#
<?php
require_once 'n_model.php';
class Contact extends NModel {
function __construct() {
$this->__table = 'contact';
$this->form_required_fields = array('first_name','last_name','email');
$this->form_elements['address'] = array('textarea', 'address', 'Address', array('rows'=>1,'cols'=>50));
$this->form_elements['zip_postal_code'] = array('text', 'zip_postal_code', 'Zip/Postal Code');
<?php
require_once 'app/controllers/asset_controller.php';
class ContactController extends AssetController {
function __construct() {
$this->name = 'contact';
$this->versioning = true;
$this->base_view_dir = ROOT_DIR;
parent::__construct();
}
map <Leader>d :NERDTreeToggle<CR>
map <Leader>dd :NERDTreeFind<CR>
let NERDTreeIgnore=['\.rbc$', '\~$']
let NERDTreeDirArrows=1
let NERDTreeMinimalUI=1
let NERDTreeShowHidden=1