Skip to content

Instantly share code, notes, and snippets.

View swizzlr's full-sized avatar

Thomas Catterall swizzlr

View GitHub Profile

#!!! last updated 11/12/2013. git 1.8.5, BBEdit 10.5, OS 10.9, ruby 2, Xcode 5 !!!#

#Long Operations ##Dropbox and Sync https://www.dropbox.com/downloading

##Homebrew (req for RVM)

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

Hi there,

So you want to try out my sweet new change to Cocoapods?

You need to go to a working directory to clone my fork:

git clone https://github.com/swizzlr/CocoaPods.git

and cd CocoaPods. Then

//Do whatever you want with this except apply a GPL license to it.
//credit to @mattt for the below ifndef
//make sure you only give it things that respond to "Frame" and return a CGRect
@class NSArray;
#ifndef NS_ENUM
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
@swizzlr
swizzlr / blockdeclsyntax.md
Created August 19, 2013 13:11
Block Declaration Syntax List, originally by [pcperini](http://stackoverflow.com/a/9201774/929581), parsed to markdown for printing with your favourite CSS (I recommend @ttscoff's Marked)

List of Block Declaration Syntaxes

Throughout, let

  • return_type be the type of object/primitive/etc. you'd like to return (commonly void)
  • blockName be the variable name of the block you're creating
  • var_type be the type object/primitive/etc. you'd like to pass as an argument (leave blank for no parameters)
  • varName be the variable name of the given parameter And remember that you can create as many parameters as you'd like.

Blocks as Variables

Possibly the most common for of declaration.

@swizzlr
swizzlr / AFHTTPRequestOperation+JLPOperationDidSucceed.h
Created July 12, 2013 16:02
Convenient keypath for finding whether a request completed successfully.
//
// AFHTTPRequestOperation+JLPOperationDidSucceed.h
//
// Created by @swizzlr on 11/07/2013.
// BSD two clause license
//
@class AFHTTPRequestOperation;
@interface AFHTTPRequestOperation (JLPOperationDidSucceed)
@swizzlr
swizzlr / gist:5384259
Created April 14, 2013 21:22
libpebble.a, hex dumped. Interesting stuff here.
!<arch>
/ 1365768839 0 0 0 5378 `
≈òòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòòanimation_initanimation_set_delayanimation_set_durationanimation_set_curveanimation_set_handlersanimation_set_implementationanimation_get_contextanimation_sc
@swizzlr
swizzlr / scaler.sh
Created January 12, 2013 00:14
Change your Retina Mac's screen scale from the Terminal!
#!/bin/bash
#An Applescript embedded in a shell script so I can do this on the command line. Sorry.
#Don't put this on a non retina Mac. Bad Things™ will happen.
#by @tomcatterall/@ares (Twitter/App.net). Say something nice to me if you use and like this, I'd love to know.
echo 'on run argv
try
set theDisplayArgument to item 1 of argv as number