Skip to content

Instantly share code, notes, and snippets.

@jk
jk / git-standup
Created August 13, 2013 15:02
Review your changes from last working day in today's stand-up meeting
#!/bin/bash
function lastworkingday()
{
if [[ "1" == "$(date +%u)" ]]
then
echo "last friday"
else
echo "yesterday"
fi
<?php
$content = file_get_contents("http://wiki.akosma.com/IPhone_URL_Schemes");
preg_match_all('/(\w+):\/\//', $content, $matches, PREG_SET_ORDER);
$tmpSchemes = [];
foreach ($matches as $match) {
$tmpSchemes[$match[1]] = true;
}
$schemes = [];
@jk
jk / Kal.podspec
Last active December 20, 2015 16:49
Pod::Spec.new do |s|
s.name = "Kal"
s.version = "1.0rc2"
s.summary = "A calendar component for the iPhone (the UI is designed to match MobileCal)."
s.description = <<-DESC
This project aims to provide an open-source implementation of the month view in Apple's mobile calendar app (MobileCal). When the user taps a day on the calendar, any associated data for that day will be displayed in a table view directly below the calendar. As a client of the Kal component, you have 2 responsibilities:
Tell Kal which days need to be marked with a dot because they have associated data.
Provide UITableViewCells which display the details (if any) for the currently selected day.
In order to use Kal in your application, you will need to provide an implementation of the KalDataSource protocol to satisfy these responsibilities. Please see KalDataSource.h and the included demo app for more details.
Pod::Spec.new do |s|
s.name = "EPSDistanceFormatter"
s.version = "0.0.1"
s.summary = "A class to format CLLocationDistance instances into human readable text."
s.homepage = "https://github.com/ElectricPeelSoftware/EPSDistanceFormatter"
s.license = 'All rights reserved'
s.author = { "Electric Peel, LLC" => "info@electricpeelsoftware.com" }
s.source = { :git => "https://github.com/ElectricPeelSoftware/EPSDistanceFormatter.git", :commit => "f1eeb2a0c08c0e7173fa536dfe1e73618796790b" }
s.ios.deployment_target = '4.0'
s.osx.deployment_target = '10.6'
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
self.navigationController.view.tintColor = [UIColor whiteColor];
self.navigationController.navigationBar.titleTextAttributes = @{ NSForegroundColorAttributeName: [UIColor whiteColor] };
@jk
jk / ParseKit.podspec
Created June 29, 2013 23:26
Better ParseKit podspec
Pod::Spec.new do |s|
s.name = 'ParseKit'
s.version = '0.7'
s.license = 'Apache'
s.summary = 'Objective-C/Cocoa String Tokenizer and Parser toolkit. Supports Grammars.'
s.homepage = 'http://parsekit.com/'
s.author = { 'Todd Ditchendorf' => 'todd.ditchendorf@gmail.com' }
s.source = { :git => 'https://github.com/itod/parsekit.git', :tag => '0.7'}
@jk
jk / .vimrc
Created June 3, 2013 07:31
my current ~/.vimrc based on http://amix.dk/vim/vimrc.html
set number
set ruler
set history=700
set cmdheight=2
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set ignorecase
set smartcase
set hlsearch
EXTERNAL SOURCES:
MKInfoPanel:
:podspec: https://raw.github.com/gist/4169493/MKInfoPanel.podspec
SPEC CHECKSUMS:
Facebook-iOS-SDK: 5fc068ebfd8c8c9b0fad476bc36dbbf1fffeebc8
DCIntrospect: 2f5cab0b58b170459ebcb200f59042306fcb0c0d
MKNetworkKit: 3d3c415ced5fa3f896fd0319820b7832103c2f81
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
@jk
jk / use.jsonSerializable.php
Last active December 17, 2015 03:08
Compatible version of PHP 5.4's JsonSerializable
<?php
if (!interface_exists('JsonSerializable')) {
define('IJsonSerializable', false);
// inline interface.JsonSerializable.php
interface JsonSerializable {
public function jsonSerialize();
}
} else {
define('IJsonSerializable', true);
Pod::Spec.new do |s|
s.name = "BlockRSSParser"
s.version = "1.1"
s.summary = "AFNetworkingXMLRequestOperation based RSS parser."
s.homepage = "https://github.com/tiboll/BlockRSSParser"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "Thibaut LE LEVIER" => "thibaut@lelevier.fr" }