Skip to content

Instantly share code, notes, and snippets.

View Hammer2900's full-sized avatar
🌲
___

Yevhen Ts. Hammer2900

🌲
___
View GitHub Profile
@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__)
@eamirgh
eamirgh / gist:650f86393b1826dd5c5e5fc68dd5f06e
Last active June 5, 2024 18: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
@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
@robweychert
robweychert / python-easing-function.md
Last active March 18, 2025 10:08
Python easing functions
@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
@disler
disler / README.md
Last active June 4, 2025 13:48
Four Level Framework for Prompt Engineering
@vasi
vasi / mount_clonezilla.md
Last active February 18, 2025 01:27
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]!