Free Hotel Wifi with Python and Selenium -

Recently I took my annual leave and decided to visit my friend during the holidays. I stayed at a hotel for a few days but to my surprise, the hotel charged money to use their wifi. In $DEITY‘s year 2000 + 18, can you imagine? But they are not so cruel. You see, these generous people let you use the wifi for 20 minutes. 20 whole minutes. That’s almost half a Minecraft video.

···

Mastodon Bot in Common Lisp -

If you post a programming article to Hacker News, Reddit or Lobsters; you will notice that soon after it gets to the front page, it gets posted to Twitter automatically. But why settle for Twitter when you can have this on Mastodon? In this article we will write Mastodon bot that regularly checks the Lobste.rs front page and posts new links to Mastodon. Since this is a Mastodon bot, let’s start by sending a post to our followers.

···

Fetching ActivityPub Feeds -

Mastodon is a federated social network that uses the ActivityPub protocol to connect separate communities into one large network. Both Mastodon and the ActivityPub protocol are increasing in usage every day. Compared to formats like RSS, which are pull-based, ActivityPub is push-based. This means rather than your followers downloading your feed regularly to check if you have shared anything, you send each follower (or each server as an optimization) the content you shared.

···

Generating Vanity Infohashes for Torrents -

In the world of Bittorrent, each torrent is identified by an infohash. It is basically the SHA1 hash of the torrent metadata that tells you about the files. And people, when confronted with something that’s supposed to be random, like to control it to some degree. You can see this behaviour in lots of different places online. People try to generate special Bitcoin wallets, Tor services with their nick or 4chan tripcodes that look cool.

···

Writing a Simple IPFS Crawler -

IPFS is a peer-to-peer protocol that allows you to access and publish content in a decentralized fashion. It uses hashes to refer to files. Short of someone posting hashes on a website, discoverability of content is pretty low. In this article, we’re going to write a very simple crawler for IPFS. It’s challenging to have a traditional search engine in IPFS because content rarely links to each other. But there is another way than just blindly following links like a traditional crawler.

···

Writing a Simple D-Bus Service in Python -

D-Bus is a message bus that Linux systems use in order to make programs communicate with each other or with the system itself. It allows applications to integrate amongst themselves using well-defined interfaces. This allows each application to provide services that can be used by others, sort of like adding API’s to your programs. In this article, we’re going to write a small D-Bus service and a client to consume it.

···

Evolving Line Art -

In this article, I want to talk about a really simple technique for evolving line-art from pictures. On top of being an simple example for genetic algorithms, it is also a fun programming project that can be done in short time. For this project, we are going to use the Hill Climbing algorithm. The algorithm for evolving pictures is like the following. Create two empty images, image 1 and image 2 Do a small random modification (like a line) to the first image If the first image is closer to the target than the first one, copy it to image 2 Otherwise, copy the second image to image 1 Goto 2 I will be using Rust for this project.

···

Welcome 2018! -

Hello dear readers, welcome to another episode of “New Year, New Me”. First of all, I want to wish everyone a happy new year. Hopefully, 2018 will be full of happiness, health and success for you. For a variety of reasons some of you might have had a bad year. But worry not; because 2018 is here and whatever your goals were, you can keep trying. Today I want to reflect upon the previous year and make some resolutions about the upcoming one.

···

Putting My Blog on IPFS -

I’ve always been fascinated by the idea of peer-to-peer network protocols, and putting my website on a distributed network was something I’ve been meaning to do for a while. The recent increase in blog posts about IPFS finally pushed me over the tipping point. Hopefully, you can read this article on IPFS here. I am really happy with this change, and I urge everyone to do the same with their websites.

···

Unprotected Redis Instances in the Wild -

If you follow programming blogs, it is not uncommon to come across articles that mention how MongoDB exposes your private information without any protection on default settings. But Mongo is not alone in this. Even with sane defaults, it is possible to find that a lot of people have misconfigured their databases for their convenience. In this list of exposed servers is our beloved Redis. Redis is normally highly praised among developers.

···