It’s transformed the office. It’s the little things ya know.
Ask HN: What are some small scripts you use daily?
31–40 of 59 posts
Re: Ask HN: What are some small scripts you use daily?
#32Re: Ask HN: What are some small scripts you use daily?
#33Re: Ask HN: What are some small scripts you use daily?
#34I run an AHK script with a little over 2000 abbreviations (e.g. typing 'abbn' expands to 'abbreviation'). It helps me type 100+ WPM without too much strain.
That's a cool idea. Do you have your file posted anywhere? If not I may cook something up on my own, I'm curious to try it out.
Re: Ask HN: What are some small scripts you use daily?
#35 #!/usr/bin/env python
import sys
def unescape(string):
print eval(string)
if __name__ == '__main__':
unescape(sys.stdin.read())Re: Ask HN: What are some small scripts you use daily?
#36 #!/bin/bash
xrandr --output DVI-I-1 --brightness $1
xrandr --output HDMI-0 --brightness $1
xrandr --output DVI-D-0 --brightness $1
~Re: Ask HN: What are some small scripts you use daily?
#37push -> git push origin develop; git push origin master; git push origin --tags; terminal-notifier -title "Pushed to Git" -message "Project X"
In another directory, push may push different branches. Ditto for pull, release, keep, etc
Use them daily.
Re: Ask HN: What are some small scripts you use daily?
#38I created a Perl script called anyconnector which allows me to jump around between different Cisco Anyconnect VPN's using details stored in KeePass entries. e.g. To connect: anyconnector -c env-name Disconnect: anyconnector -d Get status: anyconnector -s It gets used by my team all day, every day.
Re: Ask HN: What are some small scripts you use daily?
#39The most common one I use all the time is one that changes the command prompt to show what git branch I'm on when in that directory. Just google it if you'd like.
If you repeat some command a lot or a chain of commands and it takes a lot of tedious typing, then script it.
Re: Ask HN: What are some small scripts you use daily?
#40I wrote a Docker helper script, which resets it to a baseline state when I need to clear out cruft post-restart. I call it harpoon, so I can harpoon the whale when I go to restart my dev machine.