Skip to content

Instantly share code, notes, and snippets.

View noahm's full-sized avatar

Noah Manneschmidt noahm

View GitHub Profile
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :login
t.string :hashed_password
t.string :salt
t.timestamps
end
end
Rails 3 doesn't officially support Ruby 1.9.1 since recent stable
releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2
before Rails 3 is released!
You're running
ruby 1.9.1p129 (2009-05-12 revision 23412) [x86_64-linux]
/usr/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:32: warning: already initialized constant RAKEVERSION
/usr/ruby1.9.1/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
@noahm
noahm / case143008-game2.json
Created September 30, 2011 05:46
League of Legends Tribunal JSON Format from: /case/143008/get-game/2
{
"gameid":"000000000dc4c26e",
"gamedate":"2011-10-14",
"summoner":"Gunbustah",
"champion":"http:\/\/www.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/champion\/icons\/96.jpg",
"champion_name":"Kog'Maw",
"items":[
{
"name":"Berserker's Greaves",
"parents":[
@noahm
noahm / fiddle.response.json
Created October 23, 2011 18:37
This is Game 1 sample response for the Tribunal Mobile app
{"gameid":"000000000c82867d","gamedate":"2011-09-16","summoner":"Gunbustah","champion":"http:\/\/www.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/champion\/icons\/63.jpg","champion_name":"Brand","items":[{"name":"Doran's Ring","parents":[],"price":475,"tags":["mana_regen","spell_damage","health"],"icon":"http:\/\/na.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/1056.gif","id":1056,"description":"+100 Health +5 Mana Regen per 5 sec +15 Ability Power","children":[],"url":"\/items#1056","tooltip_type":"item","max_width":1,"total_price":475},{"name":"Sorcerer's Shoes","parents":[],"price":750,"tags":["movement"],"icon":"http:\/\/na.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/3020.gif","id":3020,"description":"+20 Magic Penetration UNIQUE Passive: Enhanced Movement 2","children":[{"name":"Boots of Speed","price":350,"description":"UNIQUE Passive: Enhanced Movement 1","icon":"\/sites\/default\/files\/game_data\/1.0
@noahm
noahm / fiddle.response.json
Created October 23, 2011 18:40
This is Game 2 sample response for the Tribunal Mobile app
{"gameid":"000000000dc4c26e","gamedate":"2011-10-14","summoner":"Gunbustah","champion":"http:\/\/www.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/champion\/icons\/96.jpg","champion_name":"Kog'Maw","items":[{"name":"Berserker's Greaves","parents":[],"price":150,"tags":["attack_speed","movement"],"icon":"http:\/\/na.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/3006.gif","id":3006,"description":" +25% Attack Speed UNIQUE Passive: Enhanced Movement 2.","children":[{"name":"Boots of Speed","price":350,"description":"UNIQUE Passive: Enhanced Movement 1","icon":"\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/1001.gif","url":"\/items#1001","children":[]},{"name":"Dagger","price":420,"description":"+15% Attack Speed","icon":"\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/1042.gif","url":"\/items#1042","children":[]}],"url":"\/items#3006","tooltip_type":"item","max_width":2,"total_price":920},{"name":"Malady","parents":[],"p
@noahm
noahm / fiddle.response.json
Created October 23, 2011 18:41
This is Game 3 sample response for the Tribunal Mobile app
{"gameid":"000000000df559a1","gamedate":"2011-10-18","summoner":"Gunbustah","champion":"http:\/\/www.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/champion\/icons\/18.jpg","champion_name":"Tristana","items":[{"name":"Berserker's Greaves","parents":[],"price":150,"tags":["attack_speed","movement"],"icon":"http:\/\/na.leagueoflegends.com\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/3006.gif","id":3006,"description":" +25% Attack Speed UNIQUE Passive: Enhanced Movement 2.","children":[{"name":"Boots of Speed","price":350,"description":"UNIQUE Passive: Enhanced Movement 1","icon":"\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/1001.gif","url":"\/items#1001","children":[]},{"name":"Dagger","price":420,"description":"+15% Attack Speed","icon":"\/sites\/default\/files\/game_data\/1.0.0.120\/content\/item\/1042.gif","url":"\/items#1042","children":[]}],"url":"\/items#3006","tooltip_type":"item","max_width":2,"total_price":920},{"name":"Infinity Edge","parent
@noahm
noahm / gist:2794438
Created May 26, 2012 16:04
This is the new game format for the 2012/05/25 Tribunal update
{"game_creation_time":"2012-05-21","game_mode":"Classic","game_type":"MATCHED_GAME","premade":0,"chat_log":[{"date":"5-22-12","time":"00:00:19","summoner_name":"Balaxita","sent_to":"Team1","message":"dmg wolves and leash blue pls","association_to_offender":"enemy","champion_name":"Warwick","name_change":0},{"date":"5-22-12","time":"00:01:28","summoner_name":"sto27","sent_to":"Team2","message":"sorry bout that","association_to_offender":"ally","champion_name":"Nautilus","name_change":0},{"date":"5-22-12","time":"00:01:34","summoner_name":"sto27","sent_to":"Team2","message":"i'll just start blue","association_to_offender":"ally","champion_name":"Nautilus","name_change":0},{"date":"5-22-12","time":"00:01:46","summoner_name":"Kreapn","sent_to":"Team2","message":"dont you always?","association_to_offender":"offender","champion_name":"Tristana","name_change":0},{"date":"5-22-12","time":"00:01:55","summoner_name":"sto27","sent_to":"Team2","message":"i usually do wolves first","association_to_offender":"ally","champi
@noahm
noahm / GWJignore.user.js
Last active December 15, 2015 14:09 — forked from DoggettCK/gist:1591307
Hides posts and quotes! Rewritten without the use of jQuery!
// ==UserScript==
// @namespace gamerswithjobs
// @name I Didn't Hear Anything
// @description Increases the number of potential Tannhauserings
// @version 1.2
// @match http://www.gamerswithjobs.com/node/*
// @grant none
// @run-at document-end
// @author Chris Doggett, Noah Manneschmidt
// ==/UserScript==
@noahm
noahm / gist:5687639
Created May 31, 2013 20:09
This is the new tribunal case JSON now that they have moved to sprited
{"game_creation_time":"2013-05-06","game_mode":"Classic","game_type":"MATCHED_GAME","premade":0,"chat_log":[{"date":"5-6-13","time":"00:00:17","summoner_name":null,"sent_to":"Team1","message":"how to win games","association_to_offender":"enemy","champion_name":"Nautilus","name_change":0},{"date":"5-6-13","time":"00:00:20","summoner_name":null,"sent_to":"Team1","message":"1. buy skins","association_to_offender":"enemy","champion_name":"Nautilus","name_change":0},{"date":"5-6-13","time":"00:00:22","summoner_name":null,"sent_to":"Team1","message":"TO INFINITY AND BEYOND","association_to_offender":"enemy","champion_name":"Varus","name_change":0},{"date":"5-6-13","time":"00:00:26","summoner_name":null,"sent_to":"Team1","message":"2. use your skins","association_to_offender":"enemy","champion_name":"Nautilus","name_change":0},{"date":"5-6-13","time":"00:00:31","summoner_name":null,"sent_to":"Team1","message":"Ay bro buy us a muru","association_to_offender":"enemy","champion_name":"Anivia","name_change":0},{"date":"
@noahm
noahm / html_notification_patch.js
Created August 14, 2013 19:32
Compatibility shim for chrome's desktop notification API, and lines to turn on notifications in Steam's web chat after they have been disabled following a page load
/*
* Patch in support for Google's draft webkit version of HTML notifications
* It seems that firefox doesn't currently support the iconUrl option.
* see the official spec at: http://www.w3.org/TR/2012/WD-notifications-20120614/#api
* and google's spec at: http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification
*/
window.webkitNotifications = {
requestPermission: function(callback){
Notification.requestPermission(callback);