Skip to content

Instantly share code, notes, and snippets.

View parthibx24's full-sized avatar
🧷
busy procrastinating

Inxpired parthibx24

🧷
busy procrastinating
View GitHub Profile
@parthibx24
parthibx24 / DS.md
Last active January 13, 2025 15:59

Definition

Data Structures are different ways how we organize collection of data in comupter memory for faster/efficient/easier access to a perticular data in that collection. Data structure goes hand in hand with algorithm, at first we organize collection of data in a specific way, which we call a Data Structure and then we write some instructions/steps to how we can access/modify/insert/delete individual elements in that Data Structure, which we call an algorithm for that Data Structure.

The most basic data structure is a fixed size array. An array stores all of its elements next to each other, meaning if an array holds all of its data in memory range of 0-15 and it stores int type values then each element will occupy 4 bytes. So, when data is inserted it will put the first int in memory 0-3, next will be put in 4-7, next is 8-11, next is 12-15. So, basically to in an int array the data at i index will be at the memory position of i*4 and it will occupy the range i*4-(i*4)+3. And there are many a

# os_offset=`echo $(($(nvram get flag_boot_rootfs)-1)) | tr -d '-'`
r0_mtd=$(grep '"rootfs"' /proc/mtd | awk -F: '{print substr($1,4)}')
r1_mtd=$(grep '"rootfs_1"' /proc/mtd | awk -F: '{print substr($1,4)}')
os_idx=$(nvram get flag_boot_rootfs)
mtd_cur=$(($r0_mtd+${os_idx:-0}))
mtd_nxt=$(($r0_mtd+$r1_mtd-$mtd_cur))
MTD_DEV=/dev/mtd$mtd_nxt
ubiformat $MTD_DEV -f $IMAGE -s 2048 -O 2048

settings.json

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": "find",
            "keys": "ctrl+shift+f"

1. Configure redsocks

/etc/redsocks.conf

base {
        log_debug = off;
        log_info = on;
        log = "syslog:local7";
        daemon = on;
        redirector = iptables;
}
/** html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bitfield Visualization</title>
<style>
canvas {
border: 1px solid black;
  mount [root] /mnt/nix
  mount -o umask=077 [boot] /mnt/nix/boot
  
  nixos-install --root /mnt/nix --flake [flakeuri]#[osname]
  # flakeuri: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#examples
  
  passwd [username]
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.190 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_DEBUG_RODATA=y
CONFIG_ARM64_PAGE_SHIFT=12
ab - 1.3.42-1
airmon-ng - 1.2-rc1-2
arptables - 2015-05-20-f4ab8f63-1
base-files - 194.2-unknown
boost - 1.68.0-4
boost-atomic - 1.68.0-4
boost-chrono - 1.68.0-4
boost-date_time - 1.68.0-4
boost-filesystem - 1.68.0-4
/// files list
https://gpu.me/v1/474.14-desktop-win10-win11-64bit-international-dch-whql.json

/// single file i.e. device list
https://gpu.me/v1/files/472.12-desktop-win10-win11-64bit-international-dch-whql/ListDevices.txt