Skip to content

Instantly share code, notes, and snippets.

@jk
jk / IBAForms.podspec
Created November 29, 2011 08:57
Podspec for IBAForms
Pod::Spec.new do |s|
s.summary = 'A simple iPhone forms library'
s.license = 'Apache License, Version 2.0'
s.source = { :git => 'https://github.com/ittybittydude/IBAForms.git', :tag => '1.0.0' }
s.source_files = 'library/**/*.{h,m}'
s.author = { 'Itty Bitty Apps' => 'info@ittybittyapps.com' }
s.version = '1.0.0'
s.homepage = 'https://github.com/ittybittydude/IBAForms'
s.name = 'IBAForms'
s.platform = :ios
@jk
jk / PHP+RestServer.language
Created August 16, 2011 13:34
Extended TextMate PHP language for supporting RestServer.php notation
{ scopeName = 'source.php';
comment = "TODO:
• Try to improve parameters list syntax – scope numbers, ‘=’, ‘,’ and possibly be intelligent about entity ordering
• Is meta.function-call the correct scope? I've added it to my theme but by default it's not highlighted";
firstLineMatch = '^#!.*(?<!-)php[0-9]{0,1}\b';
foldingStartMarker = '(/\*|\{\s*$|<<<HTML)';
foldingStopMarker = '(\*/|^\s*\}|^HTML;)';
patterns = (
{ comment = 'Matches empty tags.';
match = '(?x)
@jk
jk / php_isReallyAnInt.php
Created July 18, 2011 12:56
Go straight to hell with the PHP type system
<?php
function isReallyAnInt($obj)
{
if (!is_numeric($obj))
return false;
if (intval($obj) != floatval($obj))
return false;
return true;
@jk
jk / check-php-syntax-errors.sh
Created July 13, 2011 15:50
Check directories for PHP syntax errors
find . -name "*.php" -exec php -l {} \; | grep "PHP Parse error:"
#!/usr/bin/env ruby -w
#
# This is a script to help view a patch file in the Changes.app[1] UI. It is
# pretty basic, but does the job. It simply creates 2 copies of the file,
# where in one (the "original") it strips all the lines starting with '+', and
# the other (the "modified") it strips all the lines starting with '-'. It
# also removes the first character of all lines starting with a space, +, or -
# Then it simply uses the chdiff command line too to view the differences.
#
# It takes input either from filename arguments (multiple files are ok, but it
//
// EGOTitledTableViewCell.h
// EGOClasses
//
// Created by Shaun Harrison on 6/2/09.
// Copyright 2009 enormego. All rights reserved.
//
#import <UIKit/UIKit.h>