Live data from Hacker News

Ask HN: What are some small scripts you use daily?

news.ycombinator.com

41–50 of 59 posts

Re: Ask HN: What are some small scripts you use daily?

#41

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.

I've installed it recently but some sites are hard. For example, I'd block YouTube in the blink of an eye, but what if I really need to look up a video tutorial or something in the middle of a work session?

Re: Ask HN: What are some small scripts you use daily?

#43
https://github.com/david-cako/flac-phobic

Biggest 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
I have a lil thing I call "did" that just greps my shell history for a term, sorting and de-duplicating the result:

    $ cat `which did`
    grep $1 ~/.bash_history | sort | uniq

I also set HISTSIZE=10000000

I 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?

#46

I 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

For a free alternative, check instapush.im or pushbullet

Re: Ask HN: What are some small scripts you use daily?

#47
I created a git-repository of the scripts I use often:

https://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?

#48

I 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

Take a look at `mr` which allows you to script updating/checking out/etc on a large number of git, mercurial, and other repositories:

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 update

Re: Ask HN: What are some small scripts you use daily?

#49
`watch-reload [watch dir] [reload domain]`, which watches for changes in a directory and triggers a reload for tabs matching a certain domain using a Chrome extension.

`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.

Post reply on HN