Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jinks
jinks / inserters2.lua
Created July 15, 2019 16:53
ShinyBobGFX inserters fix
if data.raw["inserter"]["green-inserter"] then
purpletier = "express"
greentier = "green"
end
if data.raw["inserter"]["turbo-inserter"] then
purpletier = "turbo"
greentier = "express"
end
if settings.startup["bobmods-logistics-inserteroverhaul"] then
@jinks
jinks / profile_jinksrare.cfg
Created December 24, 2018 23:06
Exploration profile for McJty's Lost Cities mod. - Somehwere between normal and rare...
# Configuration file
##########################################################################################################
# cities_jinksrare
#--------------------------------------------------------------------------------------------------------#
# Settings related to city generation for the jinksrare profile
##########################################################################################################
cities_jinksrare {
S:allowedBiomeFactors <
@jinks
jinks / twjson.go
Created August 19, 2017 22:51
simple Go to Rust port
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
// Variant A
switch (state) {
case 1:
digitalWrite(P1Out, LOW); digitalWrite(P2Out, LOW);
break;
case 2:
digitalWrite(P1Out, LOW); digitalWrite(P2Out, HIGH);
break;
case 3:
case 4:
/*
Controling 2 Vista 128BPT alarm panels from a single keyswitch input device. And controlling the LEDs that are attached to said device.
*/
// Pins
enum {
// Outputs
P1Out = 4,
P2Out = 5,

Keybase proof

I hereby claim:

  • I am jinks on github.
  • I am jinks (https://keybase.io/jinks) on keybase.
  • I have a public key whose fingerprint is 2ABF 44F0 30EC 0EBD C9FB 071F F07F C705 771D 5684

To claim this, I am signing this object:

@jinks
jinks / elapsed.lua
Created February 18, 2017 10:09
Lua (approx) elapsed Time calculation
function elapsed (datestring)
local pattern = "(%d+)-(%d+)-(%d+)T(%d+):(%d+):(%d+)Z"
local year,month,day,hour,min,sec = datestring:match(pattern)
local start = os.time({year = year, month = month, day = day, hour = hour, min = min, sec = sec, isdst = false })
local utcnow = os.time(os.date("!*t"))
local diff = utcnow-start
local years = math.floor(diff / 31557600)
local remainder = diff % 31557600
local months = math.floor(remainder / 2629800)
local remainder = diff % 2629800
Solar Panel Stats - EC/sec per Mass
======= Panels =======
OX-Stat-XL 100.00 ( FusTek )
Balka 400.00 ( Kosmos )
Salyut 240.00
TKS 280.00
OKEB-250 111.11 ( NFPP )
OKEB-125 100.00
KRK 1x4 116.67
@jinks
jinks / g15daemon.service
Created August 20, 2012 23:34
g15daemon unit file for systemd
[Unit]
Description=A daemon that makes it possible to use the G-Buttons and draw on the G15 LCD
[Service]
Type=forking
ExecStart=/usr/sbin/g15daemon
[Install]
WantedBy=multi-user.target