This file contains hidden or 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
# | |
# gmail_to_post.py | |
# FrenzyLabs, llc (@frenzylabs) | |
# | |
# Created by Wess Cope (@wesscope) on 2011-12-08. | |
# Copyright 2011 FrenzyLabs, llc. All rights reserved. | |
# | |
# Using: | |
# Python 2.7 | |
# Requests: http://python-requests.org |
This file contains hidden or 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
/*** | |
* This is an example Stackfile | |
*/ | |
/* PATHS */ | |
var jsPath = "js", | |
cssPath = "css", | |
lessPath = "less"; | |
/* PATHS */ |
This file contains hidden or 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
# This is my first full blow coffeescript class Im working on | |
# thoughts? | |
class Request | |
constructor: -> | |
@xhrObjects = [ | |
-> new XMLHttpRequest() | |
-> new ActiveXObject("Msxml2.XMLHTTP") | |
-> new ActiveXObject("Microsoft.XMLHTTP") | |
] |
This file contains hidden or 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
# | |
# request.coffee | |
# | |
# Created by Wess Cope on 2012-01-30. | |
# | |
# Just a start. The basics in place and working | |
# to expand as elements are needed. | |
# | |
class Request |
This file contains hidden or 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
# | |
# forms.coffee | |
# | |
# Created by Wess Cope on 2012-02-07. | |
# | |
window.document.getValuesOfFormWithId = (id)-> | |
tags = ['input', 'select', 'textarea'] | |
nonTypes = ['reset', 'submit', 'button'] | |
This file contains hidden or 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
// This is a bit messy right now, wanted to get it looking like i wanted before subclassing | |
// UIButton and making it proper like. | |
// Uses macros and categories from: http://github.com/wess/Additions | |
// | |
CGRect buttonFrame = CGRectInset(SCREEN_BOUNDS, 12.0f, 0.0f); | |
buttonFrame.size.height = 60.0f; | |
buttonFrame.origin.y = fieldFrame.size.height + fieldFrame.origin.y + 20.0f; | |
This file contains hidden or 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
- (UIImage *)withNewSize:(CGSize)newSize | |
{ | |
CGRect newRect = CGRectIntegral(CGRectMake(0.0f, 0.0f, newSize.width, newSize.height)); | |
CGImageRef imageRef = self.CGImage; | |
UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0f); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetInterpolationQuality(context, kCGInterpolationHigh); | |
CGAffineTransform flipVertical = CGAffineTransformMake(1, 0, 0, -1, 0, newSize.height); |
This file contains hidden or 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
#define SINGLETON(classname) \ | |
+(classname *)instance { \ | |
static dispatch_once_t onetime; \ | |
static classname *shared = nil; \ | |
dispatch_once(&onetime, ^{ \ | |
shared = [[classname alloc] init]; \ | |
}); \ | |
return shared; \ | |
} |
This file contains hidden or 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
NSColor *topBorderColor = WHITE; | |
NSColor *btmBorderColor = HEX_COLOR(@"aaa"); | |
NSBezierPath *topBorder = [NSBezierPath bezierPath]; | |
[topBorder moveToPoint:CGPointMake(0.0f, 0.0f)]; | |
[topBorder lineToPoint:CGPointMake(dirtyRect.size.width, 0.0f)]; | |
[topBorder setLineWidth:1.0f]; | |
[topBorderColor setStroke]; | |
[topBorder stroke]; |