- Update pg_hba.conf (most likely in /etc/postgresql/9.4/main) with -
host all all 0.0.0.0/0 trust
- Update postgresql.conf to use
listen_addresses = '*' - Be sure to
sudo service postgresql restart
Configure Vagrant
| #!/bin/bash | |
| # Cloudflare as Dynamic DNS | |
| # From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/ | |
| # Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/ | |
| # Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/ | |
| # Update these with real values | |
| auth_email="[email protected]" | |
| auth_key="global_api_key_goes_here" | |
| zone_name="example.com" |
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "golang.org/x/net/webdav" |
| /* | |
| IMPORTANT!!! DO NOT USE THIS. It works, but you'll probably get it wrong, | |
| because it must be keyed with at least 128 bits of entropy, and where | |
| do you get this entropy, huh? | |
| - In a browser, you get it from window.crypto.getRandomValues(). | |
| - In Node, you get it from crypto.randomBytes() | |
| Now LOOK AT YOU! You already have secure ways to generate random bytes, |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>WebSocket Client</title> | |
| <style> | |
| #output { | |
| border: solid 1px #000; | |
| } | |
| </style> | |
| </head> |
| exports.createHandler = function (method) { | |
| return new Handler(method); | |
| } | |
| Handler = function(method) { | |
| this.process = function(req, res) { | |
| params = null; | |
| return method.apply(this, [req, res, params]); | |
| } | |
| } |
| // It is important to declare your variables. | |
| (function() { | |
| var foo = 'Hello, world!'; | |
| print(foo); //=> Hello, world! | |
| })(); | |
| // Because if you don't, the become global variables. | |
| (function() { |