Show Hidden:
and to hide them:
| Choice: | |
| fields: | |
| default: choice, question_id, question | |
| form: choice, question_id, question | |
| order_by: | |
| relationships: question | |
| filters: created_at, question | |
| search: | |
| application: survey |
| // See: http://api.jquery.com/jQuery.ajaxPrefilter/ | |
| $.ajaxPrefilter( function( options ) { | |
| if ( options.crossDomain ) { | |
| var newData = {}; | |
| // Copy the options.data object to the newData.data property. | |
| // We need to do this because javascript doesn't deep-copy variables by default. | |
| newData.data = $.extend({}, options.data); | |
| newData.url = options.url; | |
| // Reset the options object - we'll re-populate in the following lines. |
| var writeData = function (filename, data, callback) { | |
| var writeOutData = function () { | |
| var fw = new FileWriter(); | |
| fw.oncomplete = callback; | |
| fw.onerror = function () { | |
| alert("Failed to save update"); | |
| } | |
| fw.writeAsText("myDir/" + filename, data); | |
| } | |
| <html> | |
| <body> | |
| <form onsubmit="return saveText()"> | |
| <label for="name">Name</label><br> | |
| <input id="name" /><br> | |
| <label for="desc">Description</label><br> | |
| <input id="desc" /><br> | |
| <input type="submit" value="Save" /> |
| dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) | |
| require File.join(dir, 'httparty') | |
| require 'pp' | |
| config = YAML::load(File.read(File.join(ENV['HOME'], '.twitter'))) | |
| class Twitter | |
| include HTTParty | |
| base_uri 'twitter.com' | |
| def initialize(u, p) |
| require 'HTTParty' | |
| response = HTTParty.get("https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&screen_name=instagram&count=10") | |
| puts result[0]['entities']['media'][0]['media_url'] |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'httparty' | |
| class Representative | |
| include HTTParty | |
| end | |
| get '/' do | |
| erb :form | |
| end | |
| get '/:username' do |
| ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime |
| require "httparty" | |
| require "redis" | |
| require_relative "../models/twitter_status" # some wrapper for a Twitter status | |
| class TwitterStream | |
| attr_reader :twitter_handle, :tweets | |
| attr_reader :cache # a helper to the Redis database | |
| attr_reader :cached_response # the actual response from a API call | |
| that is put into the cache |