Skip to content

Instantly share code, notes, and snippets.

cjroebuck cjroebuck

Block or report user

Report or block cjroebuck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cjroebuck
cjroebuck / urlbox.rb
Created Sep 15, 2015 — forked from urlbox/urlbox.rb
urlbox ruby
View urlbox.rb
require 'openssl'
require 'open-uri'
def encodeURIComponent(val)
URI.escape(val, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end
def urlbox(url, options={}, format='png')
urlbox_apikey = 'YOUR_API_KEY'
urlbox_secret = 'YOUR_API_SECRET'
View pickadate.js
App.PickADate = Ember.View.extend({
attributes: ['monthsFull', 'monthsShort', 'weekdaysFull', 'weekdaysShort',
'monthPrev', 'monthNext', 'showMonthsFull', 'showWeekdaysShort', 'today',
'clear', 'format', 'formatSubmit', 'hiddenSuffix', 'firstDay', 'monthSelector',
'yearSelector', 'dateMin', 'dateMax', 'datesDisabled', 'disablePicker'],
events: ['onOpen', 'onClose', 'onSelect', 'onStart'],
tagName: 'input',
classNames: 'pickadate',
View Console output
node multipleRequests.js
http://facebook.com: spooky initialised
http://news.ycombinator.com: spooky initialised
http://bbc.co.uk: spooky initialised
http://daringfireball.net: spooky initialised
http://instagram.com: spooky initialised
http://path.com: spooky initialised
http://facebook.com: Callback with saved file: /Users/cjroebuck/Dev/http:/news.ycombinator.com.png
http://news.ycombinator.com: Callback with saved file: /Users/cjroebuck/Dev/http:/news.ycombinator.com.png
View index.php
<?php
function webshotr_v1($url, $args)
{
$WEBSHOTR_APIKEY = "ca482d7e-9417-4569-90fe-80f7c5e1c781";
$WEBSHOTR_SECRET = "d18ff559-8fc2-447f-8e8d-1b1157f9b1c2";
$options['url'] = urlencode($url);
$options += $args;
foreach ($options as $key => $value) {
View webshotr-v1.js
var config, crypto, logger, webshotr;
crypto = require("crypto");
logger = require('./loggerService').logger;
config = require('config');
webshotr = function(apiKey, secret) {
var buildURL, hmacsha1, lib, prefix;
View gist:1487968
{
stack: 'Error: haibu Error (500): Internal Server Error\n at Request.callback (/Users/cjroebuck/Dev/Quillu/dumply/node_modules/haibu/lib/haibu/drone/client.js:167:15)\n at Request.<anonymous> (/Users/cjroebuck/Dev/Quillu/dumply/node_modules/haibu/node_modules/request/main.js:314:21)\n at Request.emit (events.js:64:17)\n at IncomingMessage.<anonymous> (/Users/cjroebuck/Dev/Quillu/dumply/node_modules/haibu/node_modules/request/main.js:295:19)\n at IncomingMessage.emit (events.js:81:20)\n at HTTPParser.onMessageComplete (http.js:133:23)\n at Socket.ondata (http.js:1231:22)\n at Socket._onReadable (net.js:677:27)\n at IOWatcher.onReadable [as callback] (net.js:177:10)',
result: {
error: {
stack: "Error: package.json error: can't find starting script: node index.js\n at /usr/local/lib/node_modules/haibu/lib/haibu/core/spawner.js:148:17",
message: "package.json error: can't find starting script: node index.js",
blame: { message: 'Pa
View gist:1487922
{
"process": {
"pid": 95270,
"uid": 501,
"gid": 20,
"cwd": "/Users/cjroebuck",
"execPath": "/usr/local/Cellar/node/0.6.5/bin/node",
"version": "v0.4.12",
"argv": [
"node",
@cjroebuck
cjroebuck / DocCloud Test Output
Created Oct 2, 2011
Test showing zombie's browser.fire not firing the event handler which is attached via Backbone.Event
View DocCloud Test Output
♢ Open Button Test
Zombie: GET http://www.documentcloud.org/public/search/
Zombie: GET http://www.documentcloud.org/public/search/ => 200
Zombie: GET http://www.documentcloud.org/assets/core.js?1317236698
Zombie: GET http://www.documentcloud.org/assets/core.js?1317236698 => 200
Zombie: Firing timeout 1, delay: 1
Zombie: Firing timeout 2, delay: 1
Zombie: Firing timeout 3, delay: 1
Zombie: Firing timeout 4, delay: 1
You can’t perform that action at this time.