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
brew tap caskroom/cask | |
brew install brew-cask | |
brew cask install java |
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
deferred = $q.defer() | |
deferred.resolve({data: []}) | |
deferred.promise |
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
sudo gem install -n /usr/local/bin GEMNAME |
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
"use strict" | |
angular.module("utils.maxlength", []).directive "rsMaxlength", -> | |
restrict: "A" | |
require: "ngModel" | |
scope: | |
model: "=ngModel" | |
link: (scope, elem, attrs, ctrl) -> | |
attrs.$set "ngTrim", "false" | |
maxlength = parseInt(attrs.rsMaxlength, 10) |
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 MyApp extends Application { | |
private MyStateManager myStateManager = new MyStateManager(); | |
public MyStateManager getStateManager(){ | |
return myStateManager ; | |
} | |
} | |
class MyStateManager { |
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
docker-ip() { | |
boot2docker ip 2> /dev/null | |
} | |
echo $(docker-ip) docker | sudo tee -a /etc/hosts |
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
# redefine prompt_context for hiding user@hostname | |
prompt_context () { } |
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
app.use(function (req, res, next) { | |
// Website you wish to allow to connect | |
res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000'); | |
// Request methods you wish to allow | |
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); | |
// Request headers you wish to allow | |
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type'); |
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
%USERPROFILE%\.babun\cygwin\bin\bash.exe --login -i |
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
# Added zsh shell. | |
sudo apt-get install zsh | |
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh | |
sudo chsh -s /bin/zsh vagrant | |
zsh |