Skip to content

Instantly share code, notes, and snippets.

View oderwat's full-sized avatar
💭
Go da Lang...

Hans Raaf oderwat

💭
Go da Lang...
View GitHub Profile
@oderwat
oderwat / strAccessObj.nim
Last active March 16, 2020 15:06
Access Objects in Nim by strings for fields (wrapper automatisation)
import macros
type Foo = object
a: int
b: int
c: float
#[
dumpTree:
@oderwat
oderwat / vsc-runner
Last active July 14, 2016 20:16
Little helper script for using Nim with "runner" extension in Visual Studio Code
#!/bin/bash
if [ -z "$1" ]; then
echo "No file given! You may need to save first!"
exit 5
fi
cd `dirname "$1"`
CMD="c --verbosity:0 --hints:off --parallelBuild:1 "
FULL="`basename "$1"`"
@oderwat
oderwat / Checkbox Demo
Created July 1, 2016 09:15
Checkbox Demo
To Do List:
* [x] Feature A
* [ ] Feature B
* [x] Feature C
* [ ] Feature D
@oderwat
oderwat / github-markdown.css
Created July 14, 2016 20:26
GitHub Style formatted markdown in VSCode
body { background-color: white; }
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiu
@oderwat
oderwat / Phone Words II.swift
Last active November 6, 2016 16:55 — forked from erica/Phone Words II.swift
Phone Words II for Swift 3.0.1
import Cocoa
// Missing isWord
func isWord(string: String) -> Bool {
if let _ = Int(string) { return false }
let range = NSSpellChecker.shared().checkSpelling(of: string, startingAt: 0)
return range.location == NSNotFound
}
/*:
@oderwat
oderwat / anet_flash_de.markdown
Created February 15, 2017 15:37
Anet A8 Firmware am Mac kompilieren und flashen
@oderwat
oderwat / spiderarc
Last active August 23, 2017 21:34
Script for single archival of locations with SpiderOakONE which stops and starts the application as needed
#!/usr/bin/env osascript
#
# Script for easy archival of single targets while the
# SpiderOakONE Application is running.
#
# Written by H.Raaf (c) 2017 / MIT LICENSE
#
# https://gist.github.com/oderwat/6b790effbf955300aaeaa76a462e6e2a
#
# This script is meant to be saved to ~/bin or /usr/local/bin as spiderarc
@oderwat
oderwat / soabb.js
Created September 26, 2017 12:01
Spiegel Online AdBlocker-Blocker
// ==UserScript==
// @name Spiegel Online AddBlocker removal
// @namespace http://oderwat.de/soabrem
// @version 0.1
// @description I hate adblocker
// @author H. Raaf
// @match www.spiegel.de/*
// @grant none
// @run-at document-start
// ==/UserScript==
@oderwat
oderwat / BearFocus.scpt
Created October 22, 2017 11:50
Little Script which tells Bear to focus the window, reset it's state and place the cursor in the search field
tell application "System Events" to tell process "Bear"
set frontmost to true
-- show all notes
click menu item 1 of menu 1 of menu bar item 5 of menu bar 1
-- search in (all) notes
click menu item 1 of menu 1 of menu item 22 of menu 1 of menu bar item 4 of menu bar 1
tell application "System Events"
-- press delete to clear the search field
key code 51
-- press tab to switch to note list
Verifying my Blockstack ID is secured with the address 1BF3BhUZaQeRc5jjW1TczSDpvnsNdyVDGg https://explorer.blockstack.org/address/1BF3BhUZaQeRc5jjW1TczSDpvnsNdyVDGg