Skip to content

Instantly share code, notes, and snippets.

@akshayravikumar
akshayravikumar / .windsurfrules
Created March 10, 2025 18:00
Turning Cascade Into a CS Tutor
<tutor_mode_instructions>
You are a friendly computer science tutor, and I am the student. Your role is to guide me through learning step by step.
- **Assess my knowledge**
- First, ask me my name and what I want to learn. Determine where to start based on my experience. Also ask me if there's anything I'm interested in that you can incorporate into the lessons (i.e. shows, hobbies, interests, etc).
- Ask me these questions one a a time.
- **Teach using code**
- Teach me concepts in the chat window, and create files as "lessons" when you need to demonstrate something. Use the naming format 001-lesson-[lesson-slug], like 001-lesson-about-file.py, or whatever the equivalent is in the language I'm learning. Start with a 0-padded 3 digit number.
- Write code and explain how to run it. When you are teaching me, do not run any commands for me. Just tell me what to run, and once you've taught me how to run something, encourage me to run commands myself. In the beginning, encourage me to share what I sa
@jcmvbkbc
jcmvbkbc / gist:316e6da728021c8ff670a24e674a35e6
Last active August 29, 2025 23:28
esp32s3 linux rebuild scripts
Latest versions of these scripts are available in git repository https://github.com/jcmvbkbc/esp32-linux-build
@beriberikix
beriberikix / Dockerfile
Last active February 5, 2023 16:34
Attempts at using USB/IP VHCI in a container
FROM ubuntu:jammy
RUN \
apt update \
&& apt install -y kmod linux-tools-virtual usbutils
# docker run -it --cap-add=ALL --privileged -v /lib/modules/`uname -r`/kernel/drivers/usb/usbip:/lib/modules/`uname -r` usbip:latest
# modprobe usbip-core
# modprobe vhci-hcd
# usbip list -r <server>
# sudo usbip attach -r <server> -b <bus ID>
@itsmaxymoo
itsmaxymoo / t480-touchscreen-disable.sh
Created July 1, 2022 20:54
Completely disable touch screen on Lenovo T480
#!/bin/bash
# Disable touch screen on Lenovo T480
# This may produce great battery savings
# To re-enable, delete the file created by this script & reboot
DISABLE_TEXT="SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"2a94\", ATTRS{idProduct}==\"464d\", ATTR{authorized}=\"0\""
echo $DISABLE_TEXT | sudo tee -a /etc/udev/rules.d/80-touchscreen.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
@weshouman
weshouman / Makefile
Last active June 8, 2024 18:57
arduino cli tips
VERSION=0.14.0
SPECIFIER=arduino-cli_${VERSION}_Linux_64bit
BINDIR=/usr/local/bin/
# - Avoid redownloading
# - Avoid overwriting
# - To overwrite, use make uninstall
install:
TMPDIR=/tmp/$(SPECIFIER) && \
mkdir -p $${TMPDIR} && \
@ncmiller
ncmiller / HOWTO_LinuxKernelQemu.md
Last active August 1, 2025 11:12
How to build the Linux kernel and test changes locally in qemu

This is the process I followed on my Fedora 23 host machine to build a small/minimal vanilla Linux kernel and test in Qemu (based on this blog post). This will provide a safe sandbox in which to test kernel changes, and is generally faster than developing natively on the host machine. Qemu will boot the kernel image directly in the emulated system.

Install required build tools on host machine

sudo dnf install ncurses-devel kernel-devel kernel-headers gcc gcc-c++ git qemu openssl-devel glibc-static

Prepare a working space for kernel development

@dmberry
dmberry / ELIZA.BAS
Created January 26, 2016 01:14
Eliza in Basic written by Jeff Shrager in 1977
10 REM
20 REM ELIZA/DOCTOR
30 REM CREATED BY JOSEPH WEIZENBAUM
40 REM THIS VERSION BY JEFF SHRAGER
50 REM EDITIED AND MODIFIED FOR MITS 8K BASIC 4.0 BY STEVE NORTH
60 REM CREATIVE COMPUTING PO BOX 789-M MORRISTOWN NJ 07960
70 REM
80 REM -----INITIALIZATION-----
90 DIM C$(72),I$(72),K$(72),F$(72),S$(72),R$(72),P$(72),Z$(72)
100 DIM S(36),R(36),N(36)