Skip to content

Instantly share code, notes, and snippets.

@DrOctogon
DrOctogon / git_autocomplete
Last active December 18, 2015 10:39
Autocomplete for Git - bash/zsh completion support for core Git.
#!bash
#
# bash/zsh completion support for core Git.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
# *) .git/remotes file names
# *) git 'subcommands'
#!/usr/bin/env python
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n')
sys.exit(1)
@DrOctogon
DrOctogon / daemonextension.py
Created July 9, 2013 16:47 — forked from gvangool/daemonextension.py
Daemonize django with supervisor
"""
Copyright (c) 2009, Sean Creeley
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
@DrOctogon
DrOctogon / Update all git repos within a dir
Created July 16, 2013 17:19
Update all git repos within a dir
find . -name ".git" -type d -prune -execdir git pull \;
=Rails 3.0.pre on App Engine
You can Rails 3 on App Engine, but it won't be especially useful until bundler 10. You should try these instead:
- Rails 2.3.5: DataMapper version: http://gist.github.com/268192
- Rails 2.3.5: TinyDS version: http://gist.github.com/269075
==Install the Development Environment
The gems for the development environment include a pre-release appengine-tools gem that provides a pre-release version of jruby-rack.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@DrOctogon
DrOctogon / vagrant-autocomplete
Created November 14, 2013 22:39
Vagrant Bash AutoComplete
#!/bin/bash
__pwdln() {
pwdmod="${PWD}/"
itr=0
until [[ -z "$pwdmod" ]];do
itr=$(($itr+1))
pwdmod="${pwdmod#*/}"
done

Ubuntu 12.04 Ruby on Rails Development Environment

I haven't set up an install guide for the latest ubuntu release, largely because the last set of instructions worked pretty closely with the latest and greatest Ubuntu, 12.04 Precise Pangolin, however when installing today, I found that there were enough differences in the way that I configure my setup to justify an update, so here it goes. Yes, I'm late to the party, but a quick google search didn't find anything that I felt was as complete for my requirements as my previous install guides, so here I go.

As always with my install guides, I have included here is just about everything you'll need (and then some) to get started with ruby on rails development with Ubuntu 12.04 as a platform. These are my settings and preferences, and this is certainly not the only way of doing things, so keep that in mind.

Step 1: Get the repos ready and run updates.

sudo apt-get update && sudo apt-get upgrade
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.