Skip to content

Instantly share code, notes, and snippets.

View evilJazz's full-sized avatar

Andre H. Beckedorf evilJazz

View GitHub Profile
@Xheldon
Xheldon / Craft2Notion
Last active September 27, 2023 12:43
A way to export Markdown files with images from Craft and import them into Notion while also uploading the images to Notion's own AWS S3 service (instead of using image links). Recursively call pandoc command to convert from markdown with pictures to docx.
const fs = require('fs');
const path = require('path');
const exec = require('child_process').execSync;
/**
* I use this script to transfer notes from Craft to Notion. The process involves the following considerations:
* 1. Craft can export Markdown and place images in a folder at the same level as the Markdown file, with the extension .assets.
* 2. Notion only uploads images to its own AWS S3 server when importing Word (.docx format) files, while other formats only include a link to the image.
* 3. Therefore, I need to convert the Markdown files exported from Craft to docx files before importing them into Notion.
* 4. Notion only supports files at the same level, not nested directories, when importing Word files, so I convert the nested notes exported from Craft to Word format and place them all in a specified directory (absolute path).
@the-spyke
the-spyke / pipewire.md
Last active November 15, 2024 01:05
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@evilJazz
evilJazz / virtualbox-modules-5.2.8-vboxpci.patch
Last active July 30, 2018 08:47
Patch for VirtualBox 5.2.8/5.2.10 modules to compile against Linux Kernel 4.17
--- /original/VBoxPci-linux.c
+++ /patched/VBoxPci-linux.c
@@ -89,7 +89,11 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
# define PCI_DEV_GET(v,d,p) pci_get_device(v,d,p)
# define PCI_DEV_PUT(x) pci_dev_put(x)
-# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
+ # define PCI_DEV_GET_SLOT(bus, devfn) pci_get_domain_bus_and_slot(0, bus, devfn)
+#else
@max-mapper
max-mapper / links.json
Last active November 11, 2023 03:11
all wikipedia zim torrent links
@jNizM
jNizM / gist:79aa6a4b8ec428bf780f
Last active September 17, 2022 08:27
[AHK] AES Encryption (String)
/*
Update v0.4
Todo: - CryptSetKeyParam (KP_MODE with CBC [maybe CFB, ECB, OFB or CTS])
*/
MsgBox % enc := AES.Encrypt("Test String", "testpw", 256)
MsgBox % AES.Decrypt(enc, "testpw", 256)
Class AES
{