RSSAmplifier

Blog

Nduli's World

blog.jnduli.co.keRSS feed ↗79 posts

Latest posts

GUIX OS with GeneNetwork

Guix OS install involves downloading the iso ; setting it on a flash disk with: dd if=guix.iso of=/dev/sdX status=progress ; and using the graphical guide. Some quirks I got were: I needed an internet connection but wifi didn't work out of the box. I used USB tethering …

Generate HTML when Using Markdown in Vimwiki

I moved to markdown in vimwiki but couldn't generate html. VimwikiAll2HTML only supported vimwiki syntax. I explored static site generators looking for one that: didn't require moving my files and folders. didn't need a lot of configuration to set up. I tested out mkdocs , zola , docusaurus and vitepress and only …

Migrate From Vimwiki To Markdown Syntax

Vimwiki supports markdown and I switched to this because: I didn't use the default syntax anywhere else. I could convert to html using only VimwikiAll2HTML . Fixing My Config Vimwiki expects some options set before it loads ( ref ). With lazy , I use init like: { 'vimwiki/vimwiki' , branch = 'dev' , dependencies = { 'mattn/calendar-vim …

SC-IM Color Configuration

I couldn't read cells in sc-im because there was little contrast between the background and foreground colors. I temporarily fixed this by changing my terminal's color scheme, but I'd prefer to keep it. A permanent solution was to change sc-im's colors, for example: color "type=INPUT fg=WHITE bg=BLACK …

Dev Experience For Personal Projects

My personal projects have poor developer experience. Any time I want to fix a bug or improve a service, I experience a lot of frustration . For example, I wanted to upgrade the UI of my pomodoro script to have colors for completed and cancelled tasks, better prompts and mark the …

Testing GUIX

I installed guix with: # Install nscd (name service cache daemon) to help pick up guix libs sudo apt install nscd sudo systemctl enable nscd # install guix # Ref: https://guix.gnu.org/manual/en/html_node/Binary-Installation.html cd /tmp wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install …

Stack Static Missing Library With Guix

I installed stack_static by downloading the binary from github and moving it to .local/bin . I was able to compile haskell programs, but running them failed with the error: $ stack run / home / rookie / projects / random / helloworld /. stack - work / install / x86_64 - linux - tinfo6 / 48795 ad824c5ab2c527b42cc08a43bf5cd587c042c536072710c2302b997bb41 / 9.2 . 5 / bin / helloworld - exe …

Comic Site Migration to SQLite

Postgres was the database for my comic site but I chose to migrate to sqlite because it would: be easier to back up use less resources on my server be one less service to manage I also don't get a lot of traffic so it wouldn't have an impact. The …

Handling Noise in My Head

I complain and anger myself a lot. I'll have an internal dialogue that loops over the same points, making me feel worse and worse. I'll sometimes write down why I'm so angry or anxious, and find out my thoughts aren't as important as I wanted to believe. This is Chatter …

How To Code Review

Code reviews improve the health of a system while spreading ownership of code and knowledge. A good review process is fast and we can handle low hanging fruits by automating trivial checks (e.g. running unit tests, style choices) and choosing style guidelines. We can have high level discussions on …

Asking For Help

I get and send bad questions. To avoid this, I write my questions in my editor, review and then copy them to the platform e.g. slack, email. My questions are better, which makes me wonder if there are other changes that could further improve my questions. A lot of …

My Firefox Configuration

I like firefox, and I've tweaked it to be ideal for me. The extensions I have are: Dark reader : I prefer dark themes, so this applies one to websites. This works great except for my bank's website, which I've excluded in the plugin. Tridactyl : provides vim keybindings. It's intuitive and …

My Opinions on expenses

Cheap items I read this article about buying the cheapest tool first , and if I use it until it breaks, then I can buy the most expensive one. I've tried to apply this to my purchases, and I've realized that I am sometimes okay with the cheap things I've bought …

Moving home directory to another partition

I'd need to set up ubuntu, but I didn't want to lose my home directory. Everything was in one partition, so I'd lose my home folder with a re-install. I didn't want this, so I moved it into another partition. The new partition would be the size of my home …

Kubernetes Basics

"We've got this project on kubernetes that you'll be helping maintain" This started my journey with kubernetes. I found a great tutorial from freecodecamp and this blog is an attempt to set up some personal projects using it. It's best to read the original though as it's more in-depth. I …

Sending Mail from Cron in Ubuntu 20.04 LTS

I created a cronjob to back up my server content and wanted to test out emailing of errors when they occurred. To set this up, I installed msmtp and msmtp-mta to help send emails using an smtp server and bsd-mailx to test sending emails from terminal. The cronjob entry was …

