Skip to content

Instantly share code, notes, and snippets.

View Hammer2900's full-sized avatar
🌲
___

Yevhen Ts. Hammer2900

🌲
___
View GitHub Profile
@Hammer2900
Hammer2900 / mount_clonezilla.md
Created February 4, 2025 14:18 — forked from vasi/mount_clonezilla.md
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]!

@Hammer2900
Hammer2900 / test_overlay.sh
Created June 12, 2024 13:55 — forked from KunYi/test_overlay.sh
overlayfs testing script
~# cat overlay.sh
#!/bin/sh -e
modprobe overlay
mkdir -p /overlay
mount -t tmpfs tmpfs /overlay
mkdir -p /overlay/blk
import Box2D
import Box2D.b2 as b2
class b2Separator:
"""
* Convex Separator for Box2D Flash
*
* This code has been ported to Python by Stephen Tian from the Java port by Chad Palsulich of the Flash original written by Antoan Angelov.
from threading import Thread
from pyray import *
from raylib import *
from time import sleep
# control variables
downloadPressed = False
uploadPressed = False
from flask import Flask
import webview
import sys
import threading
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
@Hammer2900
Hammer2900 / odoo.sh
Created May 15, 2023 20:42 — forked from jjackofall/odoo.sh
Install Odoo In Server
#!/bin/bash
# Variables
OE_USER="odoo"
OE_HOME="/$OE_USER"
OE_HOME_EXT="/$OE_USER/${OE_USER}-server"
INSTALL_WKHTMLTOPDF="True"
OE_PORT="8069"
OE_VERSION="15.0"
OE_SUPERADMIN="admin"
class StateMachine:
states = ["NO STATE"]
user_states = {}
def __init__(self,states):
if states:
self.states.extend(states)
else:
raise ValueError("StateMachine must have at least one state")
def next(self,user_id):
@Hammer2900
Hammer2900 / gist:a4795ddb6ae627fda50bcb12c396ba32
Created February 24, 2023 13:22 — forked from eamirgh/gist:650f86393b1826dd5c5e5fc68dd5f06e
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
@Hammer2900
Hammer2900 / ecs_types.py
Created December 3, 2022 08:47 — forked from RustyGuard/ecs_types.py
Полный пример реализации и использования Entity Component System на python
from dataclasses import dataclass
from typing import Any, Type
EntityId = str
Component = object
@dataclass
class StoredSystem:
variables: dict[str, Any]