Skip to content

Instantly share code, notes, and snippets.

(function(){
var window,top,self,parent,global;
return document.defaultView
}).call({});
(function(){
var window,top,self,parent,global;
// grab the window object when evalled in the context of
// a top level object.
return eval("window",Array)
}).call({});
// fire a callback after enough keys have been passed to a generated function
var dependencySet = function(conditionKeys, callback){
// convert a list of keys to trackable hash
var conditionSet = {}
for(var x=0;x<conditionKeys.length;x++){
conditionSet[conditionKeys[x]] = false;
}
// return a function that will wait till it's
// been called with all keys and then fire the callback
@tissak
tissak / TeuxDeuxMods.js
Created November 29, 2010 06:38
Darken done items and shuffle them down on complete
// ==UserScript==
// @name darken done
// @namespace http://fluidapp.com
// @description improve teuxdeux appearance
// @include *
// @author Tony Issakov
// ==/UserScript==
(function () {
css = $("<style>li.done{color:#555;}</style>");
@tissak
tissak / gist:841687
Created February 24, 2011 03:10
Sutto's global rails 2 & 3 starter scripts
rails_version() {
which -s rails && rails -v 2>/dev/null | sed 's/Rails //'
}
r() {
local name="$1"
shift
if [[ -z "$name" ]]; then
echo "Usage: $0 command *args" >&2
return 1
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName ssl.diggersndealers.com.au
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
DocumentRoot /var/vhosts/ssl.diggersndealers.com.au/current/public
ErrorLog /var/log/apache2/ssl.diggersndealers.com.au-error.log
CustomLog /var/log/apache2/ssl.diggersndealers.com.au-access.log combined
ipv.classUtil.newManager = function(managerName, subjectClass){
var manager = dojo.getObject(managerName);
if(typeof(manager) == "undefined"){
manager = new function(){
this._widget = null;
this.getWidget = function(options){
options = dojo.mixin({}, options);
if (!this._widget) {
this._widget = new subjectClass();
}
@tissak
tissak / package.json
Created December 28, 2011 03:41
Haml support in Spine without hacking spine
{
"name": "app",
"version": "0.0.1",
"dependencies": {
"serveup": "~0.0.2",
"hem": "~0.1.6",
"es5-shimify": "~0.0.1",
"json2ify": "~0.0.1",
"jqueryify": "~0.0.1",
"spine": "~1.0.5",
@tissak
tissak / mountain-lion-brew-setup.markdown
Created June 17, 2012 02:06 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

attr_accessor :controllerDelegate
def initWithFrame(frame, andDelegate: delegate)
self.initWithFrame(frame)
@controllerDelegate = delegate
setupFrownImage
setupSorryLabel
setupButton
self
end