Skip to content

Instantly share code, notes, and snippets.

echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'"
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'"
sudo su - postgres -c "service postgresql stop"
sudo su - postgres -c '/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"'
@ahmadsoe
ahmadsoe / hardenUbuntu.sh
Last active April 11, 2020 20:00 — forked from lrobert/hardenUbuntu.sh
Ubuntu Installation script
#!/bin/bash
#
# Lee Robert's Base Ubuntu Installation script for use on Digital Ocean (Or any other ubuntu install really.)
# Made and tested with Ubuntu 13.04 64bit
#
# USAGE: bash hardenUbuntu.sh
#
# Steps:
# 01. Secure Root User
# 02. Make .bashrc print out pretty colors (and root's prompt will be red)
#! /bin/bash
# Acknowledgements
# I forked this code from Chris Fidao see: https://gist.github.com/fideloper
# May need to run this as sudo!
# I have it in /usr/local/bin and run command 'vhost' from anywhere, using sudo.
NORMAL=$(tput sgr0)
GREEN=$(tput setaf 2; tput bold)
@ahmadsoe
ahmadsoe / README.md
Last active February 12, 2024 07:24 — forked from rishubil/README.md
VPNGate Python script

#VPNGate for OS X This script is a simple script for using to connect vpn server list provided VPNGate through OpenVPN on OS X environment.

It inspired by VPNGate Python script wrtten by Andrea Lazzarotto.

##Requirements If you use the script, Tunnelblick needs to be installed first.

##Installation Open terminal app and copy & paste the command below.