Static Website with Pandoc

I needed to pull off a quick website that would have various mathematics questions, and thought to try and use pandoc. Here are my learnings: I first installed pandoc-bin because I didn't to deal with a lot of haskell dependencies. yay -S pandoc-bin The first iteration I made generated an …

Comment System Using Recursive Queries

I was reading SQL antipatterns and got into the chapter about recursive queries and how there are different ways to approach this. I wanted to experiment with this and found that postgresql supports recursive queries. I decided to make a simple commenting database and see how it would work. Fibonnacci …

TaskLite Setup

I used vimwiki for task management, with a couple of custom snippets and scripts, but this quickly became complicated. I needed another tool that would be easy to use, easy to understand and easy to tweak. TaskLite fit these conditions perfectly: It's build on haskell and sqlite, a language and …

Copying Pass Secrets to Another Machine

I had a new laptop but couldn't access my previous one, so I had to figure out how to get my pass secrets. I had these problems: How would I get my old password store? How would I be able get my old gpg keys into this new laptop? I …

Thinkpad T440 ArchLinux Setup

I recently got a Thinkpad T440 and decided to document the steps I took to set up archlinux. The last time I'd done this was on the Asus Zenbook UX330UA some years back. I thought the process would be different, but it was largely similar. I first got the iso …

Setting up Hspec on a Haskell Project

I'd started the Kindle-Highlights project without tests. This was a problem because I couldn't add features as fast as I wanted because I'd break something without knowing. I needed to add tests to speed up my development. For haskell, hspec is a tool/library for this. Setting this up on …

Custom snippets in vim

Set up I use ultisnips for my snippets. To set this up, I have this in vimrc : call plug#begin ( '~/.vim/plugged' ) Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " Snippet support call plug# end () let g :UltiSnipsExpandTrigger = "<c-e>" " Default is <tab> let g :UltiSnipsEditSplit = "vertical" let g :UltiSnipsSnippetDirectories = [ "UltiSnips" , "mysnippets" ] This …

First Haskell Parser (for Kindle Highlights)

Kindle saves highlights, bookmarks and notes in a My Clippings.txt file. I needed a way to parse it and filter out the content I wanted. I also wanted to work on a parser in haskell, so this was a great opportunity to get my hands dirty. I used stack …

Hiding Toolbars in Firefox

While using i3, I've realized that a lot of screen real estate in firefox is taken up with the tab and navigation bar. This isn't a problem when its the only application open, but when some tiling has been done, these two bars quickly become a barrier to usage, for …

Python Timeit with Partial

The timeit module provides an easy way to time python code. I use it to check if a new code implementation runs faster than an older implementation. Example usage of this is: import timeit timeit . timeit ( 'list(range(100))' ) def greet (): print ( 'Hello World' ) timeit . timeit ( greet , number = 4 ) Timeit …

Working With A Bad Codebase

I've worked with codebases that have made me frustrated. Some of the **features** I've seen include: Naming the variables returned by a function $this and $return . Having different languages in the same project. For example, I got one which had PHP , Python , Perl , JavaScript (node in the backend) and c …

Vimwiki Website Deployment using Git Hooks

I use vimwiki to keep a track of my notes. This includes book summaries, linux commands, recipes and miscellanous content. It's an amazing vim plugin that provides easy access and navigation to the content. This however works well only within vim. I occasionally need to access these notes outside vim …

PC Assembly and Motorola C Plus Fix

I assembled my first PC this month. It took me a full Saturday for this, and I blame it on the case I got. I cheaped out on it, and ended up taking a lot of time setting things properly inside it. Here is the build . Some of the mistakes …

Huion 420 driver setup

I bought the Huion 420 because I wanted to experiment with graphics tablet and drawing on linux. I chose this primarily because of its cost. Out of the box, the device worked on my archlinux setup, however it behaved more like a mouse, with pressure sensitivity not detected. I did …

Python Generators

