Skip to content

Instantly share code, notes, and snippets.

View MSch's full-sized avatar

Martin Schürrer MSch

View GitHub Profile
addButtonPressed: function(element, productName) {
var product = DC.store.createRecord(DC.Product, { name: productName });
this._observer = this.addStatechartObserver(product, 'status', 'statusChanged');
product.commitRecord();
},
statusChanged: function(target, key, revision) {
if (SC.kindOf(target, DC.Product) && key === 'status') {
if (target.get(key) === SC.Record.READY_CLEAN) this.gotoState('messages');
// else ignore any other status changes
}

"In a goldrush, sell pickaxes": So wie Levi Strauss Goldgräbern besonders beständige Jeans verkaufte, so versucht DevCareApp den Entwicklern von mobilen Apps zu helfen. Mobile Apps sind momentan ein enormer Wachstumsfaktor nicht nur in den USA auch in AT gibt es viele Unternehmen die mit der Entwicklung von mobilen Apps gutes Geld verdienen. DevCareApp wurde von Martin Schürrer und Peter Steinberger gegründet um diese Entwickler zu unterstützen. DevCareApp ermöglicht den Entwicklern Überblick über das Feedback und die Ideen ihrer Kunden zu bewahren und ermöglicht ein ein professionelles und effektives Auftreten nach außen, mit minimalem Zeiteinsatz.

sharedHandlers.add('handlebars', function(format) {
var that = {};
that.handle = function(file, request, callback) {
that.next.handle(file, request, function(response) {
var parser;
if (file.extname() === '.handlebars') {
console.log(file);
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;
}
@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 );
because ->
intendation ->
really ->
sucks ->
even ->
with ->
coffee-script
goliath it is then.
#! /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
@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
-(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];
<?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/>