Decrypt SQL file backup
openssl enc -d -aes256 -in somesql.gz.enc | gunzip > some.sql |
Decrypt SQL file backup
openssl enc -d -aes256 -in somesql.gz.enc | gunzip > some.sql |
Tunnel remote port 8383 to become available as localhost:5433
ssh -L 5433:localhost:8383 some-user@some-server |
Finding annotations XML files for copying
find /Volumes/KOBOeReader/ -name "*.annot" | sed 's/\ /\\ /g' | sed 's/\&/\\&/g' |
At the root folder where there is Dockerfile
docker build -t linkedin-learning-downloader . |
cd to linkedin-learning-downloader
docker run -ti -v $(pwd):/usr/src/app --rm linkedin-learning-downloader python linkedin_learning.py |
Add network interface alias
sudo ifconfig en0 alias 192.168.0.101 255.255.255.0 |
Docker clean up based on ancestor tag
docker ps -a -q --filter ancestor=azurebot/qna |
then docker
rm the containers
When put at the root of my Windows user folder C:\Users\[my username]\Dockerfile
it will fail to find context of related files required in the build
COPY failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder746762051/nodejs/package.json: no such file or directory |
Hence, in separate sub-directory:
<docker Windows User root> | nodejs (dir) |___ Dockerfile .dockerignore resources (dir) |____packages.json serverhello.js |
COPY success during build:
cd nodejs docker build -t bandono/simplenodeweb . |
Instead of -d
that exited with code 126 the whole time, run the serverhello.js
using:
$ docker run -p 8286:8080 bandono/simplenodeweb node serverhello.js Running on http://0.0.0.0:8080 |
References (which not working at first running with -d
):
FROM python:2.7 RUN pip install --no-cache-dir pytest |
Change internet default route in Mac OS X to USB HSDPA modem stick with LAN’ certain subnet routed via a gateway in WiFi (en1
).
In my case DNS will go with the modem interface setting remain routed via USB modem stick
before routing:
$ netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.64.64.64 UGSc 72 137 ppp0 default link#4 UCSI 0 0 en0 default 10.1.1.1 UGScI 0 0 en1 |
Delete and add routes (desired LAN subnet 192.168.1.0/24:
sudo route -n delete default 10.1.1.1 sudo route -n add default 10.64.64.64 sudo route -n add 192.168.1.0/24 10.1.1.1 |
after routing:
$ netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.64.64.64 UGSc 21 0 ppp0 default link#4 UCSI 0 0 en0 default 10.1.1.1 UGScI 0 0 en1 10.1.1/24 link#5 UCS 6 0 en1 ... 192.168.1 10.1.1.1 UGSc 0 0 en1 ... |
Check apache2
enabled modules:
$ sudo apache2ctl -M Loaded Modules: core_module (static) log_config_module (static) logio_module (static) mpm_prefork_module (static) ... |
mod_rewrite
(rewrite_module
usually manipulated in .htaccess
) and ssl
(for HTTPS) for examples aren’t enabled by default in Ubuntu’ installation of apache2
.
Enable one or more of them via:
$ sudo a2enmod |