Bash scripts are a great way to automate simple tasks in our electronic day-to-day life. Once you get used to writing them, it easily becomes a productivity increasing habit. Here's a list of my most often used bash features and constructs. Shebang and Options I like to start every bash script with the following 3 lines: #!/usr/bin/env bash set -e set noclobber The first is the shebang line which lets us run the script as executable. Note the use of env which makes the
File input opeations in perl, python and ruby feels almost as if they were written by the same person. In this post I'd like to examine their similarities and differences, and hopefully learn something about the philosophy of the languages themselves. Our Task A unix filter is a command that takes its input from stdin, though most filters also allow input from files passed in as command line arguments. Take wc for example: $ ls | wc $ wc /etc/passwd $ wc /etc/passwd /etc/shells All 3 work
A good way to understand how complex mechanisms work is to build a simpler version of them from scratch. As most modern JS frameworks provide some sort of client side routing, writing our own will improve our understanding of those frameworks.
Reading the source code of 3 popular middlewares to understand how to write new ones.