Skip to content

Instantly share code, notes, and snippets.

View n-studio's full-sized avatar

n-studio

View GitHub Profile
@n-studio
n-studio / OMARCHY_DUAL_BOOT.md
Last active November 20, 2025 10:44
Omarchy dual boot

Here are the steps I used to install Omarchy in dual boot with Windows (inspired by https://www.youtube.com/watch?v=9jTk3K3ExaI):

  1. Use iwctl to connect to wifi
  2. sfdisk /dev/nvme0n1 -> make 1 EFI partition (nvme0n1p4 - 1G), 1 Linux partition (nvme0n1p5 - remaining space)
  3. Format
mkfs.vfat -F 32 /dev/nvme0n1p4
mkfs.btrfs /dev/nvme0n1p5
  1. Create subvolumes (not sure if optional or mandatory). Do NOT create a subvolume for snapshots, it will raise errors during archinstall.

Causes of FrozenError: can't modify frozen attributes

  1. Model was unintentionally deleted/destroyed.
@n-studio
n-studio / DEPLOY_WITH_KAMAL_ON_DEDICATED_SERVER.md
Last active June 1, 2025 10:51
Deploy a web app on a dedicated server with Kamal

Notes

This guide uses Kamal 2.5.3

Motivation

Kamal was designed with 1 service = 1 droplet/VPS in mind.
But I'm cheap and I want to be able to deploy multiple demo/poc apps apps on my $20/month dedicated server.
What the hell, I'll even host my private container registry on it.

@n-studio
n-studio / DataUsage.swift
Last active July 12, 2022 00:21
Get data usage with swift
#include <ifaddrs.h>
// http://stackoverflow.com/questions/25626117/how-to-get-ip-address-in-swift
func getIFAddresses() -> [String] {
var addresses = [String]()
// Get list of all interfaces on the local machine:
var ifaddr : UnsafeMutablePointer<ifaddrs> = nil
if getifaddrs(&ifaddr) == 0 {