This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTENSION dblink; | |
-- customize start | |
CREATE SERVER pgbouncer FOREIGN DATA WRAPPER dblink_fdw OPTIONS (host 'localhost', | |
port '6432', | |
dbname 'pgbouncer'); | |
CREATE USER MAPPING FOR PUBLIC SERVER pgbouncer OPTIONS (user 'pgbouncer'); | |
-- customize stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst pgef-subedit-message | |
"Type 'C-c C-c' once done, or 'C-c C-k' to abort edit" | |
"Message to post in the minibuffer when an edit buffer is displayed.") | |
(defvar pgef-subedit-mode-map | |
;; Use (make-keymap) because (make-sparse-keymap) does not work on Demacs. | |
(let ((pgef-subedit-mode-map (make-keymap))) | |
(define-key pgef-subedit-mode-map "\C-c\C-c" 'pgef-subedit-exit) | |
(define-key pgef-subedit-mode-map "\C-c\C-k" 'pgef-subedit-abort) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef kitchen | |
_kitchen() { | |
local curcontext="$curcontext" state line | |
typeset -A opt_args | |
_arguments '1: :->cmds'\ | |
'2: :->args' | |
case $state in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
sudo apt-get update | |
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common" | |
# bug: http://www.postgresql.org/message-id/[email protected] | |
sudo update-alternatives --remove-all postmaster.1.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# script to add apt.postgresql.org to sources.list | |
# from command like | |
CODENAME="$1" | |
# lsb_release is the best interface, but not always available | |
if [ -z "$CODENAME" ]; then | |
CODENAME=$(lsb_release -cs 2>/dev/null) | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew doctor | |
Your system is raring to brew. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep-dctrl -F Version -e -n -s Version -v '^([[:digit:]]:)?[[:digit:]]+(\.[[:digit:]]+)*[[:alpha:]]?(-[[:digit:]]+)?(.dfsg[[:digit:]]?)?(-[[:digit:]]+(\.[[:digit:]])?(\+b1)?)?(\+nmu[[:digit:]])?$' /var/lib/apt/lists/*_dists_testing_main_source_Sources | sort -u -V | pee "cat" "wc -l" |