Skip to content

Instantly share code, notes, and snippets.

View SaicharanKandukuri's full-sized avatar
🐧
Busy with job

Zman | サ イ チャラン SaicharanKandukuri

🐧
Busy with job
  • whitecarrot.io
  • /dev/loop?
View GitHub Profile

Android pkvm

Booting a linux file system with crosvm provided in android. ( experiment )

Creating an ext4 image with tarballs

# ~2GB size
dd if=/dev/zero of=udroid_image.ext4.img bs=1M count=2000
# format to ext4
@SaicharanKandukuri
SaicharanKandukuri / force-upgrade-amd64.sh
Created October 14, 2023 16:28
A script to force upgrade ubuntu distributions
#!/bin/bash
MIRROR="http://archive.ubuntu.com/ubuntu"
SUITE="jammy"
# check for sudo
[[ $EUID != 0 ]] && echo "Please run as sudo.."
# backup existing sources
@SaicharanKandukuri
SaicharanKandukuri / updat-script.sh
Created June 8, 2023 05:15
fixed script for Tuki ROM ( one ui 5 port for M31 )
#!/sbin/sh
#-----------Dynamic Installer Configs-----------#
#The #MAGISK tag is required, dont remove it
#MAGISK
setdefault magisk_support on
setdefault ensure_root on
setdefault import_addons off
setdefault apex_mount off
setdefault extraction_speed default
setdefault permissions "0:0:0755:0644"

ZIG Complexity

zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

it has C-like syntax, cross-platform and cross-compile support

that means developers don't need to maintain toolchain for every platform and cpu architecture

why we can't zig yet ?

Our zig journey so far

as part of our OSD Internship, we started learning zig language ( a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.) a c-like language with inbuilt cross-platform & cross-compile building support.

here are my notes on basics https://gist.github.com/SaicharanKandukuri/33c0fef784f59af4b31732914bab39c6

Zig introduces some special language features like: special controls in loops

🚀 Bun with ExpressJS

download

A quick server with bun and expressJS with typescript

📦 Install

mkdir express-with-bun

Analysis

Here is my analysis on note apps ( like evernote, onenote, etc.). what can they do.

Basically an app allows to crate notes and store them

  • first it can store notes and display's them in a better way
  • stores all notes in a database of some sort
  • notes are sorted out based on their tags, date and time
  • allows to attach images,notes, embedded attachements

zig language ( Basically a c like language )

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

The languages used in make bun which is faster than node and deno

Basic points

  • import are declared with @import("<name>") function to a variable
  • functions
#!/bin/bash
set -Eeuxo pipefail
# change it according to your perefed name
MACHINE_NAME="ubuntu-os"
QEMU_IMG="${MACHINE_NAME}.img"
SSH_PORT="5555"
OVMF_CODE="/usr/share/OVMF/OVMF_CODE_4M.ms.fd"
OVMF_VARS_ORIG="/usr/share/OVMF/OVMF_VARS_4M.ms.fd"

Creating an ssh key

ssh-keygen -t ed25519 -C "yourgmailadress@gmail.com"

replace yourgmailadress@gmail.com with your mail address

configuring git