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 log/chupacabra.log | grep -o -E "[0-9]{2}:[0-9]{2}:[0-9]{2}" | uniq -c | |
# matches the whole date at the begining of the line | |
tail -n 100 log/chupacabra.log | grep -o -E "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}" | uniq -c |
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
tail -F /var/solr/logs/solr.log | grep --line-buffered -o -E "([0-9]* add)" | awk '{print strftime("%Y-%m-%d %r"), $1}' | |
tail -F /var/solr/logs/solr.log | grep --line-buffered -o -E "([0-9]* add)" | awk '{print strftime("%Y-%m-%d-%H-%M-%S"), $1}' |
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 all_deleted | parallel --pipe -N100 -j100 ./delete_sns.rb |
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
VBoxManage modifyvm "default" --natnet1 "10.13.2.0/24" |
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
gradle_version=2.12 | |
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
mkdir -p /opt/gradle | |
unzip gradle-${gradle_version}-all.zip | |
mv gradle-${gradle_version} /opt/gradle/ | |
ln -sfn gradle-${gradle_version} /opt/gradle/latest | |
chown -R ec2-user:ec2-user /opt/gradle | |
printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh | |
. /etc/profile.d/gradle.sh | |
# check installation |
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
cp -r old-repo new-repo | |
cd new-repo | |
git remote rm origin | |
git clean -fd | |
git filter-branch --subdirectory-filter internal-folder -- branch-to-hold-on-to | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
git checkout branch-to-hold-on-to | |
git tag | xargs -I {} git tag -d {} | |
git branch | grep -v "*" | xargs -I {} git branch -D {} |
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
[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z |
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
# copied from https://techoverflow.net/blog/2013/10/22/docker-remove-all-images-and-containers/ | |
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
export $(cat config/prod.config | xargs ) && make deploy |
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
docker run --net host -ti redis:3 |
OlderNewer