Skip to content

Instantly share code, notes, and snippets.

@heckj
heckj / fabfile.py
Created November 15, 2009 05:19 — forked from kogakure/fabfile.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
@heckj
heckj / gist:297037
Last active September 4, 2015 09:07
NSConf Notes
from http://dl.dropbox.com/u/34351/NSConferenceNotes.txt
Calendar URL is http://ottersoftware.squarespace.com/storage/nsconference/NSConference_UK_Mac.ics in case you want to subscribe (thanks to @iamleeg/@sgaw)
^^ Calendar has been updated to reflect changes
Twitter tag is #nsconf, or follow/message @nsconfr to broadcast your tweets, auto-magically adding the #nsconf tag.
{ PLEASE TYPE ON SEPARATE LINES UNTIL OTHERS HAVE FINISHED THEIR LINES }
{ Two people editing the same line may cause the characters to mix }
{ if they do, please send a screenshot of the window to monkeys@codingmonkeys.de }
{ when putting this one in "Conference" mode, the links become clickable }
/* Graph JavaScript framework, version 0.0.1
* (c) 2006 Aslak Hellesoy <aslak.hellesoy@gmail.com>
* (c) 2006 Dave Hoover <dave.hoover@gmail.com>
*
* Ported from Graph::Layouter::Spring in
* http://search.cpan.org/~pasky/Graph-Layderer-0.02/
* The algorithm is based on a spring-style layouter of a Java-based social
* network tracker PieSpy written by Paul Mutton E<lt>paul@jibble.orgE<gt>.
*
* Graph is freely distributable under the terms of an MIT-style license.
/* expects RaphaelJS - http://raphaeljs.com/ */
/* http://github.com/DmitryBaranovskiy/raphael */
var redraw;
var height = 300;
var width = 400;
/* only do all this when document has finished loading (needed for RaphaelJS) */
window.onload = function() {
@heckj
heckj / script for enabling Cocoa debugging options.
Created December 7, 2010 05:20
@schwa’s script for enabling Cocoa debugging options.
-- Script to turn on Cocoa debugging options for a the active executable of an XCode project. See <Foundation/NSDebug.h>
-- For extra points change "project document 1" to whatever the right specifier for front most project document.
on createvariable(inName, inValue)
tell application "Xcode"
set theExecutable to active executable of project document 1 of application "Xcode"
if (every environment variable of theExecutable where name is inName) is {} then
make new environment variable at end of theExecutable with properties {name:inName, value:inValue, active:true}
end if
end tell
@heckj
heckj / .xcconfig settings script
Created December 7, 2010 05:20
AppleScript that will Hoseyify all your currently-open Xcode project warnings
property kHoseyXcodeWarningSettings : {¬
{"GCC_WARN_CHECK_SWITCH_STATEMENTS", "YES"}, ¬
{"GCC_WARN_SHADOW", "YES"}, ¬
{"GCC_WARN_64_TO_32_BIT_CONVERSION", "YES"}, ¬
{"GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED", "YES"}, ¬
{"GCC_WARN_ABOUT_RETURN_TYPE", "YES"}, ¬
{"GCC_WARN_MISSING_PARENTHESES", "YES"}, ¬
{"GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS", "YES"}, ¬
{"GCC_WARN_ABOUT_MISSING_NEWLINE", "YES"}, ¬
{"GCC_WARN_SIGN_COMPARE", "YES"}, ¬
@heckj
heckj / testsetup.sh
Created August 10, 2011 16:44
run components for functional tests under screen
# script to background run processes needed to functionally test project
function screen_it {
#newline for screen execution of commands
NL=`echo -ne '\015'`
screen -S project -X screen -t $1
screen -S project -p $1 -X stuff "$2$NL"
}
screen -d -m -S project -t project
@heckj
heckj / .gitignore
Created August 20, 2011 18:59
gitignore for xcode 4
# Exclude the build directory
build/*
# Exclude temp nibs and swap files
*~.nib
*.swp
# Exclude OS X folder attributes
.DS_Store
@heckj
heckj / eventlet_actor.py
Created August 21, 2011 06:18
Eventlet based actor class (from eventlet/coros.py)
import collections
import warnings
import eventlet
from eventlet import event
from eventlet import greenpool
from eventlet import greenthread
class Actor(object):