Skip to content

Instantly share code, notes, and snippets.

View carlosmcevilly's full-sized avatar

Carlos McEvilly carlosmcevilly

View GitHub Profile
@PsychoH13
PsychoH13 / ObjC-Blocks-Fun.m
Created November 20, 2009 08:54
SmallTalkish ObjC blocks in Foundation
#import <Foundation/Foundation.h>
#import "PSYSmallTalkBlocks.h"
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int value = 0;
[PSYNumObj(value == 10) ifTrue:PSYIdVoidBlk({
# per http://stackoverflow.com/questions/3684484/peak-detection-in-a-2d-array
require 'pp'
NUM_PEAKS = 5
NEIGHBOR_DISTANCE = 1
data = [[1,2,3,4,5],
[2,6,4,4,6],
[3,6,7,4,3],
@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active December 23, 2019 02:32
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User

@weakish
weakish / backup-providers.md
Last active September 28, 2022 06:27
reviews of vps, storage, mail forward
#!/usr/bin/env python
import zipfile
import fnmatch
from optparse import OptionParser
parser = OptionParser("usage: %prog archive [file]")
(options, args) = parser.parse_args()
try:
zf = zipfile.ZipFile(args[0])
@xslim
xslim / addDebugSettingsChild.sh
Created February 9, 2012 17:22 — forked from daveverwer/build.rb
Scripts to play with Settings.bundle
#!/bin/sh
# addDebugSettingsChild.sh
#
# Simple script to inject a Debug menu in an iPhone Settings plist.
#
# created 10.15.2008 by Andy Mroczkowski, mrox.net
THIS="`basename $0`"
PLISTBUDDY="/usr/libexec/PlistBuddy -x"
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active June 10, 2024 09:23
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@pomeh
pomeh / pr.md
Created September 17, 2012 14:54 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@superacidjax
superacidjax / gist:3738119
Created September 17, 2012 15:48
Setting up an ideal OS X environment
#note: there is more to this than is listed here.. this is just minimal stuff, if you want to get even more high speed, contact me.
#OS X Named Streams Issue for OSX 10.6
echo "[default]" | sudo tee /etc/nsmb.conf
echo "streams=no" | sudo tee -a /etc/nsmb.conf
Install Homebrew
sudo mkdir /usr/local
@codeswimmer
codeswimmer / disable_warnings.m
Created September 23, 2012 23:44
iOS: How to disable warnings via #pragma
#pragma GCC diagnostic ignored "-Wundeclared-selector"