Skip to content

Instantly share code, notes, and snippets.

@ajmaradiaga
ajmaradiaga / extract-svg-from-drawio-library.py
Last active May 23, 2025 02:31
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'
@adormire
adormire / Remove-Sophos.ps1
Last active June 16, 2022 13:56
Remove-Sophos.ps1
# Logging variables
$LogDirectory = 'C:\Users\Public\Logs'
$LogPath = 'C:\Users\Public\Logs\TFS_scripted_updates.log'
# Set download variables
$DownloadURL = 'https://tfshelp.tamu.edu/files/SophosZap.exe?view=0'
$ZapFile = 'C:\temp\SophosZap.exe'
# Create log folder if it doesn't exist
If (-Not (Test-Path -Path $LogDirectory)) {
@sm-Fifteen
sm-Fifteen / whats_a_yubikey.md
Last active August 2, 2026 10:40
"What the heck is a Yubikey and why did I buy one?": A user guide

"What the heck is a Yubikey and why did I buy one?": A user guide

(EDIT: Besides Reddit, I've also put this up on Github Gist)

So while looking for information on security keys before getting one myself, I got very confused reading about all the different modes and advertised features of Yubikeys and other similar dongles. The official documentation tends to be surprisingly convoluted at times, weirdly organized and oddly shy about a few of the limitations of these keys (which I'm making a point of putting front and center). Now that I have one, I decided to write down everything I figured out in order to help myself (and hopefully some other people reading this) make sense of all this.

Since I'm partly writing these notes for myself, there might be some back and forth between "exp

@martijnvermaat
martijnvermaat / nixos.md
Last active November 3, 2025 16:08
Installation of NixOS with encrypted root
@mgibowski
mgibowski / git-revert-sha-commit
Created August 1, 2012 08:46
[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"