Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Lionel Chan chaoszcat

🎯
Focusing
View GitHub Profile
@chaoszcat
chaoszcat / data.json
Last active Sep 20, 2019
Avenir Shard Movements
View data.json
{
"version": 3,
"event_rule": "https://community.ingress.com/en/discussion/4045/avenir-shard-event/",
"last_update": "2019-09-20T09:09:00+08:00",
"event_start": "2019-09-18T05:00:00+08:00",
"event_end": "2019-10-01T00:00:00+08:00",
"current_jump_number": 10,
"next_jump_number": 11,
"shard_count": 13,
"target_count": 4,
View gist:5325115
function shadeColor($color, $percent) {
$num = base_convert(substr($color, 1), 16, 10);
$amt = round(2.55 * $percent);
$r = ($num >> 16) + $amt;
$b = ($num >> 8 & 0x00ff) + $amt;
$g = ($num & 0x0000ff) + $amt;
return '#'.substr(base_convert(0x1000000 + ($r<255?$r<1?0:$r:255)*0x10000 + ($b<255?$b<1?0:$b:255)*0x100 + ($g<255?$g<1?0:$g:255), 10, 16), 1);
}
@chaoszcat
chaoszcat / BBExtra.js
Created Apr 9, 2012
BB Extra for Sencha Touch 1 to support click scrolling
View BBExtra.js
//Extra patch for BB devices to simulate scrolling
//Credit to
//http://resilientcoder.blogspot.com/2011/04/sencha-touch-scrolling-non-touch.html and
//http://pastebin.com/Mih4Ps12
window.BBScroller = function(evt, div, el) {
if (this.scroller.offsetBoundary.top === 0) {
this.scroller.updateBoundary();
}
var maxOffset = this.scroller.offsetBoundary[1] - 400;
var bottom = this.getHeight() + 50;
You can’t perform that action at this time.