Skip to content

Instantly share code, notes, and snippets.

View epicserve's full-sized avatar

Brent O'Connor epicserve

View GitHub Profile

Git Notes

Good Basic Global Git Config Settings

[color]
    diff = auto
    status = auto
    branch = auto
[user]

name = Your Name

@epicserve
epicserve / OSX Clean Install Notes.markdown
Created February 22, 2010 15:22
Clean Install Notes for OSX 10.6.2 Snow Leopard

Clean Install Notes for OSX 10.6.2 Snow Leopard

These are the steps I took when migrating from OSX 10.5 Leopard to 10.6.2 Snow Leopard.

Backed up Data

Backup documents and data

Copied all my data folders in my home direcotry to an external hard drive. The direcotries in my home folder that I copied over were; Documents, Dropbox, Library, Movies, Music, Pictures, Public, Sites, code, scripts.

@epicserve
epicserve / Django Enviroment Setup on Mac OSX 10.6.2 (Snow Leopard).markdown
Created February 22, 2010 15:29
Django Enviroment Setup on Mac OSX 10.6.2 (Snow Leopard)

Django Enviroment Setup on Mac OSX 10.6.2 (Snow Leopard)

Install Homebrew

sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
brew install git
cd /usr/local
git init
@epicserve
epicserve / Best TextMate Tips and Shortcuts.md
Created March 8, 2010 15:18
TextMate Tips and Shortcuts

Best TextMate Tips and Shortcuts

Shortcuts

  • ctrl-shift-D — Duplicate Line/Selection
  • alt-cmd-] — Align Assignments
@epicserve
epicserve / Python Snippets.md
Created March 9, 2010 16:31
Python Snippets

Python Snippets

List Comprehension Example:

m2mid_list = [m2m_item.pk for m2m_item in my_model.my_m2m_field.all()]

@epicserve
epicserve / is_required_version.js
Created March 17, 2010 16:06
Javascript required version check
/*
Test if the current version meets the required version number.
Examples:
Basic Usage
if (is_required_version("1.2.6", "1.1.3") === false) {
alert("This script requires version 1.2.6 and the current script's version is 1.1.3");
@epicserve
epicserve / jquery.cycle.preload.js
Created March 18, 2010 22:49
jQuery Cycle Plugin Preload Wrapper
/* jQuery Cycle Plugin Preload Wrapper
* Copyright (c) 2010 Brent O'Connor (http://www.epicserve.com)
* Version: 0.5 (03-25-2010)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Requires:
* jQuery v1.2.6 or later (http://jquery.com/)
* jQuery Cycle Plugin 2.81 or later (http://malsup.com/jquery/cycle/)
@epicserve
epicserve / figure-time.py
Created April 9, 2010 01:23
Simple script to figure plain text time rows to output a time sheet with time totals
#!/usr/bin/env python
# figure-time.py
#
# Author: Brent O'Connor on 2010-04-08.
# Copyright 2010 Epicserve. All rights reserved.
# Version: 0.1.1
from datetime import datetime
import sys
/**
* SEXY BUTTONS
* -------------------------------------------------------------------- */
a.btn {
text-decoration: none;
}
a.btn, input[type=submit], input[type=button] {
cursor: pointer;
padding: 10px;
border: none;

#MySQL Notes

Administration

Create a database

create database <db_name>

Create a user with usage to Mysql