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 / 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 / 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 / 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 / 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 / setup-ruby-rails.md
Last active January 13, 2017 22:02
Setup Ruby on Rails
@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-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 / 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>