Skip to content

Instantly share code, notes, and snippets.

@geoffgarside
geoffgarside / GGChecksummingOutputStream.h
Created Dec 12, 2010
NSOutputStream subclass which updates a SHA1 checksum for all data written
View GGChecksummingOutputStream.h
//
// 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 Apr 20, 2011
SSD Optimizations of Mac OS X 10.6 Operating System
View AlwaysMountRootFSWithNoatime_MacOSX.sh
#!/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 Jun 15, 2011
modified jenkins launch plist
We couldn’t find that file to show.
@skabber
skabber / build_ota.sh
Created Sep 12, 2011
Xcode Build OTA
View build_ota.sh
#!/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 Feb 14, 2012
UINavigationController custom pop/push transition animation
View UINavigationController+Fade.h
/*
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;
View exportjson.js
// 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 Jul 29, 2012
Deploying nodejs apps with haibu and git
View deploy.js
#! /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 Feb 23, 2013
Find the video orientation of an AVAsset. (Useful if you need to send the video to a remote server)
View AVAsset+VideoOrientation.h
//
// 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 Apr 4, 2020 — forked from jaredhanson/gist:2559730
Node.js: Restify and Passport for FB
View gist:5396612
// 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 Nov 22, 2021
How to install Composer globally using MAMP's PHP
View Install Composer to use MAMP's PHP.md

##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: