#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| javascript:(function() { | |
| if(!window.your_bookmarklet) { | |
| var doc = document, | |
| js = doc.createElement('script'); | |
| js.type = 'text/javascript'; | |
| js.src = 'loader.js'; | |
| js.async = true; |
| /* | |
| * Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
| * Better handling of scripts without supplied ids. | |
| * | |
| * N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
| */ | |
| (function(doc, script) { | |
| var js, | |
| fjs = doc.getElementsByTagName(script)[0], |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| (function (reqwest, Backbone) { | |
| var methodMap, getUrl; | |
| methodMap = { | |
| 'create': 'POST', | |
| 'update': 'PUT', | |
| 'delete': 'DELETE', | |
| 'read' : 'GET' | |
| }; | |
| getUrl = function(object) { |
| This playbook has been removed as it is now very outdated. |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| after "deploy", "deploy:cleanup" | |
| after "deploy:update_code", "composer:install" | |
| before "composer:install", "composer:copy_vendors" | |
| after "composer:install", "phpunit:run_tests" | |
| namespace :composer do | |
| desc "Copy vendors from previous release" | |
| task :copy_vendors, :except => { :no_release => true } do | |
| run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi" | |
| end |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| namespace :assets do | |
| task :check do | |
| root_dir = File.join(File.dirname(__FILE__),"..","..") | |
| assets_last_modified_at = Dir["#{root_dir}/app/assets/**/**"].map { |p| File.mtime(p) }.sort.last | |
| assets_last_compiled_at = Dir["#{root_dir}/public/assets/**/**"].map { |p| File.mtime(p) }.sort.last | |
| if assets_last_modified_at > assets_last_compiled_at | |
| fail "Assets need to precompiled; last asset modified at #{assets_last_modified_at}" | |
| end | |
| end |