- 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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
# A commented nginx configuration file for Ruby on Rails | |
# | |
# Author: Tommaso Pavese | |
# tommaso@pavese.me | |
# http://tommaso.pavese.me | |
# | |
# License: http://www.wtfpl.net/ | |
# | |
# | |
# Tested with: |
# A commented nginx configuration file for Ruby on Rails | |
# | |
# Author: Tommaso Pavese | |
# tommaso@pavese.me | |
# http://tommaso.pavese.me | |
# | |
# License: http://www.wtfpl.net/ | |
# | |
# | |
# Tested with: |
# Test the result of config.assets.precompile | |
# | |
# Check which files will be regarded as "manifests" and thus precompiled and be | |
# available for standalone use via the /assets/<asset> URL when in production. | |
# Execute this code in your Rails console. | |
# First, you'll probably be in development mode, so add here your | |
# additional production precompile patterns you want to test against. | |
precompile = Rails.configuration.assets.precompile + [/^.+\.css$/, 'active_admin.js'] |
As part of the Walmart DSV API, there are carrier method codes in the order xml, but the only documentation I found was in this PDF. That document is referenced from Supplier Help.
That PDF file is of course not easily consumable and it was a wicked pain in the ass to get the data out of there. But, it's done now, and if you happen to find this file I hope I saved you some time.
#!/bin/bash | |
# for use with cron, eg: | |
# 0 3 * * * postgres /var/db/db_backup.sh foo_db | |
if [[ -z "$1" ]]; then | |
echo "Usage: $0 <db_name> [pg_dump args]" | |
exit 1 | |
fi |
define("DateWithTimezone", function(module) { | |
var DateWithTimezone = function(moment){ | |
this.moment = moment | |
moment.tz(DateWithTimezone.getTimezone()) | |
} | |
_.extend(DateWithTimezone.prototype, { | |
toISO: function(){ | |
return this.format() | |
}, |
<?php | |
trait EventGenerator | |
{ | |
protected $pendingEvents = array(); | |
protected function raise($event) | |
{ | |
$this->pendingEvents[] = $event; | |
} |