We have CLIENT, GATEWAY, REMOTE. Need to copy CLIENT->REMOTE.
##OPTION 1## (in one line)
#!bash
scp -rp -o "ProxyCommand ssh GATEWAY_USER@GATEWAY -p GATEWAY_PORT -W REMOTE:REMOTE_PORT" PATH_FROM REMOTE_USER@REMOTE:PATH_TO
~# uname -a | |
~# lsb_release -a | |
~# locale-gen en_US | |
~# locale-gen en_US.UTF-8 | |
~# apt-get -y --force-yes remove ntpdate | |
~# apt-get -y --force-yes install ntp | |
~# /etc/init.d/ntp restart | |
~# dpkg-reconfigure tzdata |
We have CLIENT, GATEWAY, REMOTE. Need to copy CLIENT->REMOTE.
##OPTION 1## (in one line)
#!bash
scp -rp -o "ProxyCommand ssh GATEWAY_USER@GATEWAY -p GATEWAY_PORT -W REMOTE:REMOTE_PORT" PATH_FROM REMOTE_USER@REMOTE:PATH_TO
var deepOmit = function(input, propertyToRemove) { | |
var output = input; | |
if (_.isArray(input)) { | |
output = []; | |
_.each(input, function(arrayItem) { | |
output.push(deepOmit(arrayItem, propertyToRemove)); | |
}); | |
} | |
else if (_.isObject(input)) { | |
output = {}; |
_.mixin | |
replaceKey: (obj, key, value) -> | |
_obj = _(obj) | |
_obj.each (v, k) -> | |
if k == key | |
obj[k] = value | |
else if obj[k] == Object(obj[k]) | |
replaceKey obj[k], key, value | |
return | |
_obj |
# ubuntu 16.04 | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev libxslt-dev libgd-dev libgeoip-dev libpam0g-dev libpcre++-dev libperl-dev | |
# ubuntu 12.04 | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev libxslt-dev libgeoip-dev libpam0g-dev libpcre++-dev libperl-dev libgd2-noxpm-dev | |
mkdir -p ~/sources | |
cd ~/sources && wget 'http://nginx.org/download/nginx-1.10.1.tar.gz' && tar -xzvf nginx-1.10.1.tar.gz && rm nginx-1.10.1.tar.gz | |
cd ~/sources && git clone https://github.com/FRiCKLE/ngx_cache_purge.git |
Installing MySQL 5.5.51 on Ubuntu 16.06 | |
1. Uninstall any existing version of MySql | |
sudo rm /var/lib/mysql/ -R | |
2. Delete the MySql profile | |
sudo rm /etc/mysql/ -R |
// remove emoji and all symbols from utf16 | |
String.prototype.strip_utf8only = function () { | |
function stringToCodePointArray(str) { | |
var codePoints = [], i = 0, charCode; | |
while (i < str.length) { | |
charCode = str.charCodeAt(i); | |
if ((charCode & 0xF800) != 0xD800) { // https://mathiasbynens.be/notes/javascript-encoding | |
codePoints.push(String.fromCharCode(charCode)); | |
} | |
++i; |
Stop the Docker services:
sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo systemctl stop containerd
Copy docker root files to new dir
sudo rsync -aP /var/lib/docker/ /some_new_dir