Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'ubygems'
require 'json'
require 'open-uri'
require 'erb'
mail = '[email protected]'
pass = 'your-password'
data = Struct.new('Foursquare', :user, :days, :icon, :history).new
require 'ubygems'
require 'open-uri'
url = ARGV.first || 'http://webcam02.surfcity-hb.org/-wvhttp-01-/'
`open "#{url}getoneshot?v=160&frame_count=0"`
Signal.trap(:INT) { exit }
while(1) do
p = rand(340) - 170
t = rand(180) - 90
z = rand(45) + 3
# p 'pan: %d, tilt: %d, zoom: %d' % [p,t,z]
// ==UserScript==
// @name DegradeTwitterIcons
// @namespace http://polog.org/
// @include http://twitter.com/*
// @require http://gist.github.com/3242.txt
// @require http://www.bytestrom.eu/data/media/experiments/jpegencoder/examples/jpeg_encoder_basic.js
// ==/UserScript==
// using $X http://gist.github.com/3242 by os0x
function init(doc){
// ==UserScript==
// @name tweets_filter
// @namespace http://www.relucks.org/
// @include http://twitter.com/
// ==/UserScript==
var re = /./
// var re = /(4sq.com|#example)/
filter(document)
require 'tmpdir'
require 'pathname'
require 'fileutils'
require 'time'
require 'aviglitch'
class FinalCut
def initialize *paths
@ffmpeg = exec('which ffmpeg').chomp
require 'ubygems'
require 'finalcut' # http://gist.github.com/397955
files = ARGV
tick = 0.2
margin = 0.2
out = 'out.mp4'
FinalCut.open(*files) do |fc|
durations = files.map {|f| fc.get_duration f }
// ==UserScript==
// @name Twitter + Yahoo Placemaker
// @namespace http://aspietribe.com/
// @description Automatically adds a geo location to your tweet.
// @include http://twitter.com/
// ==/UserScript==
var appidE = 'your-appid-for-wherein.yahooapis.com';
document.getElementById('tweeting_button').parentNode.addEventListener('click', function(e) {
// ==UserScript==
// @name Kill Ustream Socialstream
// @namespace http://aspietribe.com/
// @include http://www.ustream.tv/channel/*
// ==/UserScript==
var $ = unsafeWindow.jQuery, f = ($('.socialstream iframe').length ? $('.socialstream iframe')[0] : $('#twitter iframe').length ? $('#twitter iframe')[0] : {});
f.src = '';
// ==UserScript==
// @name Multiplex Tweet
// @namespace http://aspietribe.com/
// @include http://twitter.com/
// ==/UserScript==
var times = 5;
document.getElementById('tweeting_button').parentNode.addEventListener('click', function(e) {
post();
require 'ubygems'
require 'pimento'
id = ARGV.shift
exit unless id =~ /^\d+$/
x = 50
c = Pimento::Canvas.new 0,0,x+id.size*x*2,x*4
c.step = 12
d = [
lambda {|i| c.line x+i*2*x,x,2*x+i*2*x,x },