Skip to content

Instantly share code, notes, and snippets.

View sparr's full-sized avatar

Clarence "Sparr" Risher sparr

  • Amazon
  • Whitinsville, MA, USA
View GitHub Profile
@sparr
sparr / get_TickRateMultiplier.MSIL
Created December 2, 2018 01:17
get_TickRateMultiplier IL
// Token: 0x06004343 RID: 17219 RVA: 0x001F8464 File Offset: 0x001F6864
.method public hidebysig specialname
instance float32 get_TickRateMultiplier () cil managed
{
// Header Size: 12 bytes
// Code Size: 172 (0xAC) bytes
// LocalVarSig Token: 0x1100113E RID: 4414
.maxstack 1
.locals init (
[0] valuetype Verse.TimeSpeed
@sparr
sparr / convert.rb
Created July 26, 2018 01:14
"interning empty string" when an empty string should have been caught
def convert(value)
case value
when Symbol, '' # can't intern an empty string
value
when String
value.intern
when true
:true
when false
:false
@sparr
sparr / read_entities.py
Created May 17, 2017 00:46
Factorio python lua data raw entities
#!/usr/bin/env python3
import os
import lupa
DATA_PATH = "/Users/crisher/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/data"
lua = lupa.LuaRuntime(unpack_returned_tuples=True)
def lua_run_file(file):
@sparr
sparr / Blueprint String
Created April 10, 2018 05:41
Factorio Blueprint Book Solar Alphabet (36x36)
0eNrt3VuvZrlxoOm/YtRVD0bbTQbJCFJX4z6fT+7zoGGUPIXpQsuSIJWMNhr6712SXTsT6M3FiM235MxSXNkuq0KZOxdXft8in/X+ry9+8tNff/WLX379s2/+7Cc///n/+OLH/+vDP/nVFz/+fz/6P3/7//v6z3/+s7/+x7/6+v//2Zc//e0/++avfvHVFz/+4i+//uU3v/72n/zoi599+Re//Qd//Z94KV/85kdffP2z/++r//nFj+tv/tuPvvjqZ998/c3XX/31mN/9H3/1Zz/79V/85Ktffvsf+PBv//ynX/7y5Rdf/uyr3478xc9/9e2/8/Of/fa/79s5L9V+9MVf/e5//uY3P/o/poh3Sn+a0rxT6tOU7pwyn4YM55DxNESdQ+RpiPmGPP5Ipm/G4x/O8s14vExqcf5myuMU5zVb2+MU5zVb9XFKi66f/uaYHl1Ab48Z0RX09hgNLqG3p1hwDb09ZQYX0dtTVmwVvTlESmwZvT2kxtbR20MkuI7entKC6+jtKT24jt6eMqLrqL45RqPr6O0xHy7dL//8z3/9F7/+6Zff/PyXb4yxP/7u4q1/PN6cNJ2TxnHSck5qp0mtOCfV46Tqm1SOg8Q3SI6Dmm9QPw7qvkF6HDSCq+zNK7JpcJW9PeWjW/Kvf/Krb7783b/5f/7Br+9+U2vze5rR9bEbtKLLYzOol+jq2A2q0cWxGyTBtbGb04JLYzenB1fGbs4ILozdHHVdi/M0xoJ/ccw3p8zg3xtvT/FezfX14rG3f1fDezmv06AaXam7QRJdqbtBLbpSd4N6dKXuBo3gSt3N0eBK3c2x4ErdzZnBlbqb47ys52GOOi/qevpBa/AL4JuLVYPf/94eEv369/bvJ/rt7+0pI3z3GZufr0bvPrtB4c/Ru0Ez9l3y7SEr9lXyzSFWgjeLze/IavBmsZsjwZvFbk4L3ix2c3rwZrGbM6I3i90gjd0s3h5isZvF20NmeIG2ze9pRRfoZtAs0QW6GxT9JribI8HLcDenBS/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@sparr
sparr / gist:ed2b30bd1a6b9a28321c9288d2744c9a
Created January 12, 2018 03:54
The last of Sparr's CDs
MMOGs:
Everquest - Disc 1/4 - EQ & Kunark
Everquest - Disc 2/4 - Velious & Luclin
Everquest - Disc 4/4 - LDoN & GoD
Everquest - Scars of Velious
Everquest - Ruins of Kunark
Everquest - Shadows of Luclin - Discs 1, 2, 3
Everquest - Planes of Power - Discs 1, 2, 3
Everquest - GamePlay Hobby Game Demo CD Disc #5
World of Warcraft - Discs 1,2,3,4,5
@sparr
sparr / dashboard.json
Created November 27, 2017 19:37
grafana weird target field
{
"rows": [
{
"panels": [
{
"datasource": "$awsAccount",
"targets": [
{
"dimensions": {
"LoadBalancerName": "$product-$environment-$role-01"
@sparr
sparr / clear_timers.js
Last active March 12, 2017 15:57
clear active timers in Javascript
for (handle of process._getActiveHandles()) {
// if (handle instanceof Timer) { // doesn't work because Timer isn't defined, even though handle.constructor.name=="Timer"
if ('_list' in handle) {
for (timername in handle._list) {
clearTimeout(handle._list[timername]);
}
}
}
local function key_in_tbl(key,tbl)
for k,v in pairs(tbl) do
if k == key then return true end
end
return false
end
local fluid_items = {}
for name,item in pairs(data.raw.item) do
@sparr
sparr / scopecount
Last active May 8, 2016 02:22
SublimeText theme gallery scope usage count
574 : string [std]
311 : source
278 : entity [std]
253 : keyword [std]
242 : comment [std]
236 : entity.name.tag
229 : constant [std]
212 : support.function [std]
209 : storage [std]
209 : entity.other.attribute-name