This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" File: reveal.py | |
Add to ~/.lldbinit: | |
command script import ~/.lldb-scripts/reveal.py | |
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode? | |
A: In Xcode: | |
Add a Symbolic Breakpoint | |
Symbol: "UIApplicationMain" | |
Action: Debugger Command with value "reveal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static UIImage * UIImageForSwatchOfColorWithSize(UIColor *color, CGSize size) { | |
UIImage *image = nil; | |
CGRect rect = CGRectMake(0.0f, 0.0f, size.width, size.height); | |
UIGraphicsBeginImageContext(rect.size); | |
{ | |
CGContextRef c = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(c, [color CGColor]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CSS TRANSITIONS ------------------------------------------------------------/ | |
// I pass 2 args to the method but the second one is only here to prevent | |
// LessCSS to this bloody trick that @arguments return an array if there's two | |
// args but a string when there's only one oO'… | |
.transition (@param, @fakeParam:X, ...) | |
{ | |
// Explode arguments and remove the fakeParam | |
@args : ~`"@{arguments}".replace(/[\[\]]|\sX/g, '')`; | |
// Specify prefixable properties seperated with commas | |
// i.e.: ~"transform,opacity" |