Skip to content

Instantly share code, notes, and snippets.

Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@iostat42
iostat42 / fp-curl
Created May 29, 2019 15:52 — forked from ekohl/fp-curl
A script that wraps curl with the right connection details
#!/usr/bin/env ruby
#
# This script wraps curl with the right connection details so you don't need to
# care about it.
#
# The first argument is the path on the host, including the first slash:
#
# ./fp-curl /features
# ./fp-curl /v2/features | jq .
# ./fp-curl /puppet/ca/host.example.com -X DELETE
@iostat42
iostat42 / consul
Created October 11, 2022 14:13 — forked from kawsark/consul
/etc/init.d/consul for CentOS 6
#!/bin/sh
#
# consul - this script manages the consul agent
#
# chkconfig: 345 95 05
# processname: consul
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $network