Skip to content

Instantly share code, notes, and snippets.

View vitor-caetano's full-sized avatar

Vitor Caetano vitor-caetano

View GitHub Profile
@vitor-caetano
vitor-caetano / default.xml
Last active January 31, 2017 21:05
Create Windows Server 2012 image for openstack
<network>
<name>default</name>
<bridge name="virbr0"/>
<forward mode="nat"/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254"/>
</dhcp>
</ip>
</network>
@vitor-caetano
vitor-caetano / setup-go.md
Last active February 21, 2017 12:52
Setup Go

Install the Go tools

$ brew update
$ brew install go

Create gocode folder

$ mkdir $HOME/gocode
@vitor-caetano
vitor-caetano / install-java-jdk.md
Last active January 13, 2017 22:02
Install Java JDK with cask
@vitor-caetano
vitor-caetano / setup-ruby-rails.md
Last active January 13, 2017 22:02
Setup Ruby on Rails
@vitor-caetano
vitor-caetano / setup-postresql.md
Last active January 13, 2017 22:27
Setup PostreSQL
$ brew install postgresql

Install Postgres.app from https://postgresapp.com/

Install pgAdmin 4

$ brew cask install pgadmin4
@vitor-caetano
vitor-caetano / Vagrantfile
Last active January 17, 2017 23:04
Setup openstack
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |v|
v.name = "openstack-server"
v.memory = 6144
v.cpus = 2
@vitor-caetano
vitor-caetano / install-node-on-mac.md
Created January 19, 2017 19:20
Install node on mac
$ brew install node
$ node -v
v7.4.0
$ npm install npm@latest -g
$ npm -v
4.1.1
@vitor-caetano
vitor-caetano / shrink_progress.sql
Created January 20, 2017 15:27
Get progress of SQL Server shrink database execution
SELECT
percent_complete,
dateadd(second,estimated_completion_time/ 1000, getdate()) as est_completion_time
FROM
sys.dm_exec_requests
WHERE
command = 'DbccFilesCompact'
@vitor-caetano
vitor-caetano / virt-install.txt
Created January 23, 2017 13:29
virt-install
virt-install --connect qemu:///session \
--name ws2012 --ram 2048 --vcpus 2 \
--network network=default,model=virtio \
--disk path=ws2012.qcow2,format=qcow2,device=disk,bus=virtio \
--cdrom /opt/Windows12.ISO \
--disk path=/opt/virtio-win.iso,device=cdrom \
--vnc --os-type windows --os-variant win2k8
@vitor-caetano
vitor-caetano / setup-vm-ws2012.txt
Last active January 23, 2017 15:04
Setup Vagrant Box from a Virtual Box VM with Windows Server 2012 R2
References:
http://www.sanjeevnandam.com/blog/instructions-to-create-a-windows-vagrant-box
http://www.intowindows.com/how-to-boot-and-install-from-iso-in-virtualbox/