Skip to content

Instantly share code, notes, and snippets.

View runeimp's full-sized avatar
💭
Working in Go as much as possible.

RuneImp runeimp

💭
Working in Go as much as possible.
View GitHub Profile
@runeimp
runeimp / bash
Last active March 25, 2021 02:31
Embedding Go's local Timezone Database
# Copy local Go Timezone DB to your project
$ cp "$(go env | grep -F GOROOT | cut -d\" -f2)/lib/time/zoneinfo.zip" .
# Reference main.go to embed the zip and reference that data
# -or-
# Just use the tzinfo.go for your base reference
@runeimp
runeimp / example.c
Created June 9, 2020 07:40
Gravity C Example
#include "gravity_compiler.h"
#include "gravity_macros.h"
#include "gravity_core.h"
#include "gravity_vm.h"
#define SOURCE "func main() {var a = 10; var b=20; return a + b}"
// error reporting callback called by both compiler or VM
static void report_error (gravity_vm *vm, error_type_t error_type,
const char *description, error_desc_t error_desc, void *xdata) {
@runeimp
runeimp / README.md
Created October 9, 2019 23:09
Go TypeOf Benchmark
@runeimp
runeimp / Justfile
Created June 30, 2018 04:22
Justfile error: Unknown start of token, etc. with just v0.3.12 on macOS High Sierra
BIN_VERSION = "$(grep -E '^__version__' my_script.py | cut -d"'" -f2 | cut -d\" -f2)"
# BIN_VERSION = "$(grep -E '^__version__' my_script.py | cut -d\' -f2 | cut -d\" -f2)"
# BIN_VERSION = "`grep -E '^__version__' my_script.py | cut -d"'" -f2 | cut -d\" -f2`"
# BIN_VERSION = "`grep -E '^__version__' my_script.py | cut -d\' -f2 | cut -d\" -f2`"
@runeimp
runeimp / code_block.doku
Created May 24, 2018 19:58
DokuWiki - JSON Code Block
====== Code Block Test ======
===== JSON =====
''%%json { "one": 2, "three": { "point_1": "point_2", "point_3": 3.4 }, "list": [ "one", "two", "three" ] }%%''
That was my JSON code block.
@runeimp
runeimp / code_block.md
Created May 24, 2018 19:42
Markdown - JSON Code Block

Code Block Test

JSON

{
    "one": 2,
 "three": {
@runeimp
runeimp / Justfile
Last active January 3, 2018 19:32
CRLF Justfile Example
#