Skip to content

Instantly share code, notes, and snippets.

@Override
public void render(final String json){
try{
JSONObject jsonObj = new JSONObject(json);
Iterator<?> keys = jsonObj.keys();
while(keys.hasNext()){
String key = (String)keys.next();
if(key.equalsIgnoreCase("inCurrencies")){
//TODO
@Override
public void render(final String json){
try{
JSONObject jsonObj = new JSONObject(json);
Iterator<?> keys = jsonObj.keys();
while(keys.hasNext()){
final String key = (String)keys.next();
final String value = jsonObj.getString(key);
this.runOnUiThread(new Runnable() {
package com.sample;
import com.calatrava.CalatravaPage;
import com.calatrava.shell.WebViewActivity;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;
import android.view.View;
@jwhitehorn
jwhitehorn / backronym.coffee
Created October 14, 2014 02:04
Backronym Generator
lineReader = require 'line-reader'
words = {}
abbreviation = ['a', 'b', 'c']
wordsForLetter = (thusFar, index) ->
letter = abbreviation[index]
for word in words[letter]
thusFar[index] = word
if index == abbreviation.length-1
{
"animals": [{
"id": "169853e4-882c-4a22-b86f-aa9671fed670",
"name": "Moose",
"color": "brown"
}, {
"id": "d29ab6ce-a15f-41b2-987c-ca40221dcb92",
"name": "Fish",
"color": "yellow"
}]
source :rubygems
gem 'rails', '~> 3.0.0'
gem 'rake', '~> 0.9.0'
gem 'pg'
gem 'devise'
gem 'fastercsv'
gem 'decent_exposure'
gem 'paperclip'
gem 'aws-s3'
Gems included by the bundle:
* actionmailer (3.2.3)
* actionpack (3.2.3)
* activemodel (3.2.3)
* activerecord (3.2.3)
* activerecord-import (0.2.9)
* activeresource (3.2.3)
* activesupport (3.2.3)
* acts_as_versioned (3.2.0 a2ba638)
* addressable (2.2.7)
@jwhitehorn
jwhitehorn / gist:3248988
Created August 3, 2012 16:02
Haiku rev 44378 POSIX test
This file has been truncated, but you can view the full file.
conformance/behavior/WIFEXITED/1-1: build: PASS
conformance/behavior/WIFEXITED/1-1: link: PASS
conformance/behavior/WIFEXITED/1-2: build: PASS
conformance/behavior/WIFEXITED/1-2: link: PASS
conformance/behavior/WIFEXITED/1-3: build: PASS
conformance/behavior/WIFEXITED/1-3: link: PASS
conformance/behavior/timers/1-1: build: PASS
conformance/behavior/timers/1-1: link: PASS
conformance/behavior/timers/2-1: build: PASS
conformance/behavior/timers/2-1: link: PASS
@jwhitehorn
jwhitehorn / nightly
Created August 15, 2012 03:02
TextMate-fork update
{ url = 'https://github.com/downloads/jwhitehorn/textmate/TextMate2_r10262.tbz'; revision = 10262; signee = 'org.textmate.duff'; signature = 'MC0CFGvtu+ic2PTpMBH643gw43CpLy6AAhUAuJyng8SilVGMkFDIWZFP3wn0+Uw='; }
@jwhitehorn
jwhitehorn / appcast.xml
Created December 5, 2012 03:24
Service Manual Appcast
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Jason Whitehorn's Service Manual Changelog</title>
<link>https://raw.github.com/gist/4211908/appcast.xml</link>
<description>Most recent changes with links to updates.</description>
<language>en</language>
<!--
<item>
<title>Version 1.0.2</title>