Skip to content

Instantly share code, notes, and snippets.

View JakeH's full-sized avatar

Jake JakeH

  • Japan
View GitHub Profile
class Bitmap
def gradient_fill_rect_midband(x, y, width, height, color1, color2, vertical=false)
w = width * (vertical ? 1 : 0.5)
h = height * (vertical ? 0.5 : 1)
x1 = x
x2 = vertical ? x : x + w -1
y1 = y
y2 = vertical ? y + h - 1 : y
@JakeH
JakeH / marketTools.js
Created January 3, 2014 01:59
Steam Market helper tools. For use on an individual item's listing page.
function getTransactionHistorySinceDaysAgo(daysAgo){
var utcNow = (new Date()).getTime();
var then = utcNow - (86400000 * daysAgo);
return getTransactionHistoryInRange(utcNow, then);
}
function getTransactionHistoryInRange(fromDate, toDate)
{