Requirement
- USB flash drive - this is where the container filesystem will be persisted
Set-up docker bridge network
/interface bridge add name=docker
Set-up veth
to be used by container
/ ip address | |
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=LAN | |
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=ISP1 | |
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=ISP2 | |
/ ip firewall mangle | |
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=LAN | |
add chain=prerouting dst-address=10.112.0.0/24 action=accept in-interface=LAN | |
add chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection \ | |
new-connection-mark=ISP1_conn |
Requirement
Set-up docker bridge network
/interface bridge add name=docker
Set-up veth
to be used by container
# <SRCUSER> <SRCPW> <DSTUSER> <DSTPW> |
# remove | |
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist | |
# restore | |
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist |
# shell command: | |
pg_dump <db_name> -U <db_user> -h <db_host> | gzip | curl -u <ftp_user>:<ftp_password> ftp://<ftp_host>/`date '+%Y-%m-%d_%H-%M'`/db_backup.sql.gz --ftp-create-dirs -T - | |
# if you want to execute it through cron, be sure to escape all %! | |
# for crontab: | |
pg_dump <db_name> -U <db_user> -h <db_host> | gzip | curl -u <ftp_user>:<ftp_password> ftp://<ftp_host>/`date '+\%Y-\%m-\%d_\%H-\%M'`/db_backup.sql.gz --ftp-create-dirs -T - |
lftp -u <ftp_user>,<ftp_password> <ftp_host> -e "rm -rf `date --date="3 days ago" '+%Y-%m-%d_'`*; exit" | |
# make sure to escape % for cron: | |
lftp -u <ftp_user>,<ftp_password> <ftp_host> -e "rm -rf `date --date="3 days ago" '+\%Y-\%m-\%d_'`*; exit" |
#!/bin/bash | |
# the source: http://serverfault.com/questions/515833/how-to-remove-private-key-password-from-pkcs12-container | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: `basename $0` YourPKCSFile YourPKCSPassword" | |
exit $E_BADARGS | |
fi |
curl -u <username_here> https://api.github.com/user/repos -d '{"name":"curltest", "description": "testing description"}' | |
=> Enter passphrase: | |
// Example test case(below): | |
cd <local_repo_dir_path> | |
mkdir curltest | |
cd curltest | |
git init | |
touch curltest.txt | |
subl& culrtest.txt |