Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {
# FATAL: lock file "postmaster.pid" already exists
# HINT: Is another postmaster (PID 4646) running in data directory "/usr/local/var/postgres"?
# To fix this:
cat /usr/local/var/postgres/postmaster.pid # pid is the number on first line
kill -9 1116 # replace 1116 with pid number (first line) from postmaster.pid file
# Or