This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'flareshow' | |
Flareshow::Service.configure('<domain>') | |
Flareshow::Service.authenticate('<your username>','<your password>') | |
flow=Flow.first | |
flow.create_post(:content => "Hello World") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Client.h> | |
#include <Ethernet.h> | |
#include <Server.h> | |
#include <TinyXML.h> | |
#include <WString.h> | |
byte mac[] = { 0xAC, 0xCC, 0xAC, 0xBB, 0xAA, 0xAB }; | |
byte ip[] = { 10, 0, 1, 109 }; | |
byte gateway[] = { 10, 0, 1, 1 }; | |
byte subnet[] = { 255, 255, 255, 0 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require "util" | |
// This code is MIT licensed: http://creativecommons.org/licenses/MIT/ | |
// Zenbe Inc (2009). | |
// Ensure our Zenbe namespaces exist. | |
window.zen = window.zen || {}; | |
window.zen.util = window.zen.util || {}; | |
/** | |
* The DropManager class provides a pleasant API for observing HTML5 drag-n-drop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# ================================== | |
# = SOLUTION TO RUBY QUIZ NUMBER 2 = | |
# ================================== | |
# by Will & Stef | |
require 'optparse' | |
# map of positions to characters for each number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will verify the privacy settings on documents you have loaded | |
# to the scribd api. | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
def get_docs(api_uri, limit, offset) | |
api_uri += "&limit=#{limit}&offset=#{offset}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will verify the privacy settings on documents you have loaded | |
# to the scribd api. | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
def get_docs(api_uri, limit, offset) | |
api_uri += "&limit=#{limit}&offset=#{offset}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Renders all the JST and returns the Javascript TemplateCache | |
class TemplateCache | |
def generate(opts={}) | |
defaults = {:noisy => false} | |
options = defaults.merge(opts) | |
jst_files, templates, errors = [],[],[] | |
view_path = Rails::Configuration.new.view_path | |
view = ActionView::Base.new(view_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// Class for template value placeholder objects | |
var _Value = Class.create({ | |
toString: function() { | |
// "x==null" is true for catches null and undefined | |
return this.value == null ? '' : this.value.toString(); | |
} | |
}); | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'cgi' | |
require 'time' | |
# ===================================================== | |
# = Proof of Concept Shareflow Command Line Interface = | |
# ===================================================== | |
# currently it just gets the list of your 10 most recent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'rubygems' | |
require 'hpricot' | |
require 'time' | |
username = "<username>" | |
password = "<password>" | |
tix = Hpricot(IO.popen("curl https://trac.zenbe.com/report/7 --basic -u #{username}:#{password} -k -s")) |