Skip to content

Instantly share code, notes, and snippets.

View matiaskorhonen's full-sized avatar

Matias Korhonen matiaskorhonen

View GitHub Profile
@matiaskorhonen
matiaskorhonen / postgresapp_unix_socket.md
Last active June 15, 2021 21:37 — forked from iamvery/postgresapp_unix_socket.md
Setup Postgres.app to allow connections via unix sockets

These are instructions to setup Postgres.app to allow connections over unix sockets. These instructions were written for macOS Sierra (10.12) and Postgres.app 9.6.0

  1. Run Postgres.app once so that the configuration is initialized in ~/Library/Application Support/Postgres/var-9.6/
  2. Quit Postgres.app
  3. Open ~/Library/Application Support/Postgres/var-9.6/postgresql.conf in your favorite text editor
  4. Uncomment the line unix_socket_directories = '/tmp' and change it to unix_socket_directories = '/var/pgsql_socket,/tmp'
  5. Run sudo mkdir -p /var/pgsql_socket
  6. Run sudo chmod 770 /var/pgsql_socket
  7. Run sudo chown root:staff /var/pgsql_socket
@matiaskorhonen
matiaskorhonen / acegist.user.js
Created April 10, 2012 13:55 — forked from abernier/acegist.user.js
ACE editor for editing your gists
// ==UserScript==
// @id acegist
// @name ACEgist
// @author Antoine BERNIER (abernier)
// @version 0.1.1
// @description ACE editor in your gists
// @match https://gist.github.com/gists/*/edit
// ==/UserScript==
(function (d, cb) {
fi:
errors:
messages:
expired: "has expired, please request a new one"
not_found: "ei löytynyt"
already_confirmed: "on jo vahvistettu, yritä kirjautua sisään uudelleen"
not_locked: "ei ollut lukittu"
not_saved:
one: "1 virhe esti %{resource} tallentamisen:"
other: "%{count} virhettä esti %{resource} tallentamisen:"
#!/bin/bash
### BEGIN INIT INFO
# Provides: APPLICATION
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the APPLICATION unicorns at boot
# Description: Enable APPLICATION at boot time.
### END INIT INFO