Skip to content

Instantly share code, notes, and snippets.

@mapaiva
mapaiva / drop_all_tables.sql
Created May 24, 2018 11:28
Delete all tables postgres
BEGIN;
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
COMMIT;
@mapaiva
mapaiva / install_minikube_kubectl.sh
Last active November 10, 2017 23:03
Install both minikube and kubectl
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
sudo yum install libvirt libvirt-daemon-kvm qemu-kvm
sudo usermod -a -G libvirt $(whoami)
newgrp libvirt
curl -L https://github.com/docker/machine/releases/download/v0.13.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&\n chmod +x /tmp/docker-machine &&\n sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
curl -Lo docker-machine-driver-kvm https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7 && chmod +x docker-machine-driver-kvm && sudo mv docker-machine-driver-kvm /usr/local/bin
@mapaiva
mapaiva / Vagrantfile
Last active August 8, 2017 16:30
Vagrant file for Golang and PostgreSQL
#-*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@mapaiva
mapaiva / to_the_left.sh
Created March 24, 2017 13:49
Gnome window buttons to the left
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:';
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gtk/DecorationLayout':<'close,minimize,maximize:'>}";