This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| #Deploy and rollback on Heroku in staging and production | |
| task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| namespace :deploy do | |
| PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
| STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
| task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
| task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] | 
| /*! Cross-browser-compatible setZeroTimeout | |
| * | |
| * I took the original setZeroTimeout and made it cross-browser-compatible, using setTimeout(fn, 0) as a fallback in case postMessage is not supported. | |
| * Mathias Bynens <http://mathiasbynens.be/> | |
| * See <http://mathiasbynens.be/notes/settimeout-onload> | |
| * | |
| * Copyright statement below: | |
| * | |
| * See <http://dbaron.org/log/20100309-faster-timeouts> | |
| * By L. David Baron <dbaron@dbaron.org>, 2010-03-07, 2010-03-09 | 
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| Steps: | |
| 0. Checkout your git repo from the server (I use /var/www/carbonite) | |
| 1. Upload both of these files to the same directory on your server | |
| 2. chmod +x restart_node.sh | |
| 3. nohup node github_post_commit.js 2>&1 >> github_post_commit.log & | |
| 4. In the github admin for your repo, set a post commit hook to the url http://<your host>:8080/ | |
| 5. Make a commit to your repo | |
| 6. Point a browser at http://<your host>:8080/ and you should see the commit | 
| # This program is free software. It comes without any warranty, to | |
| # the extent permitted by applicable law. You can redistribute it | |
| # and/or modify it under the terms of the Do What The Fuck You Want | |
| # To Public License, Version 2, as published by Sam Hocevar. See | |
| # http://sam.zoy.org/wtfpl/COPYING for more details. | |
| set :application, "nodeapp" | |
| set :scm, :git | |
| set :repository, "git://github.com:hogehoge/foobar.git" | |
| set :branch, "master" | 
| //+------------------------------------------------------------------+ | |
| //| Automated Trend Lines.mq4 | | |
| //| Ryan Sheehy, CurrencySecrets.com | | |
| //| http://www.currencysecrets.com | | |
| //+------------------------------------------------------------------+ | |
| #property copyright "Ryan Sheehy, CurrencySecrets.com" | |
| #property link "http://www.currencysecrets.com" | |
| /* | |
| * This script automates the generation and plotting of sloping trend | 
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx | 
Mirrors: standalone servers with complete copy of npm registry
Proxies: proxy to the database (couchdb) of npm registry, if only the npm registry server fails but the db works
## HowTo See this gist: https://gist.github.com/3331671
(+) means server is self updating (pulls newest stuff from offical registry when back online again)
| sudo launchctl stop com.apple.audio.coreaudiod |