As configured in my dotfiles.
start new with session name:
tmux new -s myname
attach to named:
tmux a -t myname
@echo off | |
call :treeProcess | |
goto :eof | |
:treeProcess | |
rem Do whatever you want here over the files of this subdir, for example: | |
for %%f in (*.pdf) do call :copyAdditive "%%f" | |
for /D %%d in (*) do ( | |
cd %%d | |
call :treeProcess |
#!/bin/bash | |
#sshpass -p "qwerty" scp -r user@example.com:/some/remote/path /some/local/path | |
COUNTER=0 | |
while [ $COUNTER -lt 10 ]; do | |
folderName=$(date) | |
echo $(date) | |
mkdir "$(date)" | |
cd "$(date)" | |
sshpass -p PASSWD scp USER@10.0.26.18:/var/log/* . | |
cd .. |
As configured in my dotfiles.
start new with session name:
tmux new -s myname
attach to named:
tmux a -t myname
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
:mongodump --host [ip] --db [db_name] --port 27017 --out dbName.dump mongodump --host=[ip]:27017 --out=/media/backup/2014-06-06_11h00m --oplog
:mongorestore --db [ToDatabaseName] dumpDirectory.dump/ mongorestore --oplogReplay
if restore error do: export LC_ALL="en_US.UTF-8"
service --status-all | grep ntpd | |
or ls /etc/init.d/ | |
//special for mac | |
launchctl load /Library/LaunchDaemons/com.apple.blabla.plist |
forward mongo to localhost | |
ssh -L 27017:localhost:27017 user@remoteMongoHost | |
ssh -L [localPort]:localhost:[remotePort] user@remoteMongoHost |
#####change timezone on linux sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime
#####sftp with alias from ssh.config sftp uat-gdn03:/home/ec2-user/node3.tar
StringEntity stringentity = new StringEntity(new String( corruptedString.getBytes())); | |
will show you what charset used: text/plain; charset=ISO-8859-1 | |
String subjUTF8 = new String(corruptedString.getBytes("ISO-8859-1"), "UTF-8"); | |
will make corrupted utf-8 look pretty |
http://www.xtuple.org/PostgresOnLinuxServer | |
http://stackoverflow.com/questions/3004523/postgresql-database-default-location-on-linux |