Skip to content

Instantly share code, notes, and snippets.

View trey's full-sized avatar
🏠
I'd rather be at home

Trey Piepmeier trey

🏠
I'd rather be at home
View GitHub Profile
git checkout good-branch
git branch -D master

Big -D is a blow-everything-away command, make sure this is what you want! You could alternately create a new branch off of the existing master for safe keeping and then delete master.

git checkout -b master
@trey
trey / gist:2967
Created July 28, 2008 22:14
How to use Google's AJAX Libraries API to include jQuery.
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">google.load("jquery", "1.2.6");</script>
<script src="/js/load.js" type="text/javascript"></script>
@trey
trey / settings.py
Created July 26, 2008 19:32
The way to do things post-newformsadmin
INSTALLED_APPS = (
'your_app',
'django.contrib.admin',
'django.contrib.admindocs',
...
)
@trey
trey / gist:2976
Created July 28, 2008 22:32
LOVE/HATE
a:link { color: blue; }
a:visited { color: purple; }
a:hover { color: purple; }
a:active { color: red; }
@trey
trey / guide.markdown
Created July 29, 2008 19:49
Markup guide (in Markdown)

Markup Guide

Use this to determine what different elements in your markup will look like.

This idea stolen from Dave Shea.


First Level Heading (h1)

Second Level Heading (h2)

@trey
trey / gist:3352
Created July 30, 2008 22:22
I'll learn you how to work, IE 6.
<!-- Download: http://jquery.khurshid.com/ifixpng.php -->
<script src="/js/jquery.ifixpng.js" type="text/javascript"></script>
@trey
trey / forms.py
Created July 30, 2008 06:02
Basic layout for doing a form in Django.
from django import forms
from myapp.models import Mymodel
class MyForm(forms.ModelForm):
class Meta:
model=Mymodel
@trey
trey / _triangle.scss
Created May 8, 2015 15:30
Sass Triangle Mixin
// https://css-tricks.com/snippets/css/css-triangle/
@mixin triangle ($color: #ccc, $direction: right, $size: 5px) {
height: 0;
width: 0;
@if $direction == up {
border-bottom: $size solid $color;
border-left: $size solid transparent;
border-right: $size solid transparent;
} @else if $direction == right {
@trey
trey / A-README.md
Last active August 29, 2015 14:25
Quickly Look at a static PHP site using Grunt instead of Apache

Quickly Look at a static PHP site using Grunt instead of Apache

Installation

  • Add these files to the root of your project.
  • Run grunt from the command line.

This is made possible with the magic of grunt-php.

@trey
trey / gist:5005
Created August 12, 2008 04:38
Getting Python Imaging Library (PIL) working on Leopard
# http://emmby.blogspot.com/2008/05/installing-python-pil-on-mac-os-x-1052.html
sudo port install py25-pil
# In ~/.bash_login
export PYTHONPATH="/opt/local/lib/python2.5/site-packages:$PYTHONPATH"