Skip to content

Instantly share code, notes, and snippets.

@justsee
justsee / gist:867951
Created March 13, 2011 07:24
pg_hba.conf weirdness
[root@localhost data]# service postgresql start
Starting postgresql service: [FAILED]
[root@localhost data]# cat pg_log/postgresql-Sat.log
LOG: could not open configuration file "/var/lib/pgsql/data/pg_hba.conf": Permission denied
FATAL: could not load pg_hba.conf
[root@localhost data]# ll
total 136
drwx------ 7 postgres postgres 4096 Mar 12 23:19 base
drwx------ 2 postgres postgres 4096 Mar 12 23:20 global
drwx------ 2 postgres postgres 4096 Mar 12 23:18 pg_clog
@justsee
justsee / gist:1462894
Created December 11, 2011 21:38
Boring Bugs
Boring Bugs.
When hunting a bug it is less fruitful to consider it an outlier, but more exciting.
By the time you're at your wits end and you discover it's a mundane, trivial issue
you experience great, rewarding relief that the fix is so simple.
The more fruitful approach - assuming every bug is mundane - is boring, because
you're forced to trudge along checking elementary things.
@justsee
justsee / websocket-server.js
Created August 8, 2012 11:56
Fixed socket.io WebSocket server example from http://www.letseehere.com/reverse-proxy-web-sockets
var io = require('socket.io');
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
port = process.argv[2] || 8888;
var server = http.createServer(function(request, response) {
@justsee
justsee / sv-unicorn-run.erb
Last active December 14, 2015 04:09 — forked from brentkirby/service
Chef + runit + Unicorn + rbenv
#!/bin/bash -e
export RBENV_ROOT=/usr/local/rbenv
export PATH=/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/bin:"$PATH"
APP="<%= @options[:app].application.name %>"
APP_PATH="<%= @options[:app].path %>"
RAILS_ENV="<%= @options[:rails_env] %>"
UNICORN_CONFIG="/etc/unicorn/${APP}.rb"
CUR_PID_FILE="${APP_PATH}/shared/pids/unicorn.pid"
@justsee
justsee / gist:b0512fdc641dd127930bc50437f591c2
Created April 26, 2018 06:29
Free Software, Free Society: Selected Essays of Richard M. Stallman
Introduction by Lessig - final paras:
I don’t know Stallman well. I know him well enough to know he is a hard man
to like. He is driven, often impatient. His anger can flare at friend as easily as foe.
He is uncompromising and persistent; patient in both.
Yet when our world finally comes to understand the power and danger of code—
when it finally sees that code, like laws, or like government, must be transparent to
be free—then we will look back at this uncompromising and persistent programmer
and recognize the vision he has fought to make real: the vision of a world where