Skip to content

Instantly share code, notes, and snippets.

View HBehrens's full-sized avatar

Heiko Behrens HBehrens

View GitHub Profile
@HBehrens
HBehrens / fw2_rc_timercrash.c
Created January 30, 2014 09:43
minimal example to demo PebbleCam's crash on Pebble Firmware 2.0.RC
#include <pebble.h>
/*
This is a minimal example to demo PebbleCam's crash on Pebble Firmware 2.0.RC
Even though the logs state an issue with cancel_timer, it's really an issue
with window_raw_click_subscribe on BUTTON_ID_UP and menu_layer_set_click_config_onto_window
on the sub window. Change any of those and the crash is gone.
@HBehrens
HBehrens / plugins.txt
Created February 10, 2014 10:47
UISprech WordPress Plugins
add-meta-tags
akismet
flattr
podlove-podcasting
shareadraft
w3-total-cache
admin-in-english
archivist
custom-permalinks
google-sitemap-generator
@HBehrens
HBehrens / PebbleKit.podspec
Last active August 29, 2015 14:01
PebbleKit-Tests
Pod::Spec.new do |s|
s.name = "PebbleKit"
s.version = "2.1.1"
s.summary = "Embed PebbleKit iOS into your app to communicate with Pebble"
s.homepage = "http://developer.getpebble.com"
s.license = {
:type => 'Commercial',
:text => <<-LICENSE
© 2014 Pebble Technology Corp. All rights reserved.
LICENSE
@HBehrens
HBehrens / gist:bb4a52b1d8d57ba4b661
Created June 5, 2014 02:17
Install pbw with UIDocumentInteractionController
- (void)deployToPebbleControl:(UIView *)control delegate:(id<UIDocumentInteractionControllerDelegate>)delegate {
NSString *baseName = @"peebhole-1_x";
#if !TARGET_IPHONE_SIMULATOR
PBFirmwareVersion *version = PEBAppDelegate.instance.watch.versionInfo.runningFirmwareMetadata.version;
if(version.os >= 2) {
baseName = @"peebhole-2_x";
}
@HBehrens
HBehrens / SelectorTests.m
Created July 3, 2012 10:52
proof that NSSelectors are unique and different from their character representation
//
// SelectorTestTests.m
// SelectorTestTests
//
// Created by Heiko Behrens on 29.06.12.
// Copyright (c) 2012 BeamApp. All rights reserved.
//
#import "SelectorTestTests.h"
@HBehrens
HBehrens / SVWebViewController.podspec
Last active October 7, 2015 03:48
CocoaPods Spec for SVWebViewController fork at https://github.com/HBehrens/SVWebViewController
Pod::Spec.new do |s|
s.name = 'SVWebViewController'
s.version = '0.2.1'
s.summary = 'A drop-in inline browser for your iOS app.'
s.homepage = 'https://github.com/samvermette/SVWebViewController'
s.author = { 'Sam Vermette' => 'http://samvermette.com' }
s.source = { :git => 'https://github.com/HBehrens/SVWebViewController.git' }
s.platform = :ios
s.source_files = 'SVWebViewController/*.{h,m}'
s.resources = 'SVWebViewController/SVWebViewController.bundle'
Pod::Spec.new do |s|
s.name = 'BeamMusicPlayerViewController'
s.version = '0.1'
s.summary = 'An iPhone view controller to visualize and control music playback.'
s.homepage = 'https://github.com/BeamApp/MusicPlayerViewController'
s.authors = { 'Moritz Haarmann' => 'http://momo.brauchtman.net', 'Heiko Behrens' => 'http://HeikoBehrens.net' }
s.source = { :git => 'https://github.com/BeamApp/MusicPlayerViewController.git' }
s.platform = :ios
s.source_files = 'Source/*.{h,m}'
s.resources = 'Source/BeamMusicPlayerController.bundle'
@HBehrens
HBehrens / UrbanAirship.podspec
Last active October 13, 2015 08:07
CocoaPods Spec for UrbanAirship
Pod::Spec.new do |s|
s.name = 'UrbanAirship-iOS-SDK'
s.version = '1.3.5.a'
s.license = 'BSD'
s.platform = :ios
s.summary = 'A simple way to integrate Urban Airship services into your iOS applications.'
s.homepage = 'https://github.com/urbanairship/ios-library'
s.author = { 'Urban Airship' => 'support@urbanairship.com' }
s.source = { :git => 'https://github.com/HBehrens/ios-library.git', :commit => '038d1bbbed19d5d0459a87e1fce47cdd87b7ddbc' }
Pod::Spec.new do |s|
s.name = 'OCMock'
s.version = '2.0.1.latest'
s.homepage = 'http://ocmock.org'
s.author = { 'Erik Doernenburg' => 'erik@doernenburg.com' }
s.source = { :git => 'https://github.com/erikdoe/ocmock.git',
:commit => '1f7a26aa3212f29d9fd7c19882c16198b421aee1' }
s.summary = 'OCMock is an Objective-C implementation of mock objects.'
@HBehrens
HBehrens / gist:5702482
Last active December 18, 2015 01:18
NSSelectorFromString nor sel_getUid do return string itself
-(void)testSelectorIdentity {
NSString* stringA = @"someSelector";
NSString* stringB = stringA.mutableCopy;
STAssertTrue(stringA != stringB, @"strings with different identity");
SEL selA = NSSelectorFromString(stringA);
SEL selB = NSSelectorFromString(stringB);
STAssertTrue(selA == selB, @"selectors with same identity (NSSelectorFromString)");
selA = sel_getUid(stringA.UTF8String);