Skip to content

Instantly share code, notes, and snippets.

View dclucas's full-sized avatar

Diogo Lucas dclucas

View GitHub Profile
@dclucas
dclucas / gist:9966923
Created April 4, 2014 02:24
IoC chain of responsibility
/*
An IoC-based Chain of Responsibility implementation, supporting async execution. This sample uses
SimpleInjector for IoC and Seterlund.CodeGuard for argument validation
The generic ChainOfResponsibility class provides base behavior that can be extended through inheritance
but should be functional on its own on most cases.
Chain resolution is determined by message types, so a given message type (which can be any class of
your choosing) may have at most one chain associated to it.
@dclucas
dclucas / win-std-setup.ps1
Last active August 29, 2015 14:02
Chocolatey std setup
cinst binroot
cinst GoogleChrome
cinst 7zip.install
cinst javaruntime
cinst powershell4
cinst git
cinst hg
cinst SublimeText3
#cinst virtualbox
#cinst vagrant
@dclucas
dclucas / win-dev-setup.ps1
Last active August 29, 2015 14:02
Dev setup
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst binroot
cinst git.install
cinst 7zip.install
cinst GoogleChrome
cinst fiddler4
cinst git-credential-winstore
cinst sublimetext3
@dclucas
dclucas / host-setup.sh
Last active August 29, 2015 14:07
Ubuntu host setup
sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get -y install git
sudo apt-get -y install git-flow
sudo apt-get -y install virtualbox
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
sudo gdebi vagrant_1.6.5_x86_64.deb
#sudo apt-get -y install vagrant
vagrant plugin install vagrant-cachier
@dclucas
dclucas / win-personal.setup.ps1
Last active August 29, 2015 14:07
Chocolatey personal stuff setup
# This installs tools that should not run in a corporate computer
cinst avastfreeantivirus
cinst jdownloader
cinst skype
cinst steam
cinst crashplan
cinst calibre
cinst driverbooster
$env:path += ";C:\Program Files (x86)\Git\bin"
git config --global user.name "Diogo Lucas"
@dclucas
dclucas / ubu-dv-setup.sh
Last active August 29, 2015 14:08
Ubuntu dev setup
sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get -y install git git-flow sublime-text-installer gdebi xclip httpie zsh
wget http://www.scootersoftware.com/bcompare-4.0.0.18847_i386.deb
# install docker - latest version
curl -sSL https://get.docker.io/ubuntu/ | sudo sh
#dev tools
sudo apt-get remove maven*
wget http://apache.arvixe.com/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
tar -zxf apache-maven-3.2.3-bin.tar.gz
sudo cp -R apache-maven-3.2.3 /usr/local
sudo ln -s /usr/local/apache-maven-3.2.3/bin/mvn /usr/bin/mvn
mvn –version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig
@dclucas
dclucas / dokku_full_setup
Created March 9, 2015 16:05
Docker + Dokku setup
if [ -z "$LOGENTRIES_TOKEN" ]; then echo "Please set up a LOGENTRIES_TOKEN env var before running this script";
else
################## Installing Docker ##################
# https://docs.docker.com/installation/ubuntulinux/
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
#### Configuring docker to run without sudo
# http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
## Add the docker group if it doesn't already exist.
sudo groupadd docker