Skip to content

Instantly share code, notes, and snippets.

View MSch's full-sized avatar

Martin Schürrer MSch

View GitHub Profile
alias rake='macrake'
export GEM_HOME=~/.gem/macruby/1.9.2
export GEM_PATH=~/.gem/macruby/1.9.2:/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/Gems/1.9.2
#!/bin/bash
VERSIONS="0.1 0.10 0.2 0.3 0.4 0.5 0.5b1 0.5b2 0.6 0.7 0.7.1 0.8 0.9"
for V in $VERSIONS
do
echo Checking out $V
git checkout origin/tags/$V
git clean -fd
git checkout .
git clean -fd
class Exception
alias_method :_message, :message
def message
"#{_message}\t\n#{backtrace.join("\t\n")}"
end
end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-/Apple/DTD PLIST 1.0/EN" "http:/www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.google.keystone.daemon</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<false/>
-(void)pingAnalytics:(NSString*)action {
NSMutableString* params = [NSMutableString stringWithFormat:@"uuid=%@",[self getUUID]];
#ifdef BETA
[params appendString:@"&beta=1"];
#endif
NSString* url = [NSString stringWithFormat: @"https://update.appscape.at/degrees/%@?%@", action, params];
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]];
[request setHTTPMethod:@"GET"];
[[NSURLConnection connectionWithRequest:request delegate:self] retain];
@MSch
MSch / xcode_auto_versioning.rb
Created May 24, 2011 19:56 — forked from bgreenlee/xcode_auto_versioning.rb
Xcode Auto-Versioning: Updates your Info.plist's CFBundleVersion with the current git tag and/or sha.
# Xcode Auto-Versioning
#
# Updates your Info.plist's CFBundleVersion with the current git tag and/or sha.
#
# based on https://github.com/elliottcable/xcode-git-versioner
#
# Usage:
# 1. Right-click the target you want to add the versioning phase to (usually the target that builds your app)
# 2. Select: Add -> New Build Phase -> New Run Script Build Phase
# 3. Specify /usr/bin/env ruby as the shell for the script
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
because ->
intendation ->
really ->
sucks ->
even ->
with ->
coffee-script
goliath it is then.
@MSch
MSch / SingletonInitializer.m
Created April 26, 2011 22:56 — forked from AlanQuatermain/SingletonInitializer.m
An implementation of a Singleton accesAn implementation of a Singleton accessor routine. Removes the (one if-statement) overhead of calling dispatch_once after the first time by method swizzling sharedInstance for a method without dispatch_once
#import <dispatch/dispatch.h>
#import <objc/runtime.h>
@implementation MySingleton
static MySingleton * __singleton = nil;
+ (MySingleton *) sharedInstance_accessor
{
return ( __singleton );
contentView: SC.TemplateView.design({
layerId: 'my-root-id',
templateName: 'main_page',
mouseDown: function(evt) {
console.log('bug?');
evt.preventDefault();
evt.stopPropagation();
evt.stop();
return NO;
}