TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main| Development Phase: | |
| Step 1: Create Certificate .pem from Certificate .p12 | |
| Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12 | |
| Step 2: Create Key .pem from Key .p12 | |
| Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12 | |
| Step 3: Optional (If you want to remove pass phrase asked in second step) | |
| Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem |
| SELECT schemaname,relname,n_live_tup | |
| FROM pg_stat_user_tables | |
| ORDER BY n_live_tup DESC; |
| -- 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%' |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main| # ipak function: install and load multiple R packages. | |
| # check to see if packages are installed. Install them if they are not, then load them into the R session. | |
| ipak <- function(pkg){ | |
| new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
| if (length(new.pkg)) | |
| install.packages(new.pkg, dependencies = TRUE) | |
| sapply(pkg, require, character.only = TRUE) | |
| } |
| #!/bin/bash -e | |
| ## | |
| # Use this annotated script as base for killing container misbehaving on reaching memory limit | |
| # | |
| # Requirements: | |
| # - `jq` must be installed on both the client and server | |
| ## | |
| # don't kill containers using these images even if they're misbehaving |
| #!/bin/bash -e | |
| ## | |
| # Use this annotated script a base for launching an interactive console task on Amazon ECS | |
| # | |
| # Requirements: | |
| # - `jq` must be installed on both the client and server | |
| ## | |
| # the ECS cluster in which we'll launch the console `default` or `staging` |
| # solution to ld: library not found for -lgmp | |
| brew install gmp | |
| LIBRARY_PATH=/usr/local/lib/ pip install pycrypto |
| # installing yaml | |
| # when error ld: library not found for -lyaml PyAML | |
| brew install libyaml | |
| LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/libyaml/lib/ pip install PyYAML |
| #!/bin/bash | |
| ERROR=0 | |
| MYSQL_ROOT_USER=$1 | |
| MYSQL_ROOT_PASSWORD=$2 | |
| DB_TO_CREATE=$3 | |
| USER_TO_CREATE=$4 | |
| PASSWORD_FOR_USER=$5 | |
| if [ -z "$MYSQL_ROOT_USER" ] |