Skip to content

Instantly share code, notes, and snippets.

View dylan's full-sized avatar
📡

Dylan Wreggelsworth dylan

📡
View GitHub Profile
/* It would be fantastic if we had a way to iterate through arguments or escape to JS?
From This */
@CSS3: box-shadow, transform, border-radius;
.transition-property(@CSS3);
/* Or This */
.transition-property(box-shadow, transform, border-radius);
/* To This */
//
// Automatically calls all functions in APP.init
//
jQuery(document).ready(function() {
APP.go();
});
//
// Module pattern:
// http://yuiblog.com/blog/2007/06/12/module-pattern/
@dylan
dylan / gist:828509
Created February 15, 2011 23:27
Fuzzy Description code...
-(id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
CGSize winSize;
NSAutoreleasePool *pool;
UIImage *dImg, *cImg;
pool = [NSAutoreleasePool new];
winSize = [[CCDirector sharedDirector] winSize];
_cView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)] autorelease];
_bg = [[[UIImageView alloc] initWithFrame:CGRectZero] autorelease];
DIRECTORY="/usr/local/etc/openssl/certs"
download_cert() {
cd $DIRECTORY && wget http://curl.haxx.se/ca/cacert.pem
}
add_to_zsh() {
echo "export SSL_CERT_FILE=$DIRECTORY/cacert.pem" >> ~/.zshrc
}
@dylan
dylan / drinks.md
Last active December 20, 2015 07:29
Several of my favorite cocktails, transcribed as I perfect them or discover them.

San Salvador

  • 1.5oz dark rum
  • 1oz triple sec
  • 0.5oz lime juice
  • 1.5oz orange juice

Daiquiri - ***

  • 2oz Rum
  • 1/2 or 1oz Lime juice (usually about one lime's worth of juice)
  • 1 tsp. simple syrup, add more to taste.
#For use with automator and sox
process () {
/usr/local/bin/sox "$1" "$1:r.wav"
}
for x; do
if [ -d $x ]; then
FILES=($x/*.(aif|mp3|ogg|m4a|flac))
for file in $FILES; do
process $file
platform :ios, '7.1'
pod 'cocos2d-iphone', path: '~/local-cocos2d-repository-with-podspec/'
@dylan
dylan / ports.geojson
Last active February 13, 2016 21:10
Naval Action Port Data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dylan
dylan / Base.png
Created January 29, 2016 09:41 — forked from pbogden/Base.png
Georeference an image
Base.png
import Foundation
public struct Duration {
private var _nanos: UInt64
public var nanoseconds: Double {
get {
return Double(_nanos)
}
}