Skip to content

Instantly share code, notes, and snippets.

View Hammer2900's full-sized avatar
🌲
___

Yevhen Ts. Hammer2900

🌲
___
View GitHub Profile
@RNCTX
RNCTX / django-template_partials-htmx-tables2-filter_search.md
Last active September 12, 2025 09:22
How to tie HTMX + django-tables2 + django-filters + django-template-partials together

Reasoning for this

It took me some time of digging through disparate docs and blog posts to piece together how to use django-tables2, htmx, django-template-partials, and django-filter, all at the same time in an optimal way for highly interactive data tables in django.
At present I am not using Alpine.js, another popular addition to this stack, due to my preference for writing plain ole javascript instead of having to learn another syntax, but that's really outside of this scope anyway, this is meant to be a how-to on the Python tools + HTMX.

Credit to the following blog posts and stackoverflow replies that were helpful in piecing this stuff together as a first time user of most of these Django packages:

@vasi
vasi / mount_clonezilla.md
Last active October 31, 2025 01:28
Mounting Clonezilla images with FUSE

Mounting Clonezilla images with FUSE

I love to make backups with Clonezilla. But often, I'll back up my system, wipe my Linux partition and try another distro—only to realize that I need access to just one file from the old installation. For example, maybe I made an interesting change to my .zshrc or Samba configuration, which I want to re-use on the new system.

The obvious solutions aren't my favorites. It's easy to restore an image to a spare disk, but it takes a long time, and requires a spare disk I'm willing to wipe. I [could extract an entire image][extract_image], but that also takes lots of time and space. Wouldn't it be nice to just look inside my compressed Clonezilla image, just like I can do with a zip file or squashfs archive?

It turns out it's possible, with clever use of [user-space filesystems][fuse]!

@disler
disler / README.md
Last active November 10, 2025 15:47
Four Level Framework for Prompt Engineering
@raspberrypisig
raspberrypisig / rayguiexample.py
Created January 3, 2024 22:20
raygui raylib
from threading import Thread
from pyray import *
from raylib import *
from time import sleep
# control variables
downloadPressed = False
uploadPressed = False
@MarvNC
MarvNC / get-discord-token-from-browser.md
Last active October 17, 2025 20:17
How to Get Your Discord Token From the Browser Developer Console

How to Get Your Discord Token From the Browser Console

New method (contributed by youyoumu)

  • Open the browser console with F12 or Ctrl + Shift + I.
  • Enable mobile device emulation with Ctrl + Shift + M.
  • Paste the following code into the console and press Enter:
const iframe = document.createElement('iframe');
@robweychert
robweychert / python-easing-function.md
Last active November 3, 2025 03:45
Python easing functions
@SebastianBitsch
SebastianBitsch / QuadTree.py
Created January 7, 2023 15:51
A simple Python quad tree as seen on wikipedia: https://en.wikipedia.org/wiki/Quadtree
# A simple no dependency Python implementation of the Quadtree
# pseudocode on Wikipedia: https://en.wikipedia.org/wiki/Quadtree
from dataclasses import dataclass, field
@dataclass
class Point:
x: float
y: float
@eamirgh
eamirgh / gist:650f86393b1826dd5c5e5fc68dd5f06e
Last active September 6, 2025 16:51
RESET Goland Evaluation period LINUX
rm -rf ~/.config/JetBrains/GoLand2021.3/eval
rm -rf ~/.config/JetBrains/GoLand2021.3/options/other.xml
touch ~/.config/JetBrains/GoLand2021.3/options/other.xml
sed -i -E 's/<property name=\"evl.*\".*\/>//' ~/.config/JetBrains/GoLand2021.3/options/other.xml
rm -rf ~/.java/.userPrefs/jetbrains/goland
@JohnRipper
JohnRipper / template.py
Created September 20, 2020 00:27
template for i3ipc extensions
#!/usr/bin/env python3
import i3ipc
from i3ipc import Event
from i3ipc.events import IpcBaseEvent, Event
i3 = i3ipc.Connection()
# callback for when workspace focus changes
def on_workspace(i3, e:IpcBaseEvent):
print(e.__dict__)
@chewwt
chewwt / i3-gaps.sh
Last active November 6, 2024 10:44 — forked from dabroder/i3-gaps.sh
Install i3-gaps on ubuntu 20.04
#!/bin/bash
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev libxcb-xrm-dev
cd /tmp
# clone the repository
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
# compile & install