Skip to content

Instantly share code, notes, and snippets.

View r41k0u's full-sized avatar
😀

Pragyansh Chaturvedi r41k0u

😀
  • Canonical
  • Bhopal, India
  • 08:55 (UTC +05:30)
View GitHub Profile
@r41k0u
r41k0u / debug.md
Last active May 15, 2025 15:21
KGDB on Raspberry Pi 5 running Ubuntu using the Raspberry Pi Debug Probe

TODO: try with linux-image-*-dbgsym package as well, maybe we can cut on the compile time.

Step 1: Compile

  • Taken largely from this, though you can use your own kernel source. You can also do a cross-compilation, refer to the previous link for details on that
  • specify the KERNEL (kernel_2712 in my case). Do make menuconfig instead of the raspi preset defconfigs
  • Enable the KGDB options under Kernel Hacking. I don't remember exactly what flags you need, but the following in .config should set you up for something atleast
    • CONFIG_DEBUG_INFO=y
    • CONFIG_GDB_SCRIPTS=y
    • # CONFIG_DEBUG_INFO_REDUCED is not set
  • CONFIG_KALLSYMS can also be set
@r41k0u
r41k0u / rpi-imager-quirks.md
Created September 9, 2024 19:34
rpi-imager-quirks
  • Ctrl+Shift+X opens the advanced settings in the v1.8.5, where you can setup ssh and wifi
@r41k0u
r41k0u / cross_arch_autopkgtests.md
Last active September 9, 2024 10:24
cross-arch autopkgtests

QEMU is able to emulate many different architecture. Even though it is much slower than accelerated VMs, it's still useful sometimes to have the tests run on a foreign architecture locally, for quicker debug loops.

First ensure you have a suitable VM image (the --timeout is almost necessary when it comes to emulation):

autopkgtest-buildvm-ubuntu-cloud -v --arch arm64 --release jammy --timeout 7200

Then run the tests by specifying the architecture to QEMU. The following command also increases the reboot timeout, because VMs are slower in emulation, and may not be able to reach the login prompt in less than one minute:

autopkgtest gzip -- qemu --qemu-architecture=aarch64 --timeout-reboot 90 autopkgtest-jammy-arm64.img

@r41k0u
r41k0u / README.md
Created March 10, 2024 16:42
Data Mining

CSN-515 Data Mining Project

Using data mining to make a recommendation system for choosing an apartment complex to stay in for a new resident given a city

We use this dataset for our data analysis

Requirements

  • Python 3.8
  • required PIP packages (can be installed by python3 -m pip install numpy pandas sklearn tensorflow torch)
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
#//////////////////////////
#--------------------------
# (0,0) \ //////
# \ ------
# l1,k1 \ / (1,0.5)
# \ / l2,k2
@r41k0u
r41k0u / reg.bat
Created June 23, 2022 02:26
Searching windows registry for credentials
REG QUERY HKLM /F "password" /t REG_SZ /S /K
REG QUERY HKCU /F "password" /t REG_SZ /S /K
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon" # Windows Autologin
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon" 2>nul | findstr "DefaultUserName DefaultDomainName DefaultPassword"
reg query "HKLM\SYSTEM\Current\ControlSet\Services\SNMP" # SNMP parameters
reg query "HKCU\Software\SimonTatham\PuTTY\Sessions" # Putty clear text proxy credentials
reg query "HKCU\Software\ORL\WinVNC3\Password" # VNC credentials
reg query HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC\WinVNC4 /v password

lingo-builtins

  • LB::b_closeDA
  • LB::b_open
  • LB::b_openDA
  • LB::b_openResFile - Windows
  • LB::b_saveMovie - A huge project in itself, later
  • LB::b_setCallBack
  • LB::b_showResFile
  • LB::b_showXlib
  • LB::b_xFactoryList
--PopMenu, Tool, 1.0, 4/1/90
--© 1989, 1990 MacroMind, Inc.
-- by Jeff Tanner
------------------------------------------------
------------------------------------------------
-- IMPORTANT NOTE: In Lingo, build PopMenus after using
-- the command installMenu. On the Mac, Pop-up menus are
-- extensions of the menu bar. When the command installMenu
-- is called, this will remove all menus currently on
-- the menubar (including pop-up menus) and only install those

--PopMenu, Tool, 1.0, 4/1/90 --© 1989, 1990 MacroMind, Inc. -- by Jeff Tanner


-- IMPORTANT NOTE: In Lingo, build PopMenus after using -- the command installMenu. On the Mac, Pop-up menus are -- extensions of the menu bar. When the command installMenu -- is called, this will remove all menus currently on -- the menubar (including pop-up menus) and only install those