This file contains 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
# Store the current Git branch | |
branch_name=$(git symbolic-ref -q HEAD) | |
branch_name=${branch_name##refs/heads/} | |
branch_name=${branch_name:-HEAD} | |
# Do something | |
git checkout master | |
git merge $branch_name | |
git checkout $branch_name |
This file contains 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
// Module `myApp` is already created. We were unaware that we needed | |
// the `anotherModuleDependency` module when we created `myApp`. The | |
// below code allows us to add `anotherModuleDependency` to the | |
// `myApp` dependency list. | |
angular.module('myApp').requires.push.apply( | |
angular.module('myApp').requires, ['anotherModuleDependency'] | |
); |
This file contains 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
var app = angular.module('app', []); | |
app.provider('MyConfig', function () { | |
var config = { | |
foo: 'bar' | |
}; | |
return { | |
settings: function (userConfig) { | |
angular.extend(config, userConfig); | |
}, $get: function () { |
This file contains 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
export PATH=vendor/bin:$PATH | |
export PATH=Users/mikemclin/bin:$PATH | |
export PATH=/.composer/vendor/bin:$PATH | |
export PATH=node_modules/.bin:$PATH | |
export EDITOR='subl -w' | |
alias artisan='php artisan' | |
function homestead() { |
This file contains 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
(function(window, document, $, undefined){ | |
var self = $.Module = {}; | |
self.init = function() { | |
this.cache(); | |
}; |
This file contains 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
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/subl |