I have a trackball by Logitech and it's super awesome. Well, almost. The previous incarnation was a Logitech Trackman Wheel which used a cord and was my preferred pointing device. It never suffered from the "oops my battery is dead and now I have to replace it" problem, it felt great and Just Works.
Until, one day, it didn't anymore :(
I tried everything, even opened up the device and tried to find the issue. Couldn't find it so I set to find a replacement. I quickly discovered that my beloved trackball was no longer sold and was ...
There are many great tools to analyze your webserver's access logfiles. AWstats is one I am very fond of as it creates all kinds of nice graphs and shows a lot of information about the visitors of your website(s). Google analytics is a very popular tool as well.
But sometimes you just want to know what URI is requested a lot, and which IP has accessed your site the most. Perhaps because you suddenly experienced a burst in traffic and want to find out the cause. For this, I've created a simple python script, which can be ...
Co-workers who think they're funny/smart, because you've accidently left your screen unlocked, and altering your background, sending out mails and generally being an ass. We all know them. In the GNOME2 days there was the 'free the fish' joke, which was quite harmless. Nowadays GNOME3 doesn't have that anymore and people start causing havoc to 'teach' you to lock your screen.
Don't get me wrong, not locking your screen is a no-go and marks you as an incompetent noob who shouldn't be allowed to handle sensitive information, but that's not my point. My ...
Here's a few things I have in my ~/.bashrc that make my life easier:
Bash completion for screen sessions, so you can do 'screen -r <tab>'
complete -C "perl -e '@w=split(/ /,\$ENV{COMP_LINE},-1);\$w=pop(@w);for(qx(screen -ls)){print qq/\$1\n/ if (/^\s*\$w/&&/(\d+\.\w+)/||/\d+\.(\$w\w*)/)}'" screen
Google from the commandline:
google() { search="" echo "Googling: $@" for term in $@; do search="$search%20$term" done xdg-open "http://www.google.com/search?q=$search" echo }
Use ^F to search forward in your history (opposite of ^R)
bind '"\C-f": forward-search-history'
Show git status in ...
When you are already using a passphrase on your private SSH key (you should!), once you've entered the passphrase it will be remembered until you either logout or reboot. But most people who're using laptops only reboot when they've just updated major system components and rarely (if ever) log out.
So to secure your SSH sessions even more, add the contents of this little script to /usr/lib/systemd/system-sleep/forget-ssh.sh and make it executable:
#!/bin/bash SSH_AUTH_SOCK=/run/user/1000/keyring/ssh /usr/bin/ssh-add -D
Replace the value of SSH_AUTH_SOCK with whatever suits your ...