Skip to content

Instantly share code, notes, and snippets.

@xbns
xbns / why-this-partitioning-scheme.md
Last active August 4, 2024 12:09
Why this partitioning scheme #arch-linux

Why this partitioning scheme

Laptop 1: hp-4540s-i5 (BIOS/MBR)

$ sudo dmidecode | grep -A3 '^System Information'
System Information
@xbns
xbns / arch-linux-installation-on-mbr-system.md
Last active April 20, 2026 16:51
Arch Linux Installation Process for a Legacy/BIOS/MBR System #arch-linux

Arch Linux Installation Process for a Legacy/BIOS/MBR System

We will tackle this process in 10 steps listed below.

I didn't want to repeat some sections well explained in the UEFI Process. You can refer there and follow due process.

Namely;

  • Connecting to WiFi.
@xbns
xbns / arch-linux-installation-on-uefi-gpt-system.md
Last active March 26, 2026 23:05
Installing Arch Linux for UEFI/GPT System #arch-linux

Installing Arch Linux for UEFI/GPT System

For BIOS/MBR Legacy system refer to here

Installation process over a Wi-Fi

Download the .iso file from Arch Linux Official Site.

Step 1: Make a Live USB Disk and boot from it.

@xbns
xbns / sw-to-install-after-arch-install.md
Last active July 23, 2020 11:39
After Arch Linux Installation #arch-linux
@xbns
xbns / README.MD
Last active May 1, 2020 20:11
#katex #maths #visual studio code extensions # markdown

Question: $45\space is\space 18%$ of what number?

$\therefore {part \over whole} = \frac{45}{x} = \frac{18}{100}$

$18\cdot x = 45\cdot100$

$\sout{18}\cdot x = 45\cdot100\swarrow$ Divide by 18 on both sides of equation

@xbns
xbns / as_code.md
Created February 24, 2020 14:03
#as_code

Diagram As Code

Plant UML

Infrastructure As Code

@xbns
xbns / disk-partitioning.md
Created November 8, 2019 10:39
#disk-partition

/root

  • A 12 - 20 GB partition for the OS,which gets mounted as /(called "root").
  • maximum of 20 GB for root partition should always be enough even if you install a ton of software.
  • Most distributions of Linux use either ext3 or ext4 as their file system nowadays, which has a built-in “self-cleaning” mechanism so you don’t have to defrag.
  • In order for this to work best, though, there should be free space for between 25-35% of the partition. (20% x 20 = 4GB) (35% x 20 = 7GB)
@xbns
xbns / jsonTocsv.py
Created September 26, 2019 09:15
#jsonTocsv #snippet
import json
import sys
from flatten_json import flatten
import pandas as pd
#check if you pass the input file
if sys.argv[1] is not None:
fileInput = sys.argv[1]
inputFile = open(fileInput) #open json file
@xbns
xbns / get_credit_score.py
Last active December 7, 2020 10:49
[credit scoring] Credit Score Script #credit-score #csv #json
import requests
from requests.auth import HTTPBasicAuth
import json
import csv
import logging
import sys
from logging.handlers import TimedRotatingFileHandler
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
LOG_FILE = 'my_app.log'
@xbns
xbns / users.py
Last active April 15, 2024 10:28
#tech
"""
__author_ = "Josphat Mutuku"
__date__ ="2019-07-03"
"""
import requests
import unittest
import json
import ijson