Skip to content

Instantly share code, notes, and snippets.

View Hammer2900's full-sized avatar
🌲
___

Yevhen Ts. Hammer2900

🌲
___
View GitHub Profile
@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]!

@disler
disler / README.md
Last active April 9, 2025 22:08
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
@robweychert
robweychert / python-easing-function.md
Last active March 18, 2025 10:08
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 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
@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
@intrntbrn
intrntbrn / fancy_taglist.lua
Last active May 13, 2025 18:26
awesomewm fancy_taglist: a taglist that contains a tasklist for each tag
-- awesomewm fancy_taglist: a taglist that contains a tasklist for each tag.
-- Usage:
-- 1. Save as "fancy_taglist.lua" in ~/.config/awesome
-- 2. Add a fancy_taglist for every screen:
-- awful.screen.connect_for_each_screen(function(s)
-- ...
-- local fancy_taglist = require("fancy_taglist")
-- s.mytaglist = fancy_taglist.new({
-- screen = s,
@intrntbrn
intrntbrn / virtual_keyboard.lua
Last active March 2, 2025 13:04
awesomewm virtual keyboard for tablet (hackable alpha version)
-- Dependency: xdotool
--
-- Usage:
-- 1. Save as "virtual_keyboard.lua" in ~/.config/awesome/
-- 2. Add a virtual_keyboard for every screen:
-- awful.screen.connect_for_each_screen(function(s)
-- ...
-- local virtual_keyboard = require("virtual_keyboard")
-- s.virtual_keyboard = virtual_keyboard:new({ screen = s } )
-- ...