Skip to content

Instantly share code, notes, and snippets.

View Vlad1mir-D's full-sized avatar
🌠
Still dreaming

Vladimir Vlad1mir-D

🌠
Still dreaming
  • Not really
  • Krasnodarium
View GitHub Profile
@mattisz
mattisz / ipmi-updater.py
Last active March 5, 2026 21:30 — forked from dekimsey/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@zmwangx
zmwangx / APFS volume without Time Machine local snapshots.md
Created April 11, 2023 07:03
How to make ~/Downloads (or any other directory) a separate APFS volume without Time Machine local snapshots

Tested on macOS 13.3.1.

  • In Disk Utility, create new APFS volume under internal SSD's Container disk1.

  • Unmount the volume.

  • ⌘I to open the Info panel of the volume, copy the Volume UUID. Alternatively, the UUID can be copied from the output of diskutil info disk1s7, where disk1s7 should be replaced with the corresponding device node.

  • sudo vifs to edit /etc/fstab, adding the following entry:

@c0d3z3r0
c0d3z3r0 / smcbmc_backup_crypt.txt
Last active September 20, 2025 00:49
Decrypt and re-encrypt Supermicro BMC config backups
Decrypt
openssl enc -d -des-ede3-cbc -in save_config.bin -out save_config.dec -K f1da33a298120612060792ffaa998811998877445588aabb -iv 0
dd if=save_config.dec bs=4 skip=1 | tar -xzf -
ls preserve_config/
bmc_hostname hostname_for_dhcp network SDRBlock tag
ddns ipctrl ntp server.pem timezone
DDNS_CONFIG lighttpd.conf OEMPSBlock service.conf wsman
ddns.key lighttpd_port.conf PSBlock snmpd.conf
ddns.private log ps.xml syslog.conf
#!/bin/sh
set -eu
make_aten_header() {
printf 'ATEN\1\0'
}
run_aes() {
openssl aes-256-cbc "$1" -in "$2" -out "$3" -k CKSAM1SUCKSAM1SUASMUCIKSASMUCIKS -md md5
@dogtopus
dogtopus / csrotau.py
Created December 12, 2018 20:37
CSR OTAU binary parser
#!/usr/bin/env python3
# CSR OTAU binary parser
# https://developer.qualcomm.com/qfile/34081/csr102x_otau_overview.pdf
# For use with test and demonstration only. This is obviously not official and
# is not affiliated with Qualcomm.
import io
import os
import sys
@Vlad1mir-D
Vlad1mir-D / relayd-igmpproxy.sh
Created July 30, 2018 01:24 — forked from braian87b/relayd-igmpproxy.sh
How to setup Client Bridged / Client Mode / RelayD and IGMPProxy for OpenWRT / LEDE
# Client Bridged / Client Mode / RelayD and IGMPProxy (It works)
# RelayD is to redirect packages and IGMP is for redirect IGMP packages
# Our network is 192.168.1.0/24
# Steps:
# Configure WAN as static
# We should edit our wan iface and put static IP
uci set network.wan='interface'
uci set network.wan.proto='static'
uci set network.wan.ipaddr='192.168.1.239' # Main Network IP
@ansemjo
ansemjo / ipa-sysaccount.py
Last active June 28, 2024 11:18
Add or update a sysaccount in a FreeIPA LDAP directory. These accounts can then be used to bind with other services that require LDAP authentication. Run `make install` to install script in `/usr/local/bin/`.
#!/usr/bin/env python
from argparse import ArgumentParser
from random import SystemRandom
from string import ascii_letters, digits
from subprocess import Popen as subprocess, PIPE
from shlex import split as sh
ap = ArgumentParser()
ap.add_argument('action', help='add, delete or change password', choices=('add', 'delete', 'passwd'))
@braian87b
braian87b / relayd-igmpproxy.sh
Last active October 22, 2023 12:32
How to setup Client Bridged / Client Mode / RelayD and IGMPProxy for OpenWRT / LEDE
# Client Bridged / Client Mode / RelayD and IGMPProxy (It works)
# RelayD is to redirect packages and IGMP is for redirect IGMP packages
# Our network is 192.168.1.0/24
# Steps:
# Configure WAN as static
# We should edit our wan iface and put static IP
uci set network.wan='interface'
uci set network.wan.proto='static'
uci set network.wan.ipaddr='192.168.1.239' # Main Network IP

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.

Important

  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.