Skip to content

Instantly share code, notes, and snippets.

View weslley39's full-sized avatar
🤘
Awesome

Weslley Neri weslley39

🤘
Awesome
View GitHub Profile
brew tap caskroom/cask
brew install brew-cask
brew cask install java
deferred = $q.defer()
deferred.resolve({data: []})
deferred.promise
@weslley39
weslley39 / install ruby gems
Created February 18, 2016 11:37
install ruby gems
sudo gem install -n /usr/local/bin GEMNAME
"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)
class MyApp extends Application {
private MyStateManager myStateManager = new MyStateManager();
public MyStateManager getStateManager(){
return myStateManager ;
}
}
class MyStateManager {
@weslley39
weslley39 / docker_ip_boot2docker
Created July 19, 2015 03:53
Setting basic ip to boot2docker
docker-ip() {
boot2docker ip 2> /dev/null
}
echo $(docker-ip) docker | sudo tee -a /etc/hosts
# redefine prompt_context for hiding user@hostname
prompt_context () { }
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');
%USERPROFILE%\.babun\cygwin\bin\bash.exe --login -i
# 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