The computer driven markets for instruments like stocks and exchange traded stock options, have transformed finance and the flow of capital. These markets are enabled by order matching engines (and the infrastructure that supports this software). Before computer trading networks and matching engines, stocks where traded on cavernous exchange floors and transaction costs where high. When electronic trading fully matured, floor traders were a fading anachronism and transaction costs had been reduced to pennies a share in many cases. Electronic trading could not exist without advanced network infrastructure, but without the software matching engines no shares would change hands. The computer trading networks, the matching engine software has also created a concentrated nexus of potential failure. Failures in these systems have increased as the frequency and volume on the electronic networks has increased. The position of order matching engines in the trading infrastructure makes these systems o
You have to do 2 things in order to allow your container to access your host's postgresql database
- Make your postgresql listen to an external ip address
- Let this client ip (your docker container) access your postgresql database with a given user
Obs: By "Host" here I mean "the server where docker is running on".
Find your postgresql.conf (in case you don't know where it is)
$ sudo find / -type f -name postgresql.conf
This file contains 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
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.
As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.
- Generate a ssh key
This file contains 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
# Tested on OSX Yosemite 10.10.4 | |
# there is also an updated version (work in progress) for El Capitan here https://gist.github.com/guycalledseven/31ffe35eca056838b06b | |
# XXX TODO | |
# should I disable com.google.Keystone.Agent ?? | |
# http://applehelpwriter.com/2014/07/13/how-to-remove-googles-secret-update-software-from-your-mac/ | |
# Stop DS_Store file creation on network connections | |
# restart Finder afterwards |
This file contains 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
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
CustomError.prototype = Object.create(Error.prototype); |
This file contains 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
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
This file contains 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
echo "downloading scripts" | |
curl https://gist.githubusercontent.com/kessler/6122814/raw/002f1f919b937fd067a36f1a3b47050e4a3645e4/linux%20net%20settings > netchakra.sh | |
chomd +x netchakra.sh | |
curl https://gist.githubusercontent.com/kessler/5885063/raw/38f201ff740b25782bc04d3af11b4f3823478b4d/install-node > install-node.sh | |
chmod +x install-node.sh | |
curl https://gist.githubusercontent.com/kessler/6412374/raw/7b088bbeaf36ac845a6c2b6950d0e9f4d8d2d6b8/install-zeromq > install-zmq.sh | |
chmod +x install-zmq.sh |
This file contains 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
var count = 0 | |
var countWithDelay = 0 | |
function recurse() { | |
console.log('recurse: %d', count) | |
if (count++ === 100) return | |
setImmediate(recurse) | |
} |
NewerOlder