This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time(i=0; while true; do i=`expr $i + 1`; echo "iteration $i"; pv -p -t -e -r -b -L 10m file.raw | nc localhost 8000; if ! [[ -f "run.txt" ]]; then echo "exit"; break; fi; sleep 1; done) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat file.json | python -m json.tool > formatted_file.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -f -L 9201:localhost:9200 <username>@<host> -N | |
# To kill tunnel running in background run: | |
ps aux | grep 9201 | |
kill <pid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed 'NUMq;d' file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls -1 *.zip | awk -F'.zip' '{print "unzip " $0 " -d " $1}' | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find documents which don't contain field 'non_existing_field' | |
POST /twitter/tweet/_search | |
{ | |
"query": { | |
"bool": { | |
"must": { | |
"match_all": {} | |
}, | |
"must_not": { | |
"prefix": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for files in *.java; do git mv "$files" "$files.orig"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename 's/\.orig$//' *.orig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zip -r -s 3m <zip_file_name>.zip <files_to_zip>.war |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename -n 's/(.*)/$1.bak/' *.jar |
NewerOlder