Instantly share code, notes, and snippets.

View J


what sort of APIs would be most useful? Player/matches stats, other stuff?

Basic API endpoints for players, weapons, factions, characters, and leaderboards would be a great starting point - useful for building out fun dashboards, profiles, dynamic images, etc. Endpoints for matches, maps, gamemodes, etc. getting into the real gameplay data would be useful for more challenging neckbeardy stuff. I noted a few example endpoints and use cases below.

Any example of game APIs u like?

I don't have any examples for games APIs that I play && like && use, but Riot Games' API and Community APIs (WoW, Starcraft, Diablo) look great and are well-documented. If it doesn't have great documentation, it's not a great API IMHO.

View 2legit2quit.txt
<html><head><title>2legit2quit</title></head><body><img src="" width="100%" height="100%"></body></html>

ADDON-NAME is an add-on for providing functionality X.

Adding functionality X to an application provides benefits X, Y and Z. [[Sell the benefits here! Don't skimp - developers have many options these days.]]

ADDON-NAME is accessible via an API and has supported client libraries for [[Java|Ruby|Python|Node.js|Clojure|Scala]]*.

Provisioning the add-on

ADDON-NAME can be attached to a Heroku application via the CLI:


The Standard Industrial Classification (abbreviated SIC) is a system for classifying industries by a four-digit code. Established in the United States in 1937, it is used by government agencies to classify industry areas. The SIC system is also used by agencies in other countries, e.g. by the United Kingdom's Companies House.

The SIC codes can be grouped into progressively broader industry classifications: industry group, major group and division. The first 3 digits of the SIC code indicate the industry group, and the first 2 digits indicate the major group. Each division encompasses a range of SIC codes. From 01 till 091 is the division Agriculture, Forestry and Fishing, from 10 till 179 is the division Mining, from 20 till 39 is the division Manufacturing, from 40 till 497 is the division Transportation, Communications, Electric, Gas and Sanitary service, from 50 till 519 is the division Wholesale Trade, from 52 till 599 is the division Retail Trade, from 60 till 679 is the division Fincance, Insurance

View rbconf.rb
require 'mechanize'
require 'twilio-ruby'
# Need to save a file with the html body to refer to later in the script since this is run
# in a cron job.
if File.exists?("rubyregistration.html")
body ="rubyregistration.html")
else"rubyregistration.html","w+") do |file|
View gist:3200294

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.