Retracked wraps your event recording system in an API optimized for React components.
Somewhere early in execution:
# set the recording function
retracked.setup(myTrackingSystem.push);
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/iconsets/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../paper-checkbox/paper-checkbox.html"> | |
<polymer-element name="my-element"> | |
<template> |
# Hard-code DNS resolver to Google's servers | |
# | |
# *Setup* | |
# # download this file while DNS is working | |
# curl https://gist.github.com/turadg/7876784/raw --output ~/google-resolv.conf | |
# # replace your old DNS resolver | |
# sudo cp /etc/resolv.conf /etc/resolv.conf.auto && sudo mv ~/google-resolv.conf /etc/resolv.conf | |
# # make it uneditable so Vagrant doesn't clobber it | |
# sudo chattr +i /etc/resolv.conf |
#!/usr/bin/env bash | |
# This script works after you've paired the Bluetooth devices with | |
# both the local and remote computer. Turning one off and the other on | |
# forces the devices to reconnect with the only computer that has BT on. | |
# Look up local SSH hosts with Bonjour using `dns-sd -B _ssh` | |
# You may want to set up an SSH keypair to log in without typing a password | |
REMOTE=Stone.local |
module MyApp | |
class Application < Rails::Application | |
require Rails.root + 'lib/custom_public_exceptions' | |
config.exceptions_app = CustomPublicExceptions.new Rails.public_path | |
end | |
end |
# Support for Rspec / Capybara subdomain integration testing | |
# Make sure this file is required by spec_helper.rb | |
# (e.g. save as spec/support/subdomains.rb) | |
def switch_to_subdomain(subdomain) | |
# lvh.me always resolves to 127.0.0.1 | |
hostname = subdomain ? "#{subdomain}.lvh.me" : "lvh.me" | |
Capybara.app_host = "http://#{hostname}" | |
end |
# spec/support/poltergeist_screenshot_helper.rb | |
module PoltergeistScreenshotHelper | |
# FROM http://blog.jerodsanto.net/2012/12/capybara-and-poltergeist-snap/ | |
def snap!(options={}) | |
path = options.fetch :path, "~/.Trash" | |
file = options.fetch :file, "#{Time.now.to_i}.png" | |
full = options.fetch :full, true | |
path = File.expand_path path |
# usage _.levenshteinDistance("PART", "PARTY") or _("PART").levenshteinDistance("PARTY") | |
_.mixin | |
levenshtein : (str1, str2) -> | |
return str2.length if str1.length == 0 | |
distance = [] | |
for i in [0..str1.length] | |
distance[i] = [] | |
distance[i][0] = i |
#!/usr/bin/env sh | |
brew update | |
# upgrade any that were already installed | |
brew upgrade rbenv ruby-build readline openssl | |
# install what's missing | |
brew install rbenv ruby-build readline openssl |
-- based on post by iNik: http://forums.omnigroup.com/showthread.php?p=101947#post101947 | |
global theTitle, theTaskNote | |
set theTaskNote to "" | |
tell application "Google Chrome" | |
-- activate | |
tell window 1 to tell active tab | |