Skip to content

Instantly share code, notes, and snippets.

View dylan's full-sized avatar
📡

Dylan Wreggelsworth dylan

📡
View GitHub Profile
guard !argument.isEmpty,
nums.count == arguments.count
else {
print("Blah blah")
}
guard let someVar = someOptional,
let otherVar = otherOptional,
nums.count == arguments.count
else { return }
@dylan
dylan / keybase.md
Last active September 9, 2016 19:58

Keybase proof

I hereby claim:

  • I am dylan on github.
  • I am dylanrw (https://keybase.io/dylanrw) on keybase.
  • I have a public key ASDx2uRFqxQqvkaSOULAalpfIUgagV8EaBuAsESpzeLp6Qo

To claim this, I am signing this object:

import Foundation
public struct Duration {
private var _nanos: UInt64
public var nanoseconds: Double {
get {
return Double(_nanos)
}
}
@dylan
dylan / Base.png
Created January 29, 2016 09:41 — forked from pbogden/Base.png
Georeference an image
Base.png
@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.
platform :ios, '7.1'
pod 'cocos2d-iphone', path: '~/local-cocos2d-repository-with-podspec/'
#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
@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.
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 / 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];