Skip to content

Instantly share code, notes, and snippets.

@terremoth
terremoth / gui-example.c
Last active April 15, 2025 12:32
Simple input and button with pure C + Win32 API
#include <windows.h>
#define ID_EDITBOX 1001
#define ID_BUTTON_OK 1002
void DrawCustomButton(LPDRAWITEMSTRUCT lpDrawItem) {
COLORREF bgColor = RGB(255, 165, 0); // orange
COLORREF textColor = RGB(128, 128, 128); // grey
@anish-lakkapragada
anish-lakkapragada / hinduism.c
Created December 25, 2024 12:52
Hinduism in 75 lines of C
/**
* This is an executable C program that tries to capture major Hinduism deities in
* less than 100 lines of code. I tried to make the code as artistic as possible while
* maintaining C compilability. Please contact [email protected] for any
* corrections or grievances.
*/
#include <stdio.h>
#include <stdlib.h>
@automationhacks
automationhacks / bug_template.md
Last active November 16, 2025 13:44
Bug template to help in writing clear bug reports

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Expected behavior

A clear and concise description of what you expected to happen.

Priority

What is the impact of this bug on the user, how critical is to fix? P0, P1 .. P4

@heppu
heppu / ARCH_INSTALL.MD
Last active May 1, 2025 18:13
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@mhitza
mhitza / Makefile
Last active November 16, 2025 17:32
Programming Arduino Uno (ATmega386P) in assembly
%.hex: %.asm
avra -fI $<
rm *.eep.hex *.obj *.cof
all: $(patsubst %.asm,%.hex,$(wildcard *.asm))
upload: ${program}.hex
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$<
monitor:
@Starefossen
Starefossen / vim-cheats.md
Last active November 26, 2025 00:53
My vim cheat sheet for working with tabs and window splits.

Tabs

New Tab

  • :tabnew - new blank tab
  • :tabedit [file] - open file in tab

Cursor Movement

  • gt (:tabn) - next tab