Skip to content

Instantly share code, notes, and snippets.

@samkeen
samkeen / python-setup.md
Last active October 1, 2015 15:22
My OSX Python env setup

Python Dev machine setup

WORK IN PROGRESS

Documenting my specific tweaks here. I feel this doc does a great job of covering the basics of virtualenv and virtualenvwrapper.

brew update
brew install python

To install Kivy, you must:

  • Download the latest version from http://kivy.org/#download
  • Double-click to open it
  • Drag the Kivy.app into your Applications folder
  • Double click the makesymlinks script.
vi hello.py
@samkeen
samkeen / simple-web-server.js
Created May 5, 2014 15:21
Simple Web Server with directory listing
var express = require('express')
var directory = require('serve-index')
var logger = require('morgan')
var app = express()
app
.use(logger())
// enable direcotry listing
.use(directory('public', {'icons': true}))
// serve files
# this script started the remote rails app ready to attach a rubymine remote debugging session
# see: http://www.jetbrains.com/ruby/webhelp/remote-debugging.html
PATH_TO_RAILS="/path/to/rails/web/root"
echo "removing existing debug gems and intalling rubymine debug gems"
echo
sudo gem uninstall ruby-debug-base -aIx
sudo gem install ruby-debug-base --pre --no-rdoc --no-ri
sudo gem uninstall ruby-debug-ide -aIx
#!/bin/bash
#
# (1) copy to: ~/bin/ssh-host-color
# (2) set: alias ssh=~/bin/ssh-host-color
#
# Inspired from http://talkfast.org/2011/01/10/ssh-host-color
# Fork from https://gist.github.com/773849
#
set_term_bgcolor(){
@samkeen
samkeen / my.cnf
Last active December 15, 2015 23:49
my.cnf file for development box
[mysqld]
socket=/var/lib/mysql/mysql.sock
###############
## query log #
###############
# < 5.1.6 format turn on general log and accepts a path
# log = /usr/local/mysql/data/queries.log
# > 5.1.6
@samkeen
samkeen / data_ux.md
Last active December 15, 2015 23:39
Exemplary Data UX
@samkeen
samkeen / git-svn-workflow.md
Last active April 17, 2019 07:33
git svn workflow

Clone

# -s is there to signify that my Subversion repository has a standard layout (trunk/, branches/, and tags/)
$ git-svn clone -s http://example.com/my_subversion_repo local_dir

Gitignore

# check in strategy
$ git svn show-ignore > .gitignore

just local strategy

@samkeen
samkeen / current_profile.sh
Last active December 14, 2015 17:49
My current (horrific mess but functional) bash prompt
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# $ cd ~
# $ wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh -O .git-prompt.sh
# Setup git auto-complete and branch
source .git-prompt.sh
# curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
. ~/.git-completion.bash
if [ -f $(brew --prefix)/etc/bash_completion ]; then