| ⌘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/bash | |
| ## in .bash_profile | |
| SSHAGENT=`which ssh-agent` | |
| SSHAGENTARGS="-s" | |
| if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then | |
| eval `$SSHAGENT $SSHAGENTARGS` | |
| trap "kill $SSH_AGENT_PID" 0 | |
| fi |
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
| Vagrant::Config.run do |config| | |
| # ... | |
| config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
| end |
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
| upstream app { | |
| server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name www.app.com; | |
| rewrite ^/(.*) http://app.com/$1 permanent; | |
| } | |
| server { |
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
| #!/usr/bin/env ruby | |
| # Usage: gitio URL [CODE] | |
| # | |
| # Turns a github.com URL | |
| # into a git.io URL | |
| # | |
| # Copies the git.io URL to your clipboard. | |
| url = ARGV[0] | |
| code = ARGV[1] |
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
| # configuration for osx clipboard support | |
| set-option -g default-command "reattach-to-user-namespace -l sh" |
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
| // Simple demo for feeding some random data to Pachube. | |
| // Based on pachube.pde 2011-07-08 <[email protected]> http://opensource.org/licenses/mit-license.php | |
| // Created by <[email protected]> | |
| // | |
| // See blog post at http://maniacbug.wordpress.com/2011/08/07/nanode/ | |
| // This has been tested with EtherCard rev 7752 | |
| // Get it from http://jeelabs.net/projects/11/wiki/EtherCard | |
| #include <EtherCard.h> |
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
| # encoding: UTF-8 | |
| Capistrano::Configuration.instance(:must_exist).load do | |
| namespace :rails do | |
| desc "Open the rails console on one of the remote servers" | |
| task :console, :roles => :app do | |
| hostname = find_servers_for_task(current_task).first | |
| exec "ssh -l #{user} #{hostname} -t 'source ~/.profile && #{current_path}/script/rails c #{rails_env}'" | |
| end | |
| end |
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
| class Forum | |
| include Mongoid::Document | |
| include Mongoid::Timestamps | |
| field :posts_count, :type => Integer, :default => 0 | |
| has_many_related :posts | |
| end |
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
| worker: QUEUE=* bundle exec rake environment resque:work | |
| scheduler: bundle exec rake environment resque:scheduler |