Skip to content

Instantly share code, notes, and snippets.

@jagill
jagill / indentMove.vim
Created August 4, 2012 11:40
Move to same/different indented line in vim
" This is James Gill's (https://github.com/jagill) version of
" http://vim.wikia.com/wiki/Move_to_next/previous_line_with_same_indentation
" I needed the option to move to a line with a different level of indentation,
" instead of just a lower level.
"
" Jump to the next or previous line that has the same level (or different
" level) of indentation than the current line.
"
" exclusive (bool): true: Motion is exclusive
" false: Motion is inclusive
@jagill
jagill / Safari_iOS_Versions.txt
Created September 4, 2012 04:16
Mobile Safari to iOS version translator
Safari_Release_Version Safari_User-Agent_Version iOS_Versions
6.0 8536.25 6.0
5.1 7534.48.3 5.0.x
5.0.2 6533.18.5 4.2.x-4.3.x
4.0.5 6531.22.7 4.0.x-4.1.0
4.0.4 531.21.10 3.2.x
4.0 528.16 3.0.x-3.1.x
Unknown 525.18.1 2.2.1
3.1.1 525.20 2.0.x-2.2.0
3.0 419.3 1.x
@jagill
jagill / UIDeviceHardware.h
Created September 4, 2012 04:21 — forked from Ricardo1980/UIDeviceHardware.h
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
+ (NSString *) platform;
+ (NSString *) platformString;
@jagill
jagill / gist:3762811
Created September 21, 2012 17:35
KVCSerializer Boolean error
KVCModel *model = [[KVCModel alloc] init];
model.aBoolean = NO;
NSDictionary *falseDict = [model objectToDictionary];
NSLog(@"falseDict has boolean: %@", [falseDict objectForKey:@"aBoolean"]);
//2012-09-21 10:30:49.370 otest[12887:303] falseDict has boolean: 0
model.aBoolean = YES;
NSDictionary *trueDict = [model objectToDictionary];
<head>
<title>dynamicSubscriptions</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>Hello World!</h1>
@jagill
jagill / joinTest.coffee
Created July 31, 2013 23:15
An example of a "join" with meteor. It's client-powered, which is fine as long as you don't mind people intentionally choosing to get a different set of items.
###
Add coffeescript, random packages:
$ meteor add coffeescript random
Remove autopublish package:
$ meteor remove autopublish
###
##Set up collections and subscriptions
Items = new Meteor.Collection 'items'
@jagill
jagill / laikaTest.js
Created October 28, 2013 15:53
laika fails on pending tests
assert = require('assert');
describe('Test test', function(){
it('should ignore pending tests');
//it('should ignore pending tests', function(){
//assert.ok(true);
//});
@jagill
jagill / terminal output
Created November 14, 2013 08:53
undefined to_sym bug in homebrew
jag@coati:~$ brew update
Error: undefined method `to_sym' for nil:NilClass
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/cmd/update.rb:134:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:132:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:132:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:36:in `update'
/usr/local/Library/brew.rb:91:in `send'
/usr/local/Library/brew.rb:91
@jagill
jagill / test output
Created December 6, 2013 16:02
Test failures for oortcloud/node-ddp-client#master I'm on OS X 10.8.5, with node version 0.8.21
jag@coati:/tmp/node-ddp-client (master)$ npm install && npm test
> ddp@0.3.7 test /private/tmp/node-ddp-client
> ./node_modules/mocha/bin/mocha test
․․․․․․․․․
✖ 4 of 9 tests failed:
@jagill
jagill / Build output
Created December 13, 2013 23:42
My application fails to build when upgrading from Meteor 0.6.6.3 to 0.6.7-rc0.
jag@coati:~/madeye/integration-tests/apogee (develop)$ meteor --settings "$PWD/settings.json" --port $MADEYE_APOGEE_PORT --release 0.6.7-rc0 --raw-logs
=> Using Meteor 0.6.7-rc0 as requested (overriding Meteor 0.6.6.3)
[[[[[ ~/madeye/integration-tests/apogee ]]]]]
iron-router: updating npm dependencies -- connect...
stripe: updating npm dependencies -- stripe...
npm ERR! missing: coffee-script@1.6.3, required by pince@0.0.4
npm ERR! missing: underscore@1.5.2, required by pince@0.0.4
npm ERR! missing: moment@2.4.0, required by pince@0.0.4