Skip to content

Instantly share code, notes, and snippets.

View lpf23's full-sized avatar

Lee Foster lpf23

  • Texas
View GitHub Profile
@lpf23
lpf23 / PostgreSQL 12 with PostGIS 3.1.5 Installation on AmazonLinux2
Created March 14, 2022 19:45
PostgreSQL 12 with PostGIS 3.1.5 Installation on AmazonLinux2
##### Steps to Install PostgresSQL 12 with PostGIS 3.1.5 on AmazonLinux2 #####
# Install packages #
####################
$> sudo amazon-linux-extras install -y postgresql12 vim epel
$> sudo yum-config-manager --enable epel -y
$> sudo yum update -y
$> sudo yum install -y make automake gcc gcc-c++ libcurl-devel proj-devel pcre-devel autoconf automake libxml2-devel git cmake libtool libtiff-devel
$> sudo yum install -y postgresql-server postgresql-devel postgresql-server-devel postgresql-contrib
@lpf23
lpf23 / Python + Django Environment Setup - OSX
Last active December 9, 2018 23:31
Django Environment Setup
1. $> brew install python3
2. add to .zshrc and/or .bashrc:
export PATH=$HOME/Library/Python/3.7/bin:$PATH
3. $> pip3 install --user pipenv
4. $> pip3 install virtualenv
@lpf23
lpf23 / Xubuntu Guest Additions
Created October 15, 2015 18:16
Install VirtualBox Guest Additions 5.0.6 on Xubuntu 15.04
sudo apt-get install build-essential module-assistant
sudo m-a prepare
cd /media/<username>/VBOXADDITIONS_5.0.6_103037/
sudo ./VBoxLinuxAdditions.run
@lpf23
lpf23 / postgresql (notes)
Created June 7, 2015 09:59
brew install postgresql (notes)
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
https://github.com/Homebrew/homebrew/issues/2510
To migrate existing data from a previous major version (pre-9.4) of PostgreSQL, see:
https://www.postgresql.org/docs/9.4/static/upgrading.html
To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
@lpf23
lpf23 / openssl notes
Created June 7, 2015 09:58
brew install openssl (notes)
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
@lpf23
lpf23 / Apple Keyboard & CentOS
Created September 18, 2014 14:24
Apple Keyboard w/CentOS Virtualbox
System -> Preferences -> Keyboard
Under Layouts tab, choose the appropriate Keyboard model
Click 'Layout Options...' button
Expand Alt/Win key behavior
Choose "Control is mapped to Win keys (and the usual Ctrl keys)
@lpf23
lpf23 / Reset Bash Shell Environment
Created August 6, 2014 16:58
Refresh Bash Shell Environment
exec su - <username>
@lpf23
lpf23 / Install Chef Server
Last active August 29, 2015 14:04
Install Chef Server
Ubuntu:
1) wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.1.3-1_amd64.deb
2) dpkg -i chef-server*.deb
3) sudo chef-server-ctl reconfigure
4) sudo chef-server-ctl test
CentOS:
@lpf23
lpf23 / CNTLM Proxy - Centos
Last active May 11, 2022 08:29
Configure CNTLM Proxy on Centos/Ubuntu
1) Download cntlm rpm package from http://sourceforge.net/projects/cntlm/files/cntlm/
2) Login as root
3) Run command:
$ rpm -ivh cntlm-*.rpm
4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration)
$ cntlm -H -d <domain> -u <username>
@lpf23
lpf23 / Install_VB_GuestAdditions_Ubuntu
Last active August 29, 2015 14:03
Install VirtualBox Guest Additions on Ubuntu
These steps have worked with Ubuntu 14.04, Kubuntu 14.04 and Lubuntu 14.04
1) # sudo apt-get update
2) # sudo apt-get upgrade
3) # sudo apt-get install linux-headers-generic
4) # sudo apt-get install build-essential dkms