Beware when base64-encoding on the CLI using echo

Recently I needed to base64-encode a string. To do this I turned to the CLI and piped the output of echo to base64. # Don’t use! Correct command further down this post. $ echo ‘test’ | base64 dGVzdAo= Although the output looks quite good, things didn’t quite work out when using the string: it failed …

bandwhich – Terminal bandwidth utilization tool

bandwhich sniffs a given network interface and records IP packet size, cross referencing it with the /proc filesystem on linux or lsof on macOS. It is responsive to the terminal window size, displaying less info if there is no room for it. It will also attempt to resolve ips to their host name in the …

Open your React Native’s Xcode project file from the CLI with xed

For a long time I always used the open command to open the Xcode project file contained inside React Native Projects. bramus in ~/repos/projects/react-native/example $ open ios/Example.xcodeproj It wasn’t until I recently started a new React Native project that react-native init afterwards informed me to use xed instead. The xed tool launches the Xcode application …

Bash/Shell Autocompletion for Composer

The other day I opened up a PHP project that I hadn’t worked on in a while. No longer remembering which Composer Scripts I had defined for it, I needed to take a peek inside composer.json to see which ones were available to me. Then it hit me: why is there no autocompletion for composer …

Instagram Terminal Feed

Forget about that Instagram for Windows 95, and go for the real deal: Instagram on the CLI: Sometimes checking your instagram during work is kind of strange, so why not check your instagram inside your terminal? OK… I know checking this during work is still strange… 😑 To be honest, I did this just for …

Trigger macOS notifications from the CLI with node-notifier-cli

$ notify -t “Hello” -m “My Message” -s –open http://github.com $ notify -t “Agent Coulson” –icon https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg $ notify -m “My Message” -s Glass $ echo “My Message” | notify -t “Hello” Installation per NPM/Yarn: yarn global add node-notifier-cli TIP: As with many packages you can also run it using the aforementioned npx: npx -p …

Easily Start and Stop Docker Compose Projects with Captain

Jens Segers has created a handy shell script to easily start/stop Docker Compose based projects: Captain searches for docker-compose projects in your $HOME folder and allows you to start and stop those projects by passing a part of the parent directory name. Let this small recording of Captain in action convince you: Captain → Related: …

Axel — Command Line Download Accelerator

Via @benschwarz: Axel tries to accelerate the downloading process by using multiple connections for one file, similar to DownThemAll and other famous programs. It can also use multiple mirrors for one download. Axel → Getting sudden flashbacks to this old fart here: Think it was 1999 or 2000 when I first use FlashGet (then named …