Skip to content

Instantly share code, notes, and snippets.

View jcxk's full-sized avatar
🎯
Focusing

Juan carlos Escamilla jcxk

🎯
Focusing
View GitHub Profile
@jcxk
jcxk / index.js
Created September 5, 2017 14:37 — forked from zerbfra/index.js
node-postgres connection and query with async/await
const pg = require('pg')
// create a config to configure both pooling behavior
// and client options
// note: all config is optional and the environment variables
// will be read if the config is not present
var config = {
user: '', // env var: PGUSER
database: '', // env var: PGDATABASE
password: '', // env var: PGPASSWORD
@jcxk
jcxk / install-postgresql-9.6-in-ubuntu-16.04.md
Created September 2, 2017 13:18 — forked from ziyan-junaideen/install-postgresql-9.6-in-ubuntu-16.04.md
How to install PostgreSQL 9.6 in Ubuntu 16.04

Background

I believe Ubuntu 16.04 comes with PostgreSQL 9.5. Thats good for a start, but it is a matter of time before you have the need of a PostgreSQL 9.6 cluster. For me it was to import a PG backup from Heroku.

The procedure couldn't have been any easier and is described below. If you are interested in upgrading your old cluster to 9.6 afterwards, you may be interested in this.

Instructions

@jcxk
jcxk / gist:8c6375e6a00d47968a62
Last active December 11, 2015 08:44 — forked from spangey/gist:71804f40a5e6ad291a74
install sublime text 3
wget -O install-sublime.sh https://gist.github.com/xtranophilist/5932634/raw/sublime-text-3-x64.sh && sudo sh install-sublime.sh; rm -rf install-sublime.sh
@jcxk
jcxk / 0_reuse_code.js
Created December 3, 2015 10:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console