Skip to content

Instantly share code, notes, and snippets.

View januszm's full-sized avatar

Janusz Mordarski januszm

View GitHub Profile
@januszm
januszm / gist:d4ce6dc36a257960dd7acb5c6b1ef6e8
Created December 30, 2017 17:32 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 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:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@januszm
januszm / graphite_grafana.sh
Last active January 20, 2020 17:27 — forked from mmb/graphite_grafana.sh
graphite/statsd/grafana setup on new Amazon Linux instance
# graphite/statsd/grafana setup on new Amazon Linux instance
# add http://graphite/ to grafana as a data source
sudo su
yum update --assumeyes
yum install --assumeyes docker
service docker start
docker \
run \
@januszm
januszm / _mina_puma_apache.conf
Last active July 21, 2016 15:03
Deply Rails App with Puma and Apache via Mina
<VirtualHost *:80>
ServerName www.esdb.cn
ServerAlias esdb.cn
DocumentRoot /home/ubuntu/apps/xxx.com/current/public
<Directory /home/ubuntu/apps/xxx.com/current/public>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>