Skip to content

Instantly share code, notes, and snippets.

@geoffgarside
geoffgarside / GGChecksummingOutputStream.h
Created December 12, 2010 12:51
NSOutputStream subclass which updates a SHA1 checksum for all data written
//
// GGChecksummingOutputStream.h
//
// Created by Geoff Garside on 12/12/2010.
// Copyright 2010 Geoff Garside. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonDigest.h>
@pklaus
pklaus / AlwaysMountRootFSWithNoatime_MacOSX.sh
Created April 20, 2011 15:08
SSD Optimizations of Mac OS X 10.6 Operating System
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Mount the root file system / with the option noatime |
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | Tip found on <http://blogs.nullvision.com/?p=275> |
# | |
# +----------------------------------------------------------------------+
@taxilian
taxilian / gist:1028036
Created June 15, 2011 20:32
modified jenkins launch plist
We couldn’t find that file to show.
@skabber
skabber / build_ota.sh
Created September 12, 2011 19:49
Xcode Build OTA
#!/bin/sh
# This script was written by Jay Graves for the 360iDev Conference.
# You can find the full slides available at http://skabber.com/
# This script requires Xcode and s3cmd http://s3tools.org/s3cmd
# You will need your own Amazon S3 account to upload files.
# Put your distribution certificates and keys in the System Keychain
# otherwise you will need to use security unlock-keychain
TARGET=GroupA
PlistBuddy=/usr/libexec/PlistBuddy
@ksm
ksm / UINavigationController+Fade.h
Created February 14, 2012 22:23
UINavigationController custom pop/push transition animation
/*
Copied and pasted from David Hamrick's blog:
Source: http://www.davidhamrick.com/2011/12/31/Changing-the-UINavigationController-animation-style.html
*/
@interface UINavigationController (Fade)
- (void)pushFadeViewController:(UIViewController *)viewController;
- (void)fadePopViewController;
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@chrisjaure
chrisjaure / deploy.js
Created July 29, 2012 17:16
Deploying nodejs apps with haibu and git
#! /path/to/node
var haibu = require('/path/to/haibu');
var client = new haibu.drone.Client();
process.stdin.resume();
process.stdin.on('data', function(data){
var package = JSON.parse(data.toString());
@luca-bernardi
luca-bernardi / AVAsset+VideoOrientation.h
Created February 23, 2013 18:12
Find the video orientation of an AVAsset. (Useful if you need to send the video to a remote server)
//
// AVAsset+VideoOrientation.h
//
// Created by Luca Bernardi on 19/09/12.
// Copyright (c) 2012 Luca Bernardi. All rights reserved.
//
#import <AVFoundation/AVFoundation.h>
typedef enum {
LBVideoOrientationUp, //Device starts recording in Portrait
@cdnsteve
cdnsteve / gist:5396612
Last active April 4, 2020 11:46 — forked from jaredhanson/gist:2559730
Node.js: Restify and Passport for FB
// Based off example code from Hal Robertson
// https://github.com/halrobertson/test-restify-passport-facebook
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao
var restify = require('restify')
// config vars
var FB_LOGIN_PATH = '/api/facebook_login'
var FB_CALLBACK_PATH = '/api/facebook_callback'
var FB_APPID = '<<YOUR APPID HERE>>'
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line: