Skip to content

Instantly share code, notes, and snippets.

View adamvaughan's full-sized avatar

Adam Vaughan adamvaughan

  • Fort Collins, CO
View GitHub Profile
@adamvaughan
adamvaughan / copydb.fish
Last active June 14, 2016 17:55
DB Candy
function copydb --description 'Copy a remote database locally.'
dropdb (dbname $argv)_development
createdb (dbname $argv)_development
pg_dump -h (dbhost $argv) -U inside_track -d (dbname $argv) | psql -d (dbname $argv)_development -f -
end
@adamvaughan
adamvaughan / index.html
Created October 16, 2012 14:20
D3 Sparkline
<html>
<head>
<title>D3 Sparkline</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
#graph {
width: 300px;
height: 60px;
}
@adamvaughan
adamvaughan / gist:3092233
Created July 11, 2012 18:35
launch plist for data_store
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>System Shepherd Data Store</string>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
@adamvaughan
adamvaughan / gist:1336692
Created November 3, 2011 14:52
creating a self signed certificate
➜ openssl genrsa -des3 -out server.key 1024
Generating RSA private key, 1024 bit long modulus
................++++++
...............++++++
e is 65537 (0x10001)
Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:
➜ openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
@adamvaughan
adamvaughan / nginx.conf
Created November 3, 2011 14:35
nginx configuration
user nobody nogroup;
worker_processes 1;
error_log /var/log/nginx_error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
accept_mutex off;