-
How to enable Vim 9's new popup menu
vim 9.0 has been released. I haven’t done much with it, but I did immediately go and enable the new popup menu for autocompletions. It’s so much nicer than having the autocompletion options running horizontally across the screen.
-
A handy collection of shell aliases from my bash startup
A common topic in the
#shell
channel in the Chicago Tech Slack is what people have as shell aliases. Here are some handy aliases from myaliases.sh
that runs at shell startup. -
ack 3.3.0 improves error messages, makes file selection quicker
The new version v3.3.0 of the greplike code search tool ack has been released.
-
An unexpected benefit of thinking functional in Perl
Dec 4, 2019 • Perl, Programming • functional programming, List::Util, Perl::Critic
I’ve been reading more and more about functional programming over the past year, and working in Python where many things are immutable, and I’m trying to incorporate them into my Perl code.
-
Set up tab completion for ssh and scp
Tab completion is a ubiqutious time-saver, and I use it everywhere I can. Here’s how I set it up to autocomplete hostnames when I use the
ssh
orscp
commands. -
Update your bash prompt to give each hostname a different color
I SSH in to many different computers all day, and sometimes I get confused by what machine I’m on. I was thinking about assigning a different color in my bash prompt for each machine, but I thought that would get tiresome coming up with a new color for each new box that I had to log in to. I mentioned this in the Chicago Tech Slack and Josh Symonds suggested “Some prompts do some hashing on hostnames to turn the prompt a different color based on that.”
-
ack 3.1.0 allows searching ranges of lines in a file
The new version v3.1.0 of the greplike code search tool ack has been released. It now allows the user to search through ranges of lines in a file, rather than the entire file.
-
A collection of coding horrors
Jun 19, 2019 • Programming, SQL • Coding Horror, monoculture
Back in the ’00s I worked on a codebase that was maintained by one programmer. He did everything himself, and learned from no one. I see this collection of coding horrors as a testament to the dangers of working in a monoculture.
-
ack 3.0.0 has been released
ack 3 is a greplike tool optimized for searching large code trees. It’s available at https://beyondgrep.com.
-
ack 2.28 has been released with new color charts
Mar 18, 2019 • Perl, ack • Convert::Color
I’ve released ack 2.28 to the CPAN. This release doesn’t add any major new features, but for those who like to customize things, there are two new help options:
--help-colors
and--help-rgb-colors
. -
Don't keep backups on your web server, even if you think they're secret
Aug 9, 2018 • Security
It's good to keep backups of website's HTML and other assets. A common way to do backups, if you're not using some sort of version control system like Git, is to make a zip of the entire document tree. Usually it'll just get called "website.zip" or maybe "website-20180810.zip" or whatever the current date is.
It's a fine way to take a snapshot, but don't leave it on your web server in your website's document tree. The document tree is that folder where you upload the files, like /sites/mysite. If you make a zip or tarball or similar and leave it as /sites/mysite/mysite.zip, you're asking for it to be stolen by bad guys. Maybe you've got PHP files in there that have secrets in them, like connection passwords to your database. Maybe you've got original work files like the .psd files that you created your .jpg files from. If you don't want it seen, don't put it in your document tree.
"No way, nobody knows it's there", you may think. You don't link to the backup file anywhere, and there's no directory listing on the server. This idea is called "security through obscurity", and it's not security at all. It turns out that the bad guys don't have to know a file is there. They just have to make a lucky guess.
-
How to use templates in vim
For many kinds of files, when you create a new one from scratch, it would be handy to have part of the file created from a boilerplate template every time. For example, whenever I want to create a Perl file, it should start like this:
#!/usr/bin/perl
-
ack 2.24 is released, speeds up common cases
Jun 21, 2018 • Programming, Perl, ack
I’ve just uploaded a new version of ack, version 2.24, to the CPAN and posted it to beyondgrep.com.
-
The best open source project for someone might not be yours, and that's OK
Jan 2, 2018 • Open source • ack, ag, git-grep, grep, ripgrep
If you work on an open source project, consider helping your users by pointing them to other “competing” projects that might be better choices for them.
-
Skip the exit interview when you leave your job
Mar 31, 2017 • Work life • exit interviews
When it’s time to leave your job, someone from Human Resources may want to sit you down and have an “exit interview”. They’ll ask you questions like “Why are you leaving your position?” and “What was it like to work with your manager.” It’s done with this premise that they’re looking to make the company better.
-
How to talk in an interview about problems at your past job without coming off as a complainer
Nov 4, 2013 • Interviews • complaining
Someone on reddit asked “Why is talking bad about a previous job a taboo? What’s wrong with complaining? It’s showing dissatisfaction with the rules or environment. If I see a rule that’s unfair or inefficient, isn’t it in the company’s best interest to let them know in order to fix the issue?”
-
Make the Linux chkconfig service list easier to read
Oct 4, 2013 • Programming, Unix, Perl • chkconfig
If you run a Linux box, and you want to see what services start up at which level, you use runlevel:
-
Those "illegal job interview questions" aren't illegal on their own
Sep 22, 2013 • Interviews • discrimination, illegal questions
It’s common knowledge that it’s illegal for US employers to ask about your age, sex, religion, marital status, national origin, or other protected statuses. Thing is, it’s not illegal for them to ask. It’s illegal for them to discriminate, but it’s not illegal to ask. Still, the idea of the “illegal interview questions” is a common one. Search for “illegal interview questions” on Google and you’ll get 50,000 hits. Lots of blog posts and news articles, but nothing from anyone I see as a legal authority.
-
The simple math of why your resume probably isn't getting read.
You spend hours slaving over your resume, crafting every word of every bullet point, and yet you’re getting no interest from the companies you send the resume to. Maybe your problem is that you’re ignoring the most important part of your resume: The first half-page, or the first screenful.
-
My bash prompt with git/svn branch+status display
Apr 24, 2013 • Unix • bash, Git, prompt, Rob Hoelz, Subversion
After spending a few hours last night switching between three different branches in the ack2 project, and typing "git br" over and over, I decided I needed to put branch status in my bash prompt. The only question was: Which one would I steal? Fortunately, Rob Hoelz was online and I mentioned it to him and he handed me his, so I stole it and also added Subversion support as well.
-
How to enable Vim 9's new popup menu
vim 9.0 has been released. I haven’t done much with it, but I did immediately go and enable the new popup menu for autocompletions. It’s so much nicer than having the autocompletion options running horizontally across the screen.
-
A handy collection of shell aliases from my bash startup
A common topic in the
#shell
channel in the Chicago Tech Slack is what people have as shell aliases. Here are some handy aliases from myaliases.sh
that runs at shell startup. -
ack 3.3.0 improves error messages, makes file selection quicker
The new version v3.3.0 of the greplike code search tool ack has been released.
-
An unexpected benefit of thinking functional in Perl
I’ve been reading more and more about functional programming over the past year, and working in Python where many things are immutable, and I’m trying to incorporate them into my Perl code.
-
Set up tab completion for ssh and scp
Tab completion is a ubiqutious time-saver, and I use it everywhere I can. Here’s how I set it up to autocomplete hostnames when I use the
ssh
orscp
commands. -
Update your bash prompt to give each hostname a different color
I SSH in to many different computers all day, and sometimes I get confused by what machine I’m on. I was thinking about assigning a different color in my bash prompt for each machine, but I thought that would get tiresome coming up with a new color for each new box that I had to log in to. I mentioned this in the Chicago Tech Slack and Josh Symonds suggested “Some prompts do some hashing on hostnames to turn the prompt a different color based on that.”
-
ack 3.1.0 allows searching ranges of lines in a file
The new version v3.1.0 of the greplike code search tool ack has been released. It now allows the user to search through ranges of lines in a file, rather than the entire file.
-
A collection of coding horrors
Back in the ’00s I worked on a codebase that was maintained by one programmer. He did everything himself, and learned from no one. I see this collection of coding horrors as a testament to the dangers of working in a monoculture.
-
ack 3.0.0 has been released
ack 3 is a greplike tool optimized for searching large code trees. It’s available at https://beyondgrep.com.
-
ack 2.28 has been released with new color charts
I’ve released ack 2.28 to the CPAN. This release doesn’t add any major new features, but for those who like to customize things, there are two new help options:
--help-colors
and--help-rgb-colors
. -
Don't keep backups on your web server, even if you think they're secret
It's good to keep backups of website's HTML and other assets. A common way to do backups, if you're not using some sort of version control system like Git, is to make a zip of the entire document tree. Usually it'll just get called "website.zip" or maybe "website-20180810.zip" or whatever the current date is.
It's a fine way to take a snapshot, but don't leave it on your web server in your website's document tree. The document tree is that folder where you upload the files, like /sites/mysite. If you make a zip or tarball or similar and leave it as /sites/mysite/mysite.zip, you're asking for it to be stolen by bad guys. Maybe you've got PHP files in there that have secrets in them, like connection passwords to your database. Maybe you've got original work files like the .psd files that you created your .jpg files from. If you don't want it seen, don't put it in your document tree.
"No way, nobody knows it's there", you may think. You don't link to the backup file anywhere, and there's no directory listing on the server. This idea is called "security through obscurity", and it's not security at all. It turns out that the bad guys don't have to know a file is there. They just have to make a lucky guess.
-
How to use templates in vim
For many kinds of files, when you create a new one from scratch, it would be handy to have part of the file created from a boilerplate template every time. For example, whenever I want to create a Perl file, it should start like this:
#!/usr/bin/perl
-
ack 2.24 is released, speeds up common cases
I’ve just uploaded a new version of ack, version 2.24, to the CPAN and posted it to beyondgrep.com.
-
The best open source project for someone might not be yours, and that's OK
If you work on an open source project, consider helping your users by pointing them to other “competing” projects that might be better choices for them.
-
Skip the exit interview when you leave your job
When it’s time to leave your job, someone from Human Resources may want to sit you down and have an “exit interview”. They’ll ask you questions like “Why are you leaving your position?” and “What was it like to work with your manager.” It’s done with this premise that they’re looking to make the company better.
-
How to talk in an interview about problems at your past job without coming off as a complainer
Someone on reddit asked “Why is talking bad about a previous job a taboo? What’s wrong with complaining? It’s showing dissatisfaction with the rules or environment. If I see a rule that’s unfair or inefficient, isn’t it in the company’s best interest to let them know in order to fix the issue?”
-
Make the Linux chkconfig service list easier to read
If you run a Linux box, and you want to see what services start up at which level, you use runlevel:
-
Those "illegal job interview questions" aren't illegal on their own
It’s common knowledge that it’s illegal for US employers to ask about your age, sex, religion, marital status, national origin, or other protected statuses. Thing is, it’s not illegal for them to ask. It’s illegal for them to discriminate, but it’s not illegal to ask. Still, the idea of the “illegal interview questions” is a common one. Search for “illegal interview questions” on Google and you’ll get 50,000 hits. Lots of blog posts and news articles, but nothing from anyone I see as a legal authority.
-
The simple math of why your resume probably isn't getting read.
You spend hours slaving over your resume, crafting every word of every bullet point, and yet you’re getting no interest from the companies you send the resume to. Maybe your problem is that you’re ignoring the most important part of your resume: The first half-page, or the first screenful.
-
My bash prompt with git/svn branch+status display
After spending a few hours last night switching between three different branches in the ack2 project, and typing "git br" over and over, I decided I needed to put branch status in my bash prompt. The only question was: Which one would I steal? Fortunately, Rob Hoelz was online and I mentioned it to him and he handed me his, so I stole it and also added Subversion support as well.