Skip to content

Instantly share code, notes, and snippets.

@eliaskg
eliaskg / gist:879431
Created March 21, 2011 13:13
Button theming in Cappuccino
@implementation CPButton (MyCostumButton)
- (void)setCustomTheme
{
var normalColorNormal = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:[
[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:"controls/buttonNormalNormalLeft.png"] size:CGSizeMake(2, 24)],
[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:"controls/buttonNormalNormalMiddle.png"] size:CGSizeMake(1, 24)],
[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:"controls/buttonNormalNormalRight.png"] size:CGSizeMake(2, 24)]
] isVertical:NO]];
@eliaskg
eliaskg / gist:860115
Created March 8, 2011 10:11
Class creating problems with CPTextField
Object.prototype.disableRightClick = function(shouldDisable)
{
if (this._DOMElement)
var element = this._DOMElement;
else
var element = this;
element.oncontextmenu = shouldDisable ? function() { return false; } : null;
}
jake flatten
tusk install closure-compiler
source ~/.profile
export PATH=/usr/local/narwhal/bin:$PATH
export PATH=/usr/local/narwhal/packages/tusk/bin:$PATH
sudo nano ~/.profile
@eliaskg
eliaskg / JakeFile.js
Created February 15, 2011 10:33
The optimal jakefile
/*
* Jakefile
* YourApp
*
* Created by Elias Klughammer on February 14, 2011.
* Copyright 2011, yourapp.com All rights reserved.
*/
var ENV = require("system").env,
FILE = require("file"),
@eliaskg
eliaskg / Jakefile
Created February 14, 2011 17:22
Jakefile from gomockingbird.com
/*
* Jakefile
* Mockingbird
*
* Created by Saikat Chakrabarti on March 16, 2010.
* Copyright 2010, gomockingbird.com All rights reserved.
*/
var ENV = require("system").env,
FILE = require("file"),
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
import commands
import hashlib
import getopt
from pyfsevents import registerpath, listen