Skip to content

Instantly share code, notes, and snippets.

View bsnux's full-sized avatar
💭
👨‍💻

Arturo Fernandez bsnux

💭
👨‍💻
View GitHub Profile
#!/bin/zsh
git tag | xargs git show --pretty=oneline --name-only
#!/bin/zsh
docker images | grep 'none' | awk '{ print $3 }' | xargs docker rmi
#!/bin/zsh
# Generating a binary file with random content and size `MB` MB
MB=30
FILENAME="b.log"
dd if=/dev/urandom of=$FILENAME bs=1048576 count=$MB
Copy (select * from table) To '/tmp/file.csv' With CSV;
pg_dump database -U user -t table --data-only > /tmp/your_file.sql
docker images | grep 'none' | awk '{ print $3 }' | while read x ; do docker rmi $x; done
git log --grep=your_string
git push origin :<branch_name>
git merge --abort
# Squashing last 4 commits
git rebase -i HEAD~4