Skip to content

Instantly share code, notes, and snippets.

View genotrance's full-sized avatar

genotrance genotrance

View GitHub Profile
@genotrance
genotrance / kmrb.ps1
Last active July 11, 2024 14:35
Komorebi script to save/load window state
# Powershell script to save and load komorebi window state
#
# Usage:
# .\kmrb.ps1 = load window state for current monitor config if previously saved
# -config name = load window state from specified config name
# -save = save current window state for current monitor config
# -save -config name = save current window state to specified config name
# -dbg = show komorebic commands invoked
param (
@genotrance
genotrance / yara.nim
Last active April 8, 2022 13:28
Nim wrapper for libyara using nimterop
# nim c -d:yaraGit yara.nim
# nim c -d:yaraGit -d:yaraStatic yara.nim
import os
import nimterop/[build, cimport]
const
baseDir = getProjectCacheDir("nimyara")
@genotrance
genotrance / flecs.nim
Last active July 6, 2024 06:26
Nim wrapper for flecs using nimterop
# nim c -d:flecsGit -r flecs.nim
import os
import nimterop/[cimport, build]
const
baseDir = getProjectCacheDir("nimflecs")
getHeader(
@genotrance
genotrance / meow.nim
Created August 7, 2020 21:45
Nim wrapper for meow hash using nimterop
import strutils
import nimterop/[build, cimport]
const
baseDir = getProjectCacheDir("meow")
static:
gitPull(
"https://github.com/cmuratori/meow_hash",
@genotrance
genotrance / freetype.nim
Created July 13, 2020 21:18
Nim wrapper for freetype using nimterop
import nimterop/cimport
const
baseDir = "/usr/include/freetype2"
cDefine("FT_UInt32", "unsigned int32")
cIncludeDir(baseDir)
cImport(
filename = "ft.h",
recurse = true,
@genotrance
genotrance / sciter.nim
Last active July 13, 2020 03:38
Nim wrapper for sciter using nimterop
import nimterop/[cimport]
cIncludeDir(@[
"/usr/include/gtk-3.0",
"/usr/include/glib-2.0",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"/usr/include/pango-1.0",
"/usr/include/cairo",
"/usr/include/gdk-pixbuf-2.0",
"/usr/include/atk-1.0"
@genotrance
genotrance / pkcs7.nim
Created July 12, 2020 18:34
Nim wrapper for pkcs7 using nimterop
# nim c -d:FLAGS pkcs.nim
#
# FLAGS
# -d:pkcs7Std | -d:pkcs7Conan | -d:pkcs7JBB
# -d:pkcs7Static
import strutils
import nimterop/[build, cimport]
@genotrance
genotrance / gtk3.nim
Last active July 3, 2020 21:12
Nim wrapper for gtk+-3.0 using nimterop
import nimterop/cimport
cPlugin:
import strutils
proc onSymbol(sym: var Symbol) {.exportc, dynlib.} =
# Get rid of some problematic symbols
if sym.name.contains("CSET"):
sym.name = ""
else:
@genotrance
genotrance / tensorflow.nim
Created July 3, 2020 06:42
Nim wrapper for tensorflow using nimterop
# nim c -d:FLAGS tensorflow.nim
#
# FLAGS
# -d:capiDL
# -d:capiSetVer=
import os
import nimterop/[build, cimport]
@genotrance
genotrance / quickjs.nim
Last active July 15, 2020 16:57
Nim wrapper for quickjs using nimterop
# nim c -d:FLAGS quickjs.nim
#
# FLAGS
# -d:quickjsGit
# -d:quickjsSetVer=
# -d:quickjsStatic
import os
import nimterop/[build, cimport]