Skip to content

Instantly share code, notes, and snippets.

@bcrpntr
bcrpntr / extract-svg-from-drawio-library.py
Created January 28, 2024 07:08 — forked from ajmaradiaga/extract-svg-from-drawio-library.py
The Python script process the Draw.io library files and "extract" the images from within it. In my case, I want to save the images as SVG and PNG files.
import base64
import json
import xml.etree.ElementTree as ET
import os
import cairosvg
process_files = [
'Library-1.drawio',
'Library-2.drawio'
@bcrpntr
bcrpntr / git-revert-sha-commit
Created January 28, 2024 03:43 — forked from mgibowski/git-revert-sha-commit
[git] revert to a commit by sha hash
# found at:
# http://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by-sha-hash
# reset the index to the desired tree
git reset --hard 56e05fced
# move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"
@bcrpntr
bcrpntr / Remove-Sophos.ps1
Last active June 16, 2022 13:58 — forked from adormire/Remove-Sophos.ps1
Remove-Sophos.ps1
# Logging variables
$LogDirectory = 'C:\Users\Public\Logs'
$LogPath = 'C:\Users\Public\Logs\TFS_scripted_updates.log'
# Set download variables
$DownloadURL = ''
$ZapFile = 'C:\temp\SophosZap.exe'
# Create log folder if it doesn't exist
If (-Not (Test-Path -Path $LogDirectory)) {
@bcrpntr
bcrpntr / my-nixos-installation.md
Created January 2, 2022 22:44
NixOS installation guide, tailored to my needs

Preface

This manual describes how to install, use and extend NixOS, a Linux distribution based on the purely functional package management system Nix, that is composed using modules and packages defined in the Nixpkgs project.

Installation

This section describes how to obtain, install, and configure NixOS for first-time use.

Obtaining NixOS

NixOS ISO images can be downloaded from the NixOS download page. There are a number of installation options. In this manual we will assume that the chosen option is Minimal ISO image (64bit). You can burn it on a USB stick with: