Plurrrr

week 26, 2019

Awk by example

In this series of articles, I’m going to turn you into a proficient awk coder. I’ll admit, awk doesn’t have a very pretty or particularly “hip” name, and the GNU version of awk, called gawk, sounds downright weird.

In the evening I read Awk by example the first in a series by Daniel Robbins to refresh my awk knowledge. While I am mostly a Perl programmer, and use now and then Perl one-liners to solve small problems, I like to have tools like awk in my toolkit as well.

What's listening on port 8080

Today, while experimenting with CockroachDB I noticed that a process was already listening on TCP port 8080. I used netstat — which I had to install first — to discover which process was listening on port 8080.

The fact that I had to install netstat on Ubuntu 19.04 led me to conclude that there was an alternative command to get the same information, and indeed: ss, another utility to investigate sockets according to its man page.

In the evening I used

ss -lptn

to find the names of all TCP listening processes.

The options I used (combined) are:

  • -l, --listening: Display only listening sockets.
  • -p, --processes: Show process using socket.
  • -t, --tcp: Display TCP sockets.
  • -n, --numeric: Do not try to resolve service names.

Regarding the latter, this shows 8080 instead of http-alt for port 8080.

Since I wanted to keep that process listening on port 8080 running I had to find an alternative port for CockroachDB, which can be specified with the --http-addr option as follows:

cockroach start \
    --certs-dir=$CERTS \
    --listen-addr=localhost \
    --http-addr=localhost:8200

Looking inside the box

This blog post talks about reverse engineering the Dropbox client, breaking its obfuscation mechanisms, de-compiling it to Python code as well as modifying the client in order to use debug features which are normally hidden from view.

Source: Looking inside the box.

Brassavola nodosa, another new growth

In the afternoon, while watering my mother's Brassavola nodosa orchid I noticed another new growth, the third this month.

Brassavola nodosa with three new growths
Brassavola nodosa with three new growths.

In the above photo you can see to the left the third new growth. And to the right, bottom and top, the growths I discovered earlier.

Raspberry Pi 4 on sale now from $35

We have a surprise for you today: Raspberry Pi 4 is now on sale, starting at $35. This is a comprehensive upgrade, touching almost every element of the platform. For the first time we provide a PC-like level of performance for most users, while retaining the interfacing capabilities and hackability of the classic Raspberry Pi line.

The highlights of the Raspberry Pi 4 Model B are:

  • A 1.5GHz quad-core 64-bit ARM Cortex-A72 CPU (~3× performance)
  • 1GB, 2GB, or 4GB of LPDDR4 SDRAM
  • Full-throughput Gigabit Ethernet
  • Dual-band 802.11ac wireless networking
  • Bluetooth 5.0
  • Two USB 3.0 and two USB 2.0 ports
  • Dual monitor support, at resolutions up to 4K
  • VideoCore VI graphics, supporting OpenGL ES 3.x
  • 4Kp60 hardware decode of HEVC video
  • Complete compatibility with earlier Raspberry Pi products

Source: Raspberry Pi 4 on sale now from $35.