-
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.sql
Restore:
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.
#ifndef RANGE_HPP_ | |
#define RANGE_HPP_ | |
template<typename T> class RangeIterator; | |
template<typename T> | |
class Range | |
{ | |
T _start, _end, _step; |
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
------------------------- MODULE GryadkaCasRegister ------------------------- | |
EXTENDS Integers, Sequences, FiniteSets | |
----------------------------------------------------------------------------- | |
\* Timestamps is the set of possible timestamps for operations to choose from. | |
\* Each operation uses a unique timestamp. | |
\* Values is the set of possible values to set the register to. | |
\* Acceptors is the set of nodes which act as acceptors in the paxos sense. | |
\* Quorums is the set of all possible quorums, typically simple majorities. | |
CONSTANTS Timestamps, Values, Acceptors, Quorums |
This article is also available here
After over 20 years working with C/C++ I finally got clear idea how header files need to be organized. Most of the projects in C++ world simply dump everything in .h file, and most of my C++ code was organized this way. Lately I started to separate function declaration from implementation as it was done in C. Now .h
headers are exclusevely intended for function and class declaration with doxygen documentation style comments. Inline implementation of functions, class method implementation, etc. goes into .inl
headers or .cpp
files.
For example .h
file would contain only declaration and doxygen style documentation comment:
- Postico client for mac
- pgcli - Postgres CLI with autocompletion and syntax highlighting
- pghero - Server and query performance dashboard
- PEV - Query planning / Explain analyze visualisation
- PostgreSQL's explain analyze made readable
CREATE TRIGGER person_notify AFTER INSERT OR UPDATE OR DELETE ON income | |
FOR EACH ROW EXECUTE PROCEDURE notify_trigger( | |
'id', | |
'email', | |
'username' | |
); | |
CREATE TRIGGER income_notify AFTER INSERT OR UPDATE OR DELETE ON income | |
FOR EACH ROW EXECUTE PROCEDURE notify_trigger( | |
'id', |
The Mosh and Quake 3 Networking Models and State Synchronization Algebra | |
======================================================================== | |
Mosh is a new remote shell program and protocol: https://mosh.org/ | |
You may read technical details about its internals here: | |
https://www.usenix.org/system/files/login/articles/winstein.pdf | |
https://mosh.org/mosh-paper.pdf |
#include <iostream> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <cstdio> | |
#include <bcm_host.h> | |
#include <EGL/egl.h> | |
#include <EGL/eglext.h> | |
#include <GLES2/gl2.h> | |
#include <GLES2/gl2ext.h> |
-
brew install tinyproxy
-
Comment out
Allow 127.0.0.1
in/usr/local/etc/tinyproxy.conf
. -
Start tinyproxy with
tinyproxy -d
. -
Follow the log file with
tail -f /usr/local/var/log/tinyproxy/tinyproxy.log
-
On the iOS device, in Wi-Fi settings, set HTTP Proxy to Manual and set