Skip to content

Instantly share code, notes, and snippets.

@rconnelly
rconnelly / AppDelegate.m
Created December 20, 2011 07:33
Example of how to set up a stackmob application with restkit.
STMRestKitConfiguration *config = [STMRestKitConfiguration configuration];
// UserModel is a class which implements the STMMappedObject protocol
// this line registers the model
NSArray *mappings = [STMObjectMapping defaultMappingsForClasses:[UserModel class], nil];
[config.mappingProvider registerObjectMappings:mappings];
// create a restkit data provider
id<STMDataProvider> dataProvider = [STMRestkitDataProvider dataProviderWithConfiguration:config];
@rconnelly
rconnelly / jsonball.rb
Created June 13, 2012 19:58 — forked from ahgittin/jsonball.rb
a jekyll tag to parse json files and objects for use as maps subsequently
require 'json'
# JSON parser tag, creating map for use in jekyll markdown
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com)
# Released under APL 2.0
# usage: {% jsonball varname from TYPE PARAM %}
#
# where TYPE is one of {data,var,file,page}, described below
@rconnelly
rconnelly / package.json
Created August 8, 2012 21:02
package.json file with geoip
{
"name": "quadpass",
"author": "Ryan Connelly (/humans.txt)",
"description": "Online gift cards",
"version": "0.0.1-63",
"main": "boot.js",
"dependencies": {
"express": "~2.5.6",
"mongoose": "~2.7.0",
"mongoose-auth": "git://github.com/rconnelly/mongoose-auth.git",
{
"name": "test1",
"version": "0.0.0",
"description": "Test example",
"main": "test1.js",
"scripts": {
"test": "node test1"
},
"repository": "",
"keywords": [
{
"name": "test1",
"version": "0.0.0",
"description": "Test example",
"main": "test1.js",
"scripts": {
"test": "node test1"
},
"repository": "",
"keywords": [
var vows = require('vows'),
assert = require('assert');
// Create a Test Suite
vows.describe('Divide and Multiply').addBatch({
'when multiplying 2 by 2': { // Context (batch 1)
topic: function () { return 2 * 2; },
'we get four': function (topic) { // Vow w/Topic arg
assert.equal (topic, 4); // Async
{
"name": "test1",
"version": "0.0.0",
"description": "Test example",
"main": "test1.js",
"scripts": {
"test": "vows test1 --spec"
},
"repository": "",
"keywords": [
{
"glob": ["lib/**/*.js", "examples/**/*.js", "examples/README.md", "README.md"],
"github": true
}
{
"author": "Ryan Connelly <[email protected]> (http://quad.io)",
"name": "shopnode",
"description": "A complete node client for the shopify api.",
"version": "0.0.2",
"homepage": "http://quad.io",
"main": "lib/shopnode.js",
"scripts": {
"test": "make test"
},
language: node_js
node_js:
- 0.6
notifications:
email:
- [email protected]