Skip to content

Instantly share code, notes, and snippets.

View hughdunne's full-sized avatar

Hugh Dunne hughdunne

  • County Kerry, Ireland
View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 18, 2024 15:09
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@planetoftheweb
planetoftheweb / reload.html
Created February 20, 2014 05:15
Live Reload script for gulp.js
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@OakRaven
OakRaven / SpecRunner.html
Created May 6, 2012 16:46
Jasmine SpecRunner
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Jasmine Spec Runner</title>
<link rel="stylesheet" type="text/css" href="spec/jasmine/jasmine.css">
<script src="spec/jasmine/jasmine.js"></script>
<script src="spec/jasmine/jasmine-html.js"></script>
<!-- include source files here... -->
@mtigas
mtigas / gist:952344
Last active June 20, 2024 11:22
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@lentil
lentil / gist:810399
Created February 3, 2011 22:55
PEP8 pre-commit hook in Python
#!/usr/bin/env python
from __future__ import with_statement
import os
import re
import shutil
import subprocess
import sys
import tempfile