This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| -- https://wiki.postgresql.org/wiki/Disk_Usage | |
| -- get size of table | |
| SELECT *, pg_size_pretty(total_bytes) AS total | |
| , pg_size_pretty(index_bytes) AS index | |
| , pg_size_pretty(toast_bytes) AS toast | |
| , pg_size_pretty(table_bytes) AS table | |
| FROM ( | |
| SELECT *, total_bytes-index_bytes-coalesce(toast_bytes,0) AS table_bytes FROM ( | |
| SELECT c.oid,nspname AS table_schema, relname AS table_name |
| fetch('/api/v1/clients', { | |
| method: 'post', | |
| headers: { | |
| 'accept': 'application/json', | |
| 'content-type': 'application/json', | |
| 'x-csrf-token': 'bJYS4JDu-mmYxfO4Vrnqb8vruIC8Hh-uAvzk' | |
| }, | |
| body: JSON.stringify({ "name": "test" }) | |
| }).then(function(res) { | |
| res.json().then(function(data) { |
| #!/bin/bash -e | |
| EC2_REGION="us-west-1" | |
| DEFAULT_PROGRESS_WAIT=5 | |
| # ========== SNAPSHOT WAIT ============== | |
| snapshot_id="snap-testtesttest" | |
| while [ "$snapshot_progress" != "100%" ]; do | |
| sleep "$DEFAULT_PROGRESS_WAIT" |
| const { createLogger, format, transports } = require("winston"); | |
| // https://github.com/winstonjs/winston#logging | |
| // { error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 } | |
| const level = process.env.LOG_LEVEL || "debug"; | |
| function formatParams(info) { | |
| const { timestamp, level, message, ...args } = info; | |
| const ts = timestamp.slice(0, 19).replace("T", " "); |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| -- https://www.db-fiddle.com/f/e8aeGk7cRNYnpjsqi1ncrs/24 | |
| create table tenants (id int, identities jsonb); | |
| insert into tenants (id, identities) values ( | |
| 1, | |
| '[ | |
| { | |
| "source": "my.edgecast.com", | |
| "external_id": "77" |
| #!/bin/sh | |
| updateAllowedHosts() { | |
| if [ -n "$ECS_CONTAINER_METADATA_FILE" ]; then | |
| echo "getting ecs container metadata file '$ECS_CONTAINER_METADATA_FILE'" | |
| local appSettings='appsettings.json' | |
| local currentHosts= | |
| # check if env appsettings exist |
This fast tutorial will teach you how to install redis-clion AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:
$ sudo yum install gcc
This may return an "already installed" message, but that's OK. After that, just run:
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli
| # create shell on running instance | |
| docker exec -i -t container_name /bin/bash |
| #!/bin/sh | |
| # certgen <days> <file_name> | |
| if [ "$#" -ne 2 ]; then | |
| echo "certgen <days> <file_name>" | |
| exit 1 | |
| fi | |