Generators are functions that behave like iterators, thus can be used in for loops. For example, a generator that produces even numbers will look like: def even_numbers ( upperlimit ): current = 0 while current < upperlimit : yield current current += 2 Generators are also created using a syntax similar to list comprehension: even_numbers = ( n …

Ansible and SSH Port

Hackers and bots try to log into servers all the time. They do this by trying random ssh logins into your server. A deterrent to this is to disable the default ssh port and set it to something else. Also, disable root login as this is the most common user …

Pagination: Review of Django's and Pelican's Implementation

Pagination is the process of dividing up a document into discrete pages ( wikipedia ). Django and Pelican have similar pagination implementations. This boils down to having a class that has accepts a sliceable object as one of its params, and returns a page containing list of items depending on number of …

Django's Cached Property

I've been trying to understand how django's decorator cached_property works. Here is the class definition ( original source ): # Got from django code base class cached_property : """ Decorator that converts a method with a single self argument into a property cached on the instance. Optional ``name`` argument allows you to make cached properties …

Courage To Be Disliked: A Review

Courage to be disliked is a book that explains Adlerian psychology. It does so in the form of a dialog, between a student and a master. Here are the various ideas I got from reading the book: Etiology vs Teleology Etiology is when someone focuses on the past, and uses …

Sway Window Manager

Wayland is a display server that should work as a replacement for X. I've been thinking of trying it out for some time now. Detailed information about wayland and its history can be found in this article . The differences between xorg and wayland can be found here or in this …

Summary of 2018

This year has been meh for me ;( The highlights for the year include: Completing course work for my masters class Starting research on Renewable Energy Systems and how best to size them and control this system. Active participation in various communities I managed to join especially Urban Perspective and NaiLUG …

Fixing Small Fonts on My Laptop

I have been having this problem with my laptop where the fonts seem too small. To fix this, I first had to check out my laptop's screen configurations: xrandr Part of the output of this command is shown below. As can be seen it shows that my laptop screen is …

Bluetooth Speakers Problems

Connecting to Device To connect to the bluetooth speakers, I use the bluetoothctl commandline options. The following are commands I run for this to work: sudo systemctl start bluetooth.service bluetoothctl # Within the bluetoothctl environment power on agent on default-agent scan on pair A4:A7:B5:22:E6:F5 connect …

Freeing up Space in my Linux Machine

I have a 256GB SSD on my laptop. This is rather constrained and I occasionally end up with less than 10GB drive space. When this happens, I have to figure out what is taking up all my space and fix this. This prompts some form of search and cleaning up …

2018 So Far

This year so far has been tough. I thought I would have read around 10 books by now but I'm barely half that mark. Most of the books are mostly fiction, but at least I've got some variety this time. The books I've completed so far are: 'The Worthing Saga' …

Document Scaning in Arch Linux

Using a scanner in arch is pretty perplexing at first, especially if you want to try it from the command line. Here are my steps to end up with something that works. First install the sane package. Sane provides a command line tool for using scanners. sudo pacman -S sane …

When Memory is not enough

A computer or server suddenly freezes or crashes. You don't know what the problem is and you really need to complete this task. One of the options is to consider memory. You might have just run out. To confirm this, you can monitor memory usage using the htop command while …

Jogging Time Tracking In Google Sheets

I jog frequently. I needed to track the various times I spend jogging my various routes. There are pretty awesome android apps for this but carrying a phone with me while jogging did not work. I was ok with a wrist watch though. So I jog and afterwards store the …

Testing Asynchronous Calls in VueJS

I frequently use asynchronous calls when coding in vuejs, especially when I get and send data to an online api. Initially, I found it difficult to test the asynchronous calls, but as I learned more, asynchronous tests became painless. I detail the methods I use to test promises and async …

Jupyter Notebook Setup on a VPS

These steps have been tested on Digital Ocean server and a scaleway ARM64 server. I used the cheapest provided options for my setups. First, set up ubuntu on the server. Both Digital Ocean and Scaleway provide an easy way to do this. Just follow their prompts, and you'll have your …

Control: Controllability and Observability

The state space equations are given by: \begin{align*} x'(t) = Ax(t) + Bu(t)\\ y(t) = Cx(t) + Du(t) \end{align*} If we discretize the system, the equation can be written as: \begin{align*} x(n+1) = A_dx(n) + B_du(n)\\ y(n) = C_dx(n) + D_du(n) \end …

SSH AND SERVERS

SSH provides a secure means of remote login from one computer to another computer. When setting up linux servers, the OS usually provides ssh by default. To login: ssh user@ipaddress This prompts for a password, after which you have access to a remote terminal. Sometimes, no password is requested …

System Clock Prescalers and Their Hazards

One means of saving power with the attiny13A is by slowing down the clock frequency of the microcontroller. One option of doing this is by using the system clock prescaler. The attiny13A is shipped with running on a 9.6MHz internal RC Oscillator. It has the CKDIV8 fuse set (which …

SciKit-Learn GraphSearch CV

Scikit learn provides a lot of algorithms to help in machine learning. However, sometimes those algorithms have too many options. It is not usually evident which options will produce the best results. One method of solving this is to loop through all possible options and check the score. crit = [ 'gini …