Skip to content

Instantly share code, notes, and snippets.

@photo
photo / openphoto-php-upload-cli.sh
Created October 9, 2011 19:39
Upload all photos from a directory using command line (openphoto-php - https://github.com/openphoto/openphoto-php)
#!/bin/sh
source secrets.sh
for i in $(ls /path/to/directory/*.JPG) ; do
./openphoto -h yourhost -e /photo/upload.json -F "photo=@$i" -X POST;
done
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@MikeGrace
MikeGrace / help-me-focus-kynetx-app.krl
Created December 11, 2010 01:47
puts focus in desired input boxes on sites that are being lame
ruleset a60x475 {
meta {
name "help-me-focus"
description <<
puts focus in desired input boxes on sites that are being lame
>>
author "Mike Grace"
logging on
}
@bradhintze
bradhintze / TSACustomerFeedback.krl
Created November 21, 2010 00:41
Customer Feedback Line using Twilio and Kynetx
meta {
name "TSA Customer Feedback"
description <<
Customer Feedback Number
>>
author "Sam"
logging off
key twitter {
"consumer_key" : "REDACTED",
@rsbohn
rsbohn / kilter.rb
Created November 11, 2010 00:54
Generates a Twilio app rulset for Kynetx
# you need a Kynetx developer account
# and you have to create a Kynetx ruleset
# your hook (for your Twilio phone number) will be:
# http://webhooks.kynetx.com:3098/t/--appID--/callstart
# (replace --appID-- with your app ID such as a8x16
# - or a8x16.dev to use the latest dev version of the ruleset)
#
# 2010-11-22 (rsbohn) Now with YAML!
# -- create kilter.yml in the same directory, then run kilter.rb
# -- sample YAML at the bottom of this file!
@MikeGrace
MikeGrace / StringBin-write-example.js
Created October 12, 2010 05:30
Write to StringBin Example
$.ajax({
dataType: "jsonp",
url: "http://api.stringbin.com/1/write?pin=t6BmN0Iw567L1MY&key=MikeGrace&value=creator",
success: function(data) {
$('body').append("<h1>Error Saving? "+data.error+"</h1>");
}
});
@MikeGrace
MikeGrace / StringBin-read-example.js
Created October 12, 2010 05:25
Read from StringBin Example
$.ajax({
dataType: "jsonp",
url: "http://api.stringbin.com/1/read?pin=t6BmN0Iw567L1MY&key=MikeGrace",
success: function(data) {
$('body').append("<h1>String: "+data.string+"</h1>");
}
});
@MikeGrace
MikeGrace / default-params.js
Created July 14, 2010 17:52
Faking default param passing in JavaScript function
function defaultParams(name, class, id) {
if (class == null) class = "CS 101 [default]";
if (id == null) id = "Not yet set";
return "Name: " + name + ", Class: " + class + ", ID: " + id;
}