Skip to content

Instantly share code, notes, and snippets.

View empty's full-sized avatar

Michael Trier empty

View GitHub Profile
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
@empty
empty / gist:3725292
Created September 14, 2012 22:19
UIColorFromRGB
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
alias rm_py='find . \( -name "*.pyc" -o -name "*.pyo" \) -exec rm -v {} \;'
alias rm_bak='find . \( -name "*.bak" \) -exec rm -v {} \;'
alias rm_cover='find . \( -name "*,cover" \) -exec rm -v {} \;'
alias rm_un='find . \( -name "*.un~" \) -exec rm -v {} \;'
alias mate='mvim'
alias ls='ls -G'
alias ll='ls -hl'
alias mkvirtualenv='mkvirtualenv --no-site-packages --distribute'
From 7798c4bcb559151a24a6e5e31b07a657db9e72d9 Mon Sep 17 00:00:00 2001
From: Denise Govindarajan <denise.govindarajan@pcusa.org>
Date: Wed, 12 Oct 2011 11:07:36 -0400
Subject: [PATCH] Reports - Accounting had no Events to select from in the
drop box.
---
apps/events/forms.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
@empty
empty / show_hide_django_filters.js
Created April 15, 2011 18:32
Simple jQuery script to show / hide Django's change list filters.
<script type="text/javascript">
jQuery(document).ready(function($){
$('<div id="show-filters" style="float: right;"><a href="#">Show Filters</a></p>').prependTo('div.actions');
$('#show-filters').hide();
$('#changelist-filter h2').html('<a style="color: white;" id="hide-filters" href="#">Filter &rarr;</a>');
$('#show-filters').click(function() {
$('#changelist-filter').show('fast');
$('#changelist').addClass('filtered');
$('#show-filters').hide();