This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ME3 Manifest Percentages | |
// @namespace frostwyrm | |
// @include http://social.bioware.com/n7hq/home/inventory/?name=*&platform=* | |
// @include http://social.bioware.com/n7hq/home/characters/?name=*&platform=* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js | |
// ==/UserScript== | |
var percentageize = function (type) { | |
var denom = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class RPNError < ArgumentError | |
def initialize sym, stack | |
args = stack.reverse.map.with_index {|el, i| | |
"#{el}.#{sym} (#{i} for #{el.method(sym).arity})" | |
}.join(', ') | |
super "wrong number of arguments: #{args}" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class XTEA | |
attr_reader :key, :key_o | |
MASK = 0xFFFFFFFF | |
DELTA = 0x9E3779B9 | |
def initialize(key=rand(2**128), n=32) | |
@key_o = key | |
@n = n | |