Skip to content

Instantly share code, notes, and snippets.

View whitehat101's full-sized avatar

Jeremy whitehat101

View GitHub Profile
@whitehat101
whitehat101 / control.lua
Created September 17, 2015 07:50
Rewrite of factorio mod turrets-range 1.1.1
require "defines"
global.active_turret_range_entities = {}
global.nearby_turret_map = {}
local function draw_turret_range(turret_type, sx, sy, r)
-- what is this voodoo?
local function round(x)
return x + 0.5 - (x + 0.5) % 1
end
@whitehat101
whitehat101 / client.js.coffee
Last active August 29, 2015 14:20
Basic debugging callbacks for HTML Service Workers
console.log navigator.serviceWorker.controller
navigator.serviceWorker.register('/worker.js') #, scope: 'path'
.then (reg) ->
console.log '◕‿◕', reg
, (err) ->
console.log 'ಠ_ಠ', err
# credit: https://github.com/GoogleChrome/samples/blob/gh-pages/service-worker/post-message/index.html
@sendMessage = (message) ->
@whitehat101
whitehat101 / main.php
Created March 25, 2015 05:54
SQL Benchmarks with PHP / Ruckusing Migrations
<?php
class MicroQuery
{
public static function configure($configuration)
{
// configure ruckusing db adapter
self::$adapter = null;
}