helper function for adding click-ish events for touch devices
addTap( elem, onTap, options );
// for example
var box = document.getElementById('box');
| CONFIG = { | |
| ## -- Rsync Deploy config -- ## | |
| # Be sure you have setup public / private key authentication | |
| :ssh_host => "user@hostname", # The hostname can be an alias in ~/.ssh/config | |
| :ssh_port => nil, # Default - use ~/.ssh/config | |
| :document_root => "/var/www", # Remote document root | |
| :rsync_delete => true, # Whether or not to delete remote files | |
| :deploy_default => "rsync", # Not used | |
| :restart_apache => nil, # Remote command to restart apache |
| # Include all rake files in the tasks directory | |
| Dir.glob('tasks/*.rake').each { |r| import r } | |
| # Read configuration from tasks/config.yaml | |
| require 'yaml' | |
| CONFIG = YAML.load_file('tasks/config.yaml')[ENV['env'] || 'development'] | |
| # Default utility functions available in all tasks | |
| def ok_failed(condition) | |
| if (condition) |
| # Adding git-specific info to prompt | |
| update_git_cwd() { | |
| if git status > /dev/null 2>&1 && local BRANCH=`git branch | grep '^*' | cut -c3-`; then | |
| if ! git status 2>/dev/null | grep 'working directory clean' > /dev/null 2>&1 ; then | |
| BRANCH="$BRANCH\033[31m*" | |
| fi | |
| PS1=`printf '[local:\W (\033[32m%s\033[0m)] \$ ' "$BRANCH"` | |
| else | |
| PS1='[local:\W ] \$ ' | |
| fi |
| if (typeof (AC) === "undefined") { | |
| AC = {} | |
| } | |
| AC.ImageReplacer = Class.create({ | |
| _defaultOptions: { | |
| listenToSwapView: true, | |
| filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
| filenameInsert: "_☃x", | |
| ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
| attribute: "data-hires", |
| /** | |
| * The sample usage of ECMA 5 Mozilla Features Implemented in V8 | |
| * https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 | |
| * You can use thease new feature of ECMA5 on Node.js as you like. | |
| * because there is no IE :) | |
| * Order is deferent form original wiki. | |
| * Sources are Checked on Node.js v0.5.0(unstable), v0.4.9(stable) | |
| * | |
| * you can execute this file. | |
| * $ node ecma5_on_v8.js |