2 USB drives > 2GB
- Grab the latest Ubuntu Desktop iso image
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| # /code/railsapp/app/assets/javascripts/thing/app.js.coffee | |
| #= require angular/templates | |
| angular.module("thing", ["app.templates"]).value("appName", "thing") |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
| # add this to your spec helper | |
| RSpec.configure do |config| | |
| config.treat_symbols_as_metadata_keys_with_true_values = true | |
| config.filter_run :focus => true | |
| config.run_all_when_everything_filtered = true | |
| end | |
| # and then use the :focus tag in your specs | |
| it "does something awesome", :focus do |
| [merge] | |
| keepBackup = false | |
| tool = custom | |
| [mergetool "custom"] | |
| cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED" | |
| keepTemporaries = false | |
| trustExitCode = false | |
| keepBackup = false |