Skip to content

Instantly share code, notes, and snippets.

View koenbok's full-sized avatar

Koen Bok koenbok

View GitHub Profile
@koenbok
koenbok / policy.json
Last active August 29, 2015 14:04
AWS Cactus User Policy
{
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:*",
@koenbok
koenbok / server.command
Created August 2, 2014 11:48
Web Server for Framer
#!/usr/bin/env python
"""
Copyright (c) 2014 Koen Bok / Podium BV / framerjs.com
Small web server script that you can drop in and run from every Framer Studio
project to serve it to the browser over http. This is great if you want to avoid
same origin policy errors in the browser, but also nice to preview it on another
device connected to the same network.
@koenbok
koenbok / Error
Last active August 29, 2015 14:05
08/08/14 00:22:51,000 kernel[0]: Sandbox: com.apple.WebKit(4702) deny file-issue-extension <path>/my-script.js
@koenbok
koenbok / Test.coffee
Last active August 29, 2015 14:06
Test
# Welcome to Framer
# This is all CoffeeScript. Learn here: http://framerjs.com/learn/coffeescript
# Drop an image on the preview screen to create an image layer, or use the generator to import assets from Sketch or Photoshop
layer = new Layer
layer.html = "HELLO"
layer = new Layer
window.onmousemove = (event) ->
debounce 0.5, -> print("HA!")
@koenbok
koenbok / CustomDevide.coffee
Created October 20, 2014 09:34
Custom Framer Device
Framer.Device.Devices["my-device"] =
name: "My Device"
deviceType: "mobile"
deviceImage: "my-device.png"
deviceImageWidth: 472
deviceImageHeight: 806
screenWidth: 320
screenHeight: 400
Utils.globalLayers = (importedLayers) ->
for layerName, layer of importedLayers
# Replace all whitespace in layer names
layerName = layerName.replace(/\s/g,"")
# Check if there are global variables with the same name
if window.hasOwnProperty(layerName) and not window.Framer._globalWarningGiven
print "Warning: Cannot make layer '#{layerName}' a global, an variable with that name already exists"
print "Hi I am an example"
layer = new Layer
@koenbok
koenbok / test.coffee
Created December 13, 2014 20:12
Autocomplete
###
look these words now autocomplete alpha beta gamma test
###