Skip to content

Instantly share code, notes, and snippets.

View koenbok's full-sized avatar

Koen Bok koenbok

View GitHub Profile
@koenbok
koenbok / gulpfile.coffee
Last active September 29, 2017 05:12
Wercker Git Versions
gulp.task "version", (callback) ->
async.series [
(cb) -> command("git rev-parse --abbrev-ref HEAD", cb) # branch
(cb) -> command("git describe --always --dirty", cb) # hash
(cb) -> command("git rev-list --count HEAD", cb) # build
], (err, results) ->
info =
branch: results[0]
@koenbok
koenbok / wercker-cli-mac.md
Last active December 15, 2015 12:28
Wercker CLI Install Mac

Wercker CLI / Docker Install Instructions for Mac

Step 1: Install Docker

Wercker builds on top of Docker containers. Containers are a simple and reliable way to distribute software across platforms. Docker is native on Linux, but on OSX it relies on a virtual Linux host, like VirtualBox.

The easies wat to install the Docker Toolbox, which contains everything you need is Brew: brew install Caskroom/cask/dockertoolbox. It will automatically install VirtualBox as a dependency.

Step 2: Install Wercker CLI Binary

path = NSProcessInfo.processInfo().arguments()[0]
sketch = [COScript app:"Sketch Beta"]
pluginUrl = NSURL.fileURLWithPath(path + "/Framer.sketchplugin")
[[sketch delegate] runPluginAtURL:pluginUrl]
@koenbok
koenbok / error.txt
Created January 1, 2016 12:24
Sketch Plugin Error
SyntaxError: Invalid flag supplied to RegExp constructor.
line: 5
sourceURL: /Users/koen/Library/Application Support/com.bohemiancoding.sketch3/Plugins/Untitled.sketchplugin
column: 26
01/01/16 23:09:40,573 Sketch Beta[3942]: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored.Please fix this problem.
01/01/16 23:09:40,573 Sketch Beta[3942]: clip: empty path.
01/01/16 23:09:40,574 Sketch Beta[3942]: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored.Please fix this problem.
01/01/16 23:09:40,574 Sketch Beta[3942]: CGContextAddLineToPoint: no current point.
01/01/16 23:09:40,574 Sketch Beta[3942]: CGContextAddLineToPoint: no current point.
01/01/16 23:09:40,574 Sketch Beta[3942]: CGContextAddLineToPoint: no current point.
01/01/16 23:09:40,574 Sketch Beta[3942]: CGContextAddLineToPoint: no current point.
01/01/16 23:09:40,574 Sketch Beta[3942]: CGContextClosePath: no current point.
01/01/16 23:09:40,574 Sketch Beta[3942]: Error: this application, or a library it uses, has passed an
Framer.CurrentContext.perspective = 0
plane = new Layer
width: 200
height: 200
rotationX: Math.random() * 360
rotationY: Math.random() * 360
rotationZ: Math.random() * 360
plane.originX = Math.random() * 1
logEventListeners = ->
return if window.__logEventListeners
window.__logEventListeners = true
addEventListener = Element::addEventListener
removeEventListener = Element::removeEventListener
Element::addEventListener = () ->
print "addEventListener", arguments[0], @
# Gesture events
Gestures = {}
# Tap
Gestures.Tap = "tap"
Gestures.TapStart = "tapstart"
Gestures.TapEnd = "tapend"
Gestures.DoubleTap = "doubletap"
# Force Tap
@koenbok
koenbok / programming.md
Created February 3, 2016 12:27
Programming Basics

Programming

Programming is hard because

  • Mix between English, logic and math.
  • It is very strict: tabs, spaces, commas and capitalization matters.
  • Errors can be hard to understand but often mean something simple.

Before we begin

# Listen to an edge swipe on Screen
Screen.on Events.EdgeSwipeTop, ->
...