- see https://gist.github.com/machty/5723945 for the latest API (unlikely to change from now on)
- latest Ember build: https://machty.s3.amazonaws.com/ember/ember-async-routing-10.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* `Ember.MergedArray` is an array that observes multiple other arrays (called source arrays) for changes and includes | |
* all items from all source arrays in an efficient way. | |
* | |
* Usage: | |
* | |
* ```javascript | |
* var obj = Ember.Object.create({ | |
* people: [ | |
* { |
git branch -m master legacy git branch -m dev master
Set default branch in admin not master.
Delete the remote master branch on GitHub.
git push origin :master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GeekTool script to display status of websites you monitor. See http://projects.tynsoe.org/en/geektool/ | |
# Displays name of site if there's no error. Adds "!!!!" in front of unavailable site. | |
# Sends an email when a site is unavailable. | |
ARRAY=( | |
'awebsite.com' | |
'anotherwebsite.com' | |
'onemore.com' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
affiliate_id = "nathos-20" | |
ARGF.each do |f| | |
f = f.scan(/(?:http:\/\/(?:www\.){0,1}amazon\.com(?:\/.*){0,1}(?:\/dp\/|\/gp\/product\/))(.*?)(?:\/.*|$)/i) | |
shorturl = "http://www.amazon.com/dp/" + f.to_s + "/ref=nosim/" + affiliate_id | |
if shorturl == ("http://www.amazon.com/dp//ref=nosim/" + affiliate_id) | |
puts "Not a valid Amazon URL" | |
else | |
puts shorturl | |
end |