Skip to content

Instantly share code, notes, and snippets.

@smellman
smellman / gist:2e51b1cf449c499ad5deec454a16a7bc
Last active March 5, 2019 16:58 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 and Postgis 2.3.x to 2.4.x using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# first stop force reload by launchctl
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@soffes
soffes / perferences.json
Created August 22, 2012 05:35
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb"
],
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }