Italy

Italy

Compile a list of all Facebook-owned IPs

Sometimes you want to block all Facebook IPs for various reasons (1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ). Sometimes you really really do want that (and you should do it), so compiling a list with all the IPs is easy (both IPv4 and IPv6):

$ whois -h whois.radb.net '!gAS32934' | \
	tr ' ' '\n' | \
	awk '!/[[:alpha:]]/' > facebook-ips-ipv4.txt
$ whois -h whois.radb.net '!6AS32934' | \
	tr ' ' '\n' | \
	grep '::' > facebook-ips-ipv6.txt

And a list of Facebook-owned IPs will be saved into the facebook-ips-{ipv4/ipv6}.txt files, ready to be used.

macOS changing wallpaper

Changing the wallpaper on macOS is really easy from CLI using Open Scripting Architecture (OSA) and its tool osascript: $ osascript -e 'tell application "System Events" to set picture of every desktop to ("~/Pictures/wallpapers/cool_wallpaper.jpg" as POSIX file as alias)' Same thing using Javascript for Automation (JXA) . Save the code below to a file named change_wallpaper.js for example. var system_events = Application('System Events'); for (desktop_item in system_events.desktops) { system_events.desktops[desktop_item].picture = '~/Pictures/wallpapers/cool_wallpaper.

Azure and Full Disk Encryption

Introduction

Here is a small tutorial on encrypting a Microsoft Azure virtual machine disk.

Preparing the Azure Virtual Machine

Enable the Azure Key Vault provider within your Azure subscription.

$ az provider register -n Microsoft.KeyVault

Create a resource group in your favorite location (keep in mind different locations enable different features, some VM sizes are not available in other locations).

The Starfish Parable

One day an old man was walking along the beach. It was low tide, and the sand was littered with thousands of stranded starfish that the water had carried in and then left behind.

The man began walking very carefully so as not to step on any of the beautiful creatures. Since the animals still seemed to be alive, he considered picking some of them up and putting them back in the water, where they could resume their lives.

The man knew the starfish would die if left on the beach’s dry sand but he reasoned that he could not possibly help them all, so he chose to do nothing and continued walking.

Soon afterward, the man came upon a small child on the beach who was frantically throwing one starfish after another back into the sea. The old man stopped and asked the child, “What are you doing?”

“I’m saving the starfish,” the child replied.

“Why waste your time?… There are so many you can’t save them all so what does is matter?” argued the man.

Without hesitation, the child picked up another starfish and tossed the starfish back into the water… “It matters to this one,” the child explained. Loren Eiseley, 1999