pg_dump -U [superuser] -Fc [dbname] > db.dump
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#!/bin/bash --debugger | |
set -e | |
BRANCH="master" | |
if grep -q BCM2708 /proc/cpuinfo; then | |
echo "RPI BUILD!" | |
RPI="1" | |
fi | |
[ -n "$1" ] && BRANCH=$1 |
; /opt/janus/etc/janus/janus.plugin.streaming.cfg | |
; [stream-name] | |
; type = rtp|live|ondemand|rtsp | |
; rtp = stream originated by an external tool (e.g., gstreamer or | |
; ffmpeg) and sent to the plugin via RTP | |
; live = local file streamed live to multiple listeners | |
; (multiple listeners = same streaming context) | |
; ondemand = local file streamed on-demand to a single listener | |
; (multiple listeners = different streaming contexts) | |
; rtsp = stream originated by an external RTSP feed (only |
#!/bin/bash | |
mkdir /opt/php-5.3.29 | |
mkdir /usr/local/src/php5-build | |
cd /usr/local/src/php5-build | |
wget http://de.php.net/get/php-5.3.29.tar.bz2/from/this/mirror -O php-5.3.29.tar.bz2 | |
tar jxf php-5.3.29.tar.bz2 | |
# Thanks https://crybit.com/20-common-php-compilation-errors-and-fix-unix/ | |
apt-get install libbz2-dev libxml2-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libc-client2007e-dev libkrb5-dev libmcrypt-dev libpq-dev libmysqlclient-dev | |
mkdir /usr/include/freetype2/freetype |
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
The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!
-
Checkout the source
git clone https://github.com/pgmodeler/pgmodeler.git
The main point is to save the SSL/TLS keys those used by the web browser (SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log
).
In the example below we run brand new instance of Google Chrome (--user-data-dir=/tmp/tmp-google
do the trick):
SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/tmp-google
Then run the Wireshark and open the Preferences -> Protocols -> SSL, where we put the path to the SSL keys log file into the (Pre)-Master-Secret log filename
field.
Now all SSL/TLS traffic from this browser instance will be decrypted.
# ------------------------------------------------ | |
# Config files are located in /etc/wireguard/wg0 | |
# ------------------------------------------------ | |
# ---------- Server Config ---------- | |
[Interface] | |
Address = 10.10.0.1/24 # IPV4 CIDR | |
Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
mkdir -p ~/Library/LaunchAgents
- Put
tlskeylogger.plist
at~/Library/LaunchAgents/tlskeylogger.plist
launchctl load ~/Library/LaunchAgents/tlskeylogger.plist
, so it will load on the next restartlaunchctl start ~/Library/LaunchAgents/tlskeylogger.plist
, so it will load the environment variable immediately- Restart your browser(s)
- See how TLS keys are being written to
~/.tlskeyfile
viatail -f ~/.tlskeyfile
NB: This may be hit or miss and many apps do not respect the env var.