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 / anet_flash_de.markdown
Created February 15, 2017 15:37
Anet A8 Firmware am Mac kompilieren und flashen
@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 / 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 / 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 / Spotify Track 2 Clipboard.scpt
Created March 16, 2013 13:05
Quick and Dirty "Fetch current running Title from Spotify to Clipboard" for usage as LaunchBar Action (can easily be modified for other Launchers)
try
tell application "Spotify"
set theTrack to name of the current track
set theArtist to artist of the current track
set theAlbum to album of the current track
set track_id to id of current track
end tell
set AppleScript's text item delimiters to ":"
set track_id to third text item of track_id
@oderwat
oderwat / aporia-hacked-to-osx.md
Created March 22, 2015 01:07
Hacking Aporia (Nim IDE) to work on Yosemite OS X with GTK 2 Quartz (no X11)

Aporia on OS X Yosemite (GTK+ 2.x)

"Don't try at home or don't blame me for lost hours of your life!"

See this Nim Forum Topic where this started.

Well I have a working Aporia version on my Yosemite OS X 10.10.2 from the new-suggest branch of the repository.

BUT the lengths I had to go to get this working are plastered with stuff I did not understand :)

#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@oderwat
oderwat / nimrun
Created March 4, 2015 22:34
nimrun (using my modified tcc with nim on osx)
#!/bin/bash
rm nim/nimcache/*
nim c -c --verbosity:0 -w:off --hints:off nim/ex1.nim
./tcc nim/nimstub.c -I/usr/local/lib/nim nim/nimcache/*.c -run
@oderwat
oderwat / update-all-nim-gtk3.sh
Created February 24, 2015 21:18
Simple script to clone / pull and install the Nim GTK+3 wrappers from Stefan Saleski
#!/bin/bash
if [ ! -d "nim-gtk3" ]; then
git clone git@github.com:StefanSalewski/nim-gtk3.git
fi
cd nim-gtk3 && git pull && nimble install -y && cd ..
if [ ! -d "nim-gdk3" ]; then
git clone git@github.com:StefanSalewski/nim-gdk3.git
fi