Skip to content

Instantly share code, notes, and snippets.

View luciano-fiandesio's full-sized avatar
🏠
Working from home

Luciano Fiandesio luciano-fiandesio

🏠
Working from home
View GitHub Profile
git branch | grep -v "master" | xargs git branch -D
@luciano-fiandesio
luciano-fiandesio / Hard_reset_a_ branch.sh
Last active October 3, 2019 13:31
[Hard reset a branch] #git
git reset --hard <branch-name>
# Will reset current branch to master
git reset --hard master
# Undo last commit
git reset HEAD~
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on file.7z file.txt
@luciano-fiandesio
luciano-fiandesio / show_postgres_config_file.sh
Created October 3, 2019 13:32
Show Postgres config file location #postgres
psql -U postgres -c 'SHOW config_file'
@luciano-fiandesio
luciano-fiandesio / cut.sh
Last active October 4, 2019 08:30
cut from line to line #utility #commandline
sed -n '71524,73549p' somelog.log > extracted.log

Keybase proof

I hereby claim:

  • I am luciano-fiandesio on github.
  • I am lucianof (https://keybase.io/lucianof) on keybase.
  • I have a public key ASBpu2IpGWWLlWrlnDHiF0iAswkC3YeVQtj5sC3yFVBxsgo

To claim this, I am signing this object: