dovydas.xyz

A Blog About Python & Linux

Sep 12, 2019

Functions are first-class citizens in JavaScript

first class citizen entity/type An entity that supports all operations other entities have. This means first-class citizens can be passed, returned & assigned etc. To simply put it this means...

Sep 12, 2019

Installing prerequisites for LetsEncrypt Certbot versions 6.X, 7.X and up

I ran into an issue today when I could not install certbot-auto on a Linux machine running CentOS 6.10. As it turns out that you need to install & enable...

Jun 21, 2019

Initiliazing python byte objects with value of 0b1111...

Context After trying to implement my own “one time pad (OTP)” file encryption. I ran into an issue that I needed large byte object sequence to write proper unit tests...

Jun 7, 2019

Thou Shall Yield Pythonic Generator

Intro This is a illustrative example code, which tries to demonstrate how generators and yield statements are related in python. print("# `yield` a fancy way of pausing execution of a...

Jan 20, 2019

Modifying Android Phone To Run Without a Battery

Abstract I had few use cases where I needed an constantly on Android phone. The issue with keeping any device constantly charging is that their battery will suffer. In case...

Nov 5, 2018

Creating Multiple Folders From a Bash Array

About this snippet This snippet allows you to create a series of directories, that are a part of a regular bash array. This is super useful if you have bunch...

Aug 25, 2018

Newsboat + Bitchute + mpv + youtube-dl

$0: Why? First of all RSS is still qualifies as a great technology. Even though RSS faded to obscurity in the past 8 years or so it is still very...

Aug 19, 2018

Few lessons I learned after using python fabric 1.x

Fabric is a great framework for executing code on remote & local machines. The 1.X had a pretty good documentation, but workflows and tools were not so clearly established after...

Aug 1, 2018

Adding Arbitrary Attributes To Python Class

The Problem You want to create a dummy class that stores arbitrary attributes and you want to access these attributes via . (dot) operator e.g. myClass.age. You can easily do...

Jul 21, 2018

Allow Developers To Deploy Straight To Production

In times when continous integration is a new fad there still exists legacy systems which are not suitable for this flexible way of applying changes. This means that your company...

Jul 13, 2018

Grice's Maxims Pythonic Edition

Which is better verbose paragraphs or lean and on point sentences? Why communication with other people can sometimes be so hard sometimes, even though we you are discussing basic things?...

Jul 7, 2018

Creating A Production Ready Django App, pt. 2

Intro Before reading this, please make sure you are familiar with concepts and ideas covered in the pt.1 of this post. This post will be short and will simply create...

Jul 1, 2018

Creating A Production Ready Django App, pt. 1

Intro This post will demonstrate a production tested and simplified configuration for Django framework. This is a two part blog post. In the first part we will mainly focus how...

Jun 23, 2018

Introduction on REST authentication

Glossary HTTP Header All data found in the HTTP request that starts after very first “\n” and end at the boundries of two “\n\n” characters. HTTP headers usually look similar...

Jan 22, 2018

A thorough guide on controlling anything SSH with Homeassistants's Hass.io

Intro What is SSH and how to use it for controlling other machines SSH is a powerfull command line-tool allowing you to connect to a remote machine and do basically...

Oct 29, 2017

Issuing and managing client side certificates using Python

** Glossary Key a piece of cryptographic information used for encrypting data by a chosen algorithm Certificate Signing Request CSR a process in which person or server asks for his...

Jul 23, 2017

🏡 Adding more features to Hyperion in Homeassistant

Intro After playing around with Hyperion I really liked it. I liked it so much that I decided to implement it in my smart-home setup. I currently use Hyperion for...

Nov 29, 2016

What Is Game State Integration?

Intro Controversial CS:GO winter update (12/17/2015) had community raging about ridiculous changes to weapon mechanics as well as the notoriously OP R8 revolver. Due to high dissatisfaction and many other...

Proudly representing Lithuania 🇱🇹 as dovydasgulbinas