TODO: Write a project description
TODO: Describe the installation process
| function Car( model, year, miles ) { | |
| this.model = model; | |
| this.year = year; | |
| this.miles = miles; | |
| } | |
| Car.prototype.toString = function() { | |
| return `${this.model} has done ${this.miles} miles` | |
| } | 
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| $SECRET = ENV['SECRET'] | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| config.vm.box = "ubuntu/trusty32" | |
| config.vm.synced_folder "app", "/home/vagrant/app" | |
| config.vm.provision "shell", :run => "always", env: { | 
| git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d | 
| .parent { | |
| perspective: 1000px; | |
| perspective-origin: 50% 0px; | |
| position: relative; | |
| } | |
| .child { | |
| transform: scale(0.9) rotateY(20deg) skewY(10deg); | |
| } | 
| // Method for returning an array with unique values. | |
| // [1,2,3,3,3,3].unique() => returns [1,2,3] | |
| Array.prototype.unique = function() { | |
| // Set() objects are collections of values. You can iterate through the elements of a set in insertion order. | |
| // A value in the Set may only occur once; it is unique in the Set's collection. | |
| // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set | |
| // Use the spread operator to transform a set into an Array. | |
| // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator | 
| // Method for returning an array with unique values. | |
| // [1,2,3,3,3,3].unique() => returns [1,2,3] | |
| Array.prototype.unique = function() { | |
| // Set() objects are collections of values. You can iterate through the elements of a set in insertion order. | |
| // A value in the Set may only occur once; it is unique in the Set's collection. | |
| // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set | |
| // Use the spread operator to transform a set into an Array. | |
| // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator | 
| * { background-color: rgba(255,0,0,.2); } | |
| * * { background-color: rgba(0,255,0,.2); } | |
| * * * { background-color: rgba(0,0,255,.2); } | |
| * * * * { background-color: rgba(255,0,255,.2); } | |
| * * * * * { background-color: rgba(0,255,255,.2); } | |
| * * * * * * { background-color: rgba(255,255,0,.2); } | 
git diff --name-only | uniq | xargs mvim
When git encounters a merge conflict, e.g. during a rebase, it drops you back into the shell with a dirty working directory. I like this one-liner for opening all files with a merge conflict in MacVim.
Once you're in Vim, you can then switch between the files with :n and :prev, or another favourite: :w | n (save current file and open the next command line-supplied file).
UPDATE: see below for a version that works with real terminal commands.
| function logEvent(console_message) { | |
| var now = new Date(); | |
| var nowUTC = now.toUTCString() | |
| console.log(console_message + ' : ' + nowUTC); | |
| } |