Skip to content

Instantly share code, notes, and snippets.

View nandiheath's full-sized avatar

Nandi Wong nandiheath

View GitHub Profile
@nandiheath
nandiheath / psql.sh
Last active December 26, 2021 19:42
PSQL commands
# psql dump table
source .env
pg_dump --host $POSTGRES_HOST --user $POSTGRES_USER --format custom --section data --on-conflict-do-nothing --inserts --file "$TABLE.sql" --table "$TABLE" $POSTGRES_DATABASE
# psql restore data
pg_restore -h 127.0.0.1 -U {user} -d {database} {table}.sql
prometheus:
## Prometheus server ConfigMap entries
##
serverFiles:
alerts: {}
rules: {}
prometheus.yml:
# https://prometheus.io/docs/prometheus/latest/configuration/configuration/
global:
module.exports = {
"extends": "airbnb-base",
"rules": {
"indent": ["error", 4, { "SwitchCase": 1 }],
'no-restricted-syntax': [
'error',
'LabeledStatement',
'WithStatement',
],
'no-bitwise' : 0,
@nandiheath
nandiheath / nginx.conf
Created November 23, 2017 03:01
nginx configuration that escape the request body and logging important information
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 10000;
}
worker_rlimit_nofile 40000;