Skip to content

Instantly share code, notes, and snippets.

View koenbok's full-sized avatar

Koen Bok koenbok

View GitHub Profile
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
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
@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
path = NSProcessInfo.processInfo().arguments()[0]
sketch = [COScript app:"Sketch Beta"]
pluginUrl = NSURL.fileURLWithPath(path + "/Framer.sketchplugin")
[[sketch delegate] runPluginAtURL:pluginUrl]
@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

@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 / CrashReport.txt
Created October 27, 2015 13:58
Framer Studio Crash
Incident Identifier: 5C6E5B98-F0A6-4129-B85A-EE5001CB6552
CrashReporter Key: 6B893A6D-B420-58C5-AEFE-C232A6A6C32C
Hardware Model: MacBookPro12,1
Process: Framer Studio [652]
Path: /Applications/Framer Studio.app/Contents/MacOS/Framer Studio
Identifier: com.motif.framer
Version: v44 (2469)
Code Type: X86-64
Parent Process: launchd [1]
@koenbok
koenbok / editors.m
Created September 21, 2015 08:59
Get Available Editors
- (NSArray *)availableEditors
{
NSArray *appNames = @[@"Sublime Text", @"Sublime Text 2", @"Espresso", @"Textmate", @"Coda", @"Chocolat"];
NSMutableArray *result = [[NSMutableArray alloc] init];
for (NSString *appName in appNames) {
NSString *appPath = [[NSWorkspace sharedWorkspace] fullPathForApplication:appName];
if (appPath)
# pragma mark Custom caret
- (void)drawInsertionPointInRect:(NSRect)aRect color:(NSColor *)aColor turnedOn:(BOOL)flag {
aRect.size.width = self.caretWidth;
[super drawInsertionPointInRect:aRect color:aColor turnedOn:flag];
}
// This is a hack to get the caret drawing to work. I know, I know.
- (void)setNeedsDisplayInRect:(NSRect)invalidRect {
invalidRect.size.width += self.caretWidth - 1;
{EventEmitter} = require "./EventEmitter"
###
top, right, bottom, left, centerX, centerY, center
###
calculateFrame = (layer, rules) ->
val = (rule) =>
value = rules[rule]