Skip to content

Instantly share code, notes, and snippets.

View technoweenie's full-sized avatar
👾
beep boop

technoweenie

👾
beep boop
View GitHub Profile
@marcel
marcel / gist:2100703
Created March 19, 2012 07:24
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
# compl1.rb - Redis autocomplete example
# download female-names.txt from http://antirez.com/misc/female-names.txt
require 'rubygems'
require 'redis'
r = Redis.new
# Create the completion sorted set
if !r.exists(:compl)
@technoweenie
technoweenie / riak.coffee
Created July 24, 2010 07:06
very quick riak protobuf example in node.js
sys: require 'sys'
net: require 'net'
fs: require 'fs'
Buffer: require('buffer').Buffer
Schema: require('protobuf_for_node').Schema
schema: new Schema(fs.readFileSync('riak.desc'))
types: ['RpbErrorResp', 'RpbPingReq', 'RpbPingResp', 'RpbGetClientIdReq',
'RpbGetClientIdResp', 'RpbSetClientIdReq', 'RpbSetClientIdResp',
'RpbGetServerInfoReq', 'RpbGetServerInfoResp', 'RpbGetReq', 'RpbGetResp']
@technoweenie
technoweenie / guess_number.rb
Created July 23, 2010 06:43
silly 'guess the number' game using shoes
Shoes.app do
def answer(message)
@results.prepend { para(message) }
end
limit = 20
magic_number = rand limit
tries = 0
para 'guess the number'
guess = edit_line
@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access: