Skip to content

Instantly share code, notes, and snippets.

View adamburmister's full-sized avatar

Adam Burmister adamburmister

View GitHub Profile
@adamburmister
adamburmister / JavaScriptSafeNavigation.md
Last active February 17, 2016 18:04 — forked from d-akara/JavaScriptSafeNavigation.md
JavaScript Safe Navigation

Experimental Safe JavaScript Navigation

Implemented using ES6 Proxies and Symbols

Suggestions for improvements welcome!

const NON_NAVIGABLE_TARGET = Symbol()

function safe(target) {
# TODO: include gems in package
require 'rubygems'
require 'growl'
require 'net/http'
require 'net/https'
require 'yajl/json_gem'
# TODO: Read from ~/.backchatio_notifier file
API_KEY="YOUR_API_KEY_HERE"
STREAM_SLUG="controlbox"
desc "Generate and deploy assets"
task :deploy_assets, :roles => :app do
# get the previous timestamp
old_timestamp = File.read("config/deploy_timestamp").to_i rescue 0
# generate timestamp into config/deploy_timestamp
timestamp = Time.now.to_i
File.open("config/deploy_timestamp", 'w') do |f|
f.write(timestamp)
end