This file contains hidden or 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
svn status | grep "^\?" | grep -v ".idea" | awk '{print $2}' | xargs svn add; | |
svn status | grep "^\!" | awk '{print $2}' | xargs svn rm; |
This file contains hidden or 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 user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done |
This file contains hidden or 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 . -type d -name .svn -exec rm -rf {} \; |
This file contains hidden or 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
sudo sh -c 'echo manual >> /etc/init/mysql.override' | |
sudo update-rc.d -f apache2 disable | |
sudo update-rc.d -f x2goserver disable |
This file contains hidden or 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 . -name '*.gz' -type f | while read filename; do gzip -cd "$filename" | lzma > "$filename".lzma && rename s/\.gz// *.gz.lzma; done | |
-OR- | |
find . -name '*.gz' -type f | while read filename; do gzip -cd "$filename" | lzma > "$filename".lzma && rename .gz.lzma .lzma; done | |
WITH DELETE | |
find . -type f -name "*.gz" | while read line ; do echo $line; gunzip --to-stdout "$line" | xz > "$(echo $line | sed 's/gz$/xz/g')"; rm -f "$line"; done |
This file contains hidden or 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 . -not -iwholename '*.svn*' -type f | xargs wc -l |
This file contains hidden or 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
Resources: | |
(*) http://stackoverflow.com/questions/19204358/vagrant-forwarding-ssh-from-remote-server | |
(*) http://derickrethans.nl/debugging-with-xdebug-and-firewalls.html | |
Modify Vagrantfile | |
# Allow remote connection | |
config.vm.network :public_network # 2nd interface bridged mode | |
Reload vagrant | |
# vagrant reload |
This file contains hidden or 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
tar -tf file.tar | |
tar -tf file.tar.gz | |
tar -tf file.tar.bz2 | |
unzip -l file.zip |
This file contains hidden or 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
ip=$1 | |
for i in `cat "$ip"` | |
do | |
if [ -r $i ]; then | |
echo "$i" | |
fi | |
done |
This file contains hidden or 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
# (!) On OSX use -E instead of -r | |
grep '^exception' exception.log | sort | uniq -c | sort -n | less | |
sed -r s/^[0-9T:+-]+\ ERR\ [\(][0-9]+[\)]:\ // system.log | sort | uniq -c | sort -n | less | |
sed -r 's#^[0-9]{4}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} (WARN|ERROR|INFO) - #\1 #' jmeter-server.log | sort | uniq -c | sort -n | less | |
sed -r 's#(WARNING|ERROR),[0-9]+,[0-9]+,##' export_products_dev.csv-import.log | sort | uniq -c | sort -n | less | |
############ |