T••LBX: Blog

Tag: shell

Some great books for programmers that StackOverflow cannot replace

Here is a list of very good books that you might want to read if you are a programmer, or intend to become one. They will teach you many things about general reasoning, testing, command line utilities , management and more.

The problem with loops in tests

I have used loops in tests many times. Sometimes for iterating through an array of inputs, sometimes an array of tuples with an input and the expected output. It is a very convenient and dry way to code a test when you want to test against a lot of cases. But there is a problem with this approach.

Elm type declarations demystified

While trying to learn Elm, I came across a few concepts that were not easy to grasp. Especially when it comes to types and the syntax. I struggled with the difference between type and type alias. I struggled with understanding what was going on in a type declaration. I also struggled with the many different things that are written in module-case and separate them. We will try to answer all these questions here.

Convert images for web using the Sips command line on MacOSX

We will see how to convert a folder of images to make them safe for web using the Mac OSX command line tool Sips. First in a shell script and then an Applescript version if you want to share this functionality with less technical users.

Zshell version of the flasher function

The flasher function is just a small command which flashes your screen until you press any key. It is usually put at the end of a long running process in order to indicate that the job is finished.

Applescript to show unread emails in the terminal

If you are on OSX and use Mail.app, but work a lot in the command line and would like a simple command to print a summary of unread emails, then this post is for you.

Delete any Git branch the easy way

I don't know about you but each time I want to delete a remote branch in Git, I always end up looking online. Here is a function which will delete any branch, remote or local, with the same syntax.

Zshell path modifiers

You probably already know a few ways to transform variables inherited from Bash. If not, you should check them out because they are really useful. They allow you to get a substring, substitute a word for another, etc. Here are a few variable modifiers for handling paths.

Dispatch Kemal websocket messages with Redis Pub/Sub

We will see how we can dispatch the websocket messages with Redis using Pub/Sub so that we can scale across multiple server instances.

Introduction To Jobs In The Terminal

Essentially, jobs are processes which you started from your terminal session. You see all processes with the ps command, but processes which you started from one terminal session are also in your jobs and the shell has built-in functions to operate on them and improve your workflow.

Introduction To Bit Hacking

Bit hacking is what you do when you read, write or modify bits. Reading or writing bytes is fairly trivial, but a byte is the smallest chunk that most languages deal with. If you want to access the bits, you'd have to use what are called bitwise operators like "or", "and", "xor" or "shift".