Skip to content

Instantly share code, notes, and snippets.

View cjroebuck's full-sized avatar

cjroebuck cjroebuck

View GitHub Profile
@cjroebuck
cjroebuck / urlbox.rb
Created September 15, 2015 18:20 — forked from urlbox/urlbox.rb
urlbox ruby
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'
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',
@cjroebuck
cjroebuck / index.php
Created December 7, 2012 22:37
webshotr-v1.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) {