Skip to content

Instantly share code, notes, and snippets.

View wouterds's full-sized avatar
:octocat:
Hello world!

Wouter De Schuyter wouterds

:octocat:
Hello world!
View GitHub Profile
@andrewgleave
andrewgleave / iOSMapKitFitAnnotations.m
Last active November 4, 2022 15:21
Zooms out a MKMapView to enclose all its annotations (inc. current location)
MKMapRect zoomRect = MKMapRectNull;
for (id <MKAnnotation> annotation in mapView.annotations) {
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate);
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0);
if (MKMapRectIsNull(zoomRect)) {
zoomRect = pointRect;
} else {
zoomRect = MKMapRectUnion(zoomRect, pointRect);
}
}
@eculver
eculver / recursive remove .AppleDouble directories
Created May 26, 2011 00:03
recursive remove .AppleDouble directories
find . -name \.AppleDouble -exec rm -rf {} \;
@jpantuso
jpantuso / osx_lion_rail_setup.md
Created July 27, 2011 19:51
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@indragiek
indragiek / NSWindow+Fade.h
Created November 27, 2011 05:55
NSWindow+Fade - Animator proxy based NSWindow fading
@interface NSWindow (Fade)
- (IBAction)fadeIn:(id)sender;
- (IBAction)fadeOut:(id)sender;
@end
@elidupuis
elidupuis / handlebars-helpers.js
Last active December 7, 2021 02:24
Simple Handlebars.js helpers
/*! ******************************
Handlebars helpers
*******************************/
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/)
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");
@svnlto
svnlto / install.md
Created December 12, 2011 22:59
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@davidcornu
davidcornu / free.sh
Created February 23, 2012 22:07
Run iPhone simulator standalone
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@MaximKeegan
MaximKeegan / FadeScrollView.h
Created April 24, 2012 11:15
Fade edges UIScrollView
//
// FadeScrollView.h
// scroll_test
//
// Created by Maxim Keegan on 24.04.12.
// Copyright (c) 2012 East Media Ltd. All rights reserved.
//
#import <UIKit/UIKit.h>