Do you want to copy a terminal output to the clipboard? You can do it by piping the command to the pbcopy
command:
pwd | pbcopy
This will copy the current directory to the clipboard.
[Permalink]Do you want to copy a terminal output to the clipboard? You can do it by piping the command to the pbcopy
command:
pwd | pbcopy
This will copy the current directory to the clipboard.
[Permalink]My Macbook’s touch bar is crashing quite frequently. This is how to reset it.
sudo pkill TouchBarServer
Sometimes it’s time to start over. This script will delete all git branches but one called develop
.
git branch --v | grep "develop" -v | awk '{print $1}' | xargs git branch -D
If you don’t trust me, don’t worry, I don’t trust myself either. Just remove the | xargs git branch -D
, and the script will only print the result.
You tried all the possible combinations of prune
, you still have branches you want to kill. Try this:
git branch --v | grep "\[gone\]" | awk '{print $1}' | xargs git branch -D
If you don’t trust me, don’t worry, I don’t trust myself either. Just remove the | xargs git branch -D
, and the script will only print the result.
If you want to uncheck all viewed files you can uncheck them using JavaScript
document.querySelectorAll('.js-reviewed-checkbox').forEach(c => c.checked ? c.click() : null)
If I’m going to Google every time I need to kill a process locking a port let’s at least get to my site
lsof -ti:8081 | xargs kill