layout | title | description | tags | ||
---|---|---|---|---|---|
default |
SQL Style Guide |
A guide to writing clean, clear, and consistent SQL. |
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:alpine AS builder | |
# nginx:alpine contains NGINX_VERSION environment variable, like so: | |
# ENV NGINX_VERSION 1.15.0 | |
# Our NCHAN version | |
ENV NCHAN_VERSION 1.1.15 | |
# Download sources | |
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \ |
PostgreSQL comes with two command-line utilities for dumping and then
restoring a database -- pg_dump
and pg_restore
, respectively.
Using the pg_dump
with the -Fc
flag will create a dump of the given
database in a custom format. The output of this command can be redirected
into a file (the .dump
extension is a standard convention):
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from boto.ses.connection import SESConnection | |
import os | |
import sys | |
import subprocess | |
import socket | |
TMPFILE = '/var/run/postgresql/last-wal-archive-error-file.tmp' | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get all IP address of the server | |
* @param {Object|undefined} [{}] - An object. | |
* @param {Boolean} [obj.skipLocalhost=false] - Determines if the localhost address is returned in the result list | |
* @return {Array} Array of IPs | |
*/ | |
const getListOfIPV4Address = ({ skipLocalhost = false } = {}) => { | |
const os = require('os'); | |
const ifaces = os.networkInterfaces(); |