| ⌘T | go to file | 
| ⌘⌃P | go to project | 
| ⌘R | go to methods | 
| ⌃G | go to line | 
| ⌘KB | toggle side bar | 
| ⌘⇧P | command prompt | 
  
    
      This file contains hidden or 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/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 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | //+------------------------------------------------------------------+ | |
| //| 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 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # 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" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | 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 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
  
    
      This file contains hidden or 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
    
  
  
    
  | /*! 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 file contains hidden or 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
    
  
  
    
  | #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] | 
NewerOlder