#####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
#####__TAR__ Tar Usage and Options c – create a archive file.
Remove osxfuse if installed via homebrew: | |
> brew uninstall osxfuse | |
Install osxfuse binary and choose to install the MacFUSE compatibility layer: | |
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files | |
Reboot (optional but recommended by osxfuse) | |
Install ntfs-3g via homebrew: | |
> brew update && brew install ntfs-3g |
get every 1000th line from file | |
awk '!(NR % 1000)' withFid.tsv >> cut.tsv | |
split line with tab symbol and 12th filed not empty | |
awk -F'\t' '$12!="" {print $0}' 151009_04-1.tsv >> withFid.tsv |
http://www.xtuple.org/PostgresOnLinuxServer | |
http://stackoverflow.com/questions/3004523/postgresql-database-default-location-on-linux |
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 |
#####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
forward mongo to localhost | |
ssh -L 27017:localhost:27017 user@remoteMongoHost | |
ssh -L [localPort]:localhost:[remotePort] user@remoteMongoHost |
service --status-all | grep ntpd | |
or ls /etc/init.d/ | |
//special for mac | |
launchctl load /Library/LaunchDaemons/com.apple.blabla.plist |
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"
As configured in my dotfiles.
start new with session name:
tmux new -s myname
attach to named:
tmux a -t myname