There's a gui app on top of the script, so not sure if it counts, but I find SelfControl (selfcontrolapp.com) indispensible for staying focused each day.
Ask HN: What are some small scripts you use daily?
41–50 of 59 posts
Re: Ask HN: What are some small scripts you use daily?
#42I have a small perl script I wrote called helpme by default it shows a list of topics. Then if you run it with the topic, it displays the details about the topic. I use it to remember how to do less frequent stuff at my day job.
Re: Ask HN: What are some small scripts you use daily?
#43Biggest timesaver in the world for someone who listens to as much music as I do and doesn't want to deal with manually transcoding FLAC files.
iTunes and Apple Music will soon support FLAC natively, though -- previously it was out of necessity, space, and not wanting to use VLC and lose my main/single use of my Apple Watch. It's still about the latter two.
I recently also set it to output a manifest that I can feed into rsync on my work computer to pull my library from my backup server.
Re: Ask HN: What are some small scripts you use daily?
#44 $ cat `which did`
grep $1 ~/.bash_history | sort | uniq
I also set HISTSIZE=10000000I don't mind having a large history file laying around because it's so useful.
Re: Ask HN: What are some small scripts you use daily?
#45#!/bin/bash
for i in /sites/*/.git; do ( echo $i; cd $i/..; git pull; ); done
Re: Ask HN: What are some small scripts you use daily?
#46I call this blingle. I call it after any long running operation that I want to be notified of. It pops a desktop notification and sends a push message to my phone. eg: make deploy; blingle #!/bin/bash MSG=${@:-"Job complete"} notify-send "$MSG" curl -s \ --form-string "token=TOKEN" \ --form-string "user=UID" \ --form-string "message=$MSG" \ https://api.pushover.net/1/messages.json
Re: Ask HN: What are some small scripts you use daily?
#47https://github.com/skx/sysadmin-util
That seems to be somewhat popular on github, but I rarely receive feedback so I'm not sure if people star because they use them too, or just because they suspect they might.
Re: Ask HN: What are some small scripts you use daily?
#48I use this to do a `git pull` on all of my folders inside of my "sites" folder: #!/bin/bash for i in /sites/*/.git; do ( echo $i; cd $i/..; git pull; ); done
https://myrepos.branchable.com/
For example I store all my repos beneath ~/Repos/ so I can update them all, checking out any missing ones with:
cd ~/Repos/
mr checkout
mr updateRe: Ask HN: What are some small scripts you use daily?
#49`watch-copy [copy to dir]`, which watches for changes in the current directory and builds and copies to another directory.
`set-lights [group name] [on/off/high/low]`, which posts commands to a Hue bridge.
Re: Ask HN: What are some small scripts you use daily?
#50Over the years I’ve taught some of my (macOS user) co-workers the magic of the Automator.app It’s transformed the office. It’s the little things ya know.