-
pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
Backup:pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sqlRestore:
psql -h localhost -p 5432 -U postgres -d mydb < backup.sql-h is for host.
-p is for port.
-U is for username.
-d is for database.
const {PassThrough} = require('stream')
const fs = require('fs')
const d = new PassThrough()
fs.createReadStream('tt2.js').pipe(d) // can be piped from reaable stream
d.pipe(process.stdout) // can pipe to writable stream
d.on('data', console.log) // also like readable
This file contains hidden or 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 | |
| # Simple QGIS 3 Server wsgi test | |
| import signal | |
| import sys | |
| from cgi import escape, parse_qs | |
| from urllib.parse import quote | |
| # Python's bundled WSGI server | |
| from wsgiref.simple_server import make_server |
This file contains hidden or 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
| --- | |
| - name: Creating a Volume | |
| hosts: localhost | |
| become: yes | |
| tasks: | |
| - name: Creating a Volume | |
| ec2_vol: | |
| aws_access_key: "{{ lookup('env', 'AWS_ACCESS_KEY_ID') }}" | |
| aws_secret_key: "{{ lookup('env', 'AWS_SECRET_ACCESS_KEY') }}" | |
| instance: '<instance-id>' |
This file contains hidden or 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
| { | |
| "scripts": { | |
| "build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min", | |
| "build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015", | |
| "build:esm": "tsc --module es2015 --target es5 --outDir dist/esm", | |
| "build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", | |
| "build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js", | |
| "build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz", | |
| } | |
| } |
Questions:
- Markdown or reST or Asciidoc or Asciidoctor?
- References: https://internals.rust-lang.org/t/rustdoc-restructuredtext-vs-markdown/356/11 rust-lang/rust#29474
- Markdown
- Pros
- More people know it already
- Pros
- Lots of good parsers
I've been meditating on the direction of documentation.js going forward. Here's what I've decided on for now:
I'm going to rebuild documentation.js from the ground up, using a frontend that relies heavily on Flow annotations, and only supports export/import following. That means:
- CommonJS import/export will no longer be supported
- JSDoc types will no longer be supported
This file contains hidden or 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
| license: gpl-3.0 | |
| height: 700 |
Sometimes a python script will simply hang forever with no indication of where things went wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward. Here's a way to see where the program is currently stuck.
Install gdb.
# Redhat, CentOS, etcVisualize PostGIS index using Gevel in Postgres 9.6:
git clone git://sigaev.ru/gevel
cd gevel
git checkout bd8b8b031a8049a6e7c18c00946bfbd99d75d27f
USE_PGXS=1 make
sudo USE_PGXS=1 make install
psql -f /usr/share/postgresql/9.6/contrib/gevel.sql