Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "thomas.edison@example.com",
"phone": "(123) 456-7890",
"url": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "thomas.edison@example.com",
"phone": "(123) 456-7890",
"url": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
@bcrpntr
bcrpntr / Archive_readwisereader_articles.py
Last active January 23, 2025 20:55
Archives Readwise Reader feed articles older than two weeks.
import requests
import datetime
import time
# Replace 'XXX' with your Readwise API token
token = 'XXX'
# API URLs
list_url = "https://readwise.io/api/v3/list/"
update_url_template = "https://readwise.io/api/v3/update/{document_id}/"
@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:

@bcrpntr
bcrpntr / log4shellmitigation.ps1
Created December 15, 2021 18:40
CVE-2021-44228 - Log4Shell Identification and Remediation
<#
Modified version of seagull's script, will report mitigated systems as good.
Log4j Vulnerability (CVE-2021-44228) file scanner [windows] :: build 9c/seagull
Uses Florian Roth and Jai Minton's research (thank you!)
RELEASED PUBLICLY for all MSPs, originally a Datto RMM ComStore Component.
If you use code from this script, please credit Datto & seagull.
USER VARIABLES:
usrScanScope (1/2/3): just home drive / all fixed drives / all drives
usrUpdateDefs (bool): download the latest yara definitions from florian?