Skip to content

Instantly share code, notes, and snippets.

@jk
jk / Default (OSX).sublime-keymap
Created June 14, 2012 08:57
Sublime Text 2 - User defined shortcuts
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" },
{ "keys": ["alt+up"], "command": "inc_dec_value", "args": { "action": "inc_min" } },
{ "keys": ["alt+down"], "command": "inc_dec_value", "args": { "action": "dec_min" } },
{ "keys": ["super+up"], "command": "inc_dec_value", "args": { "action": "inc_max" } },
{ "keys": ["super+down"], "command": "inc_dec_value", "args": { "action": "dec_max" } },
@jk
jk / NSLogger-CocoaLumberjack-connector.podspec
Last active October 6, 2015 08:38
NSLogger-CocoaLumberjack-connector
Pod::Spec.new do |s|
s.name = 'NSLogger-CocoaLumberjack-connector'
s.version = '1.2.cp1'
s.license = 'BSD'
s.summary = 'Bridges NSLogger and CocoaLumberjack.'
s.homepage = 'https://github.com/steipete/NSLogger-CocoaLumberjack-connector'
s.author = { 'Peter Steinberger' => '[email protected]' }
s.source = { :git => 'https://github.com/jk/NSLogger-CocoaLumberjack-connector.git', :commit => 'a05e5c51fad2c850c44eab6643f131f48a38929c' }
s.description = 'This is a bridge for the projects http://github.com/robbiehanson/CocoaLumberjack (A general purpose super-fast logging framework) and http://github.com/fpillet/NSLogger (send logs to a client app via network).'
s.source_files = 'DDNSLoggerLogger.*'
@jk
jk / generate_passkit_manifest.sh
Created June 28, 2012 09:27
Generate PassKit manifest.json
echo "{"`find . -type f -exec shasum {} + | sed 's/\.\///g' | awk '{print "\t\"" $2 "\" : \"" $1 "\","}' | grep -v -E "(\.DS_Store|manifest\.json)"`"}" | sed 's/\,}/}/g' | python -mjson.tool > manifest.json
@jk
jk / User-Preferences.sublime-settings.json
Created June 28, 2012 12:27
Sublime Text 2 User Settings
{
// Filename: Prefereces.sublime-settings in Packages/User/
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font face": "Inconsolata-dz",
"font_size": 14.0,
"ignored_packages":
[
"Vintage"
],
"tab_size": 4,
@jk
jk / XCDFakeCarrier.m
Created July 3, 2012 13:05 — forked from 0xced/XCDFakeCarrier.m
Hack to choose the displayed carrier name in the iOS simulator
//
// Copyright (c) 2012 Cédric Luthi / @0xced. All rights reserved.
//
#if TARGET_IPHONE_SIMULATOR
static NSString * const FakeCarrier = @"AT&T";
#import <objc/runtime.h>
@jk
jk / nsdate-helper.podspec
Created July 3, 2012 14:58
NSDate+Helper podspec
Pod::Spec.new do |s|
s.name = 'NSDate+Helper'
s.version = '0.0.1'
s.summary = 'A category to extend Cocoa\'s NSDate class with some convenience functions.'
s.description = 'This is a category for the NSDate class that provides some convenience methods for working with NSDate objects and displaying formatted and relative strings.'
s.homepage = 'http://www.zetetic.net/blog/'
s.license ='Copyright © 2009, 2010, ZETETIC LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
[user]
name = Jens Kohl
email = jens.kohl@…
signingkey = 8EFDF903
[color]
status = auto
diff = auto
branch = auto
interactive = auto
pager = false
@jk
jk / trait.properties.php
Created July 7, 2012 13:49
Example of PHP traits to implement real properties in PHP classes
<?php
/**
* Real properties PHP trait
* Requirements: PHP 5.4 or later
*/
trait Properties
{
protected $properties;
public function __get($name)
@jk
jk / ZipKit.podspec
Created July 9, 2012 09:27
Fixed ZipKit.podspec
Pod::Spec.new do |s|
s.name = 'ZipKit'
s.version = '0.0.1'
s.license = { :type => 'BSD', :file => 'COPYING.TXT' }
s.summary = 'An Objective-C Zip framework for Mac OS X and iOS.'
s.homepage = 'https://bitbucket.org/kolpanic/zipkit/wiki/Home'
s.author = { 'Karl Moskowski' => '[email protected]' }
s.source = { :hg => 'https://bitbucket.org/kolpanic/zipkit', :revision => '531cd75fef32' }
@jk
jk / lzmaSDK.podspec
Created July 9, 2012 11:31
lzmaSDK 9.21 beta podspec
Pod::Spec.new do |s|
s.name = "lzmaSDK"
s.version = "9.21.3"
s.summary = "lzma SDK (release 9.21 beta) configured as an iPhone project to extract 7z archives."
s.description = "7zip is a useful replacement for zlib and bzip2. In some cases, 7zip can achive drastically better compression ratios than both zlib and bzip2. One can always go to 7-zip.org to find the source code."
s.homepage = "https://github.com/jk/lzmaSDK"
s.license = "Unknown"
s.author = { "Mo DeJong" => "[email protected]", 'Jens Kohl' => '[email protected]' }
s.source = { :git => "https://github.com/jk/lzmaSDK.git", :tag => "9.21.3" }
s.platform = :ios