Skip to content

Instantly share code, notes, and snippets.

@SHi-ON
SHi-ON / decode_base64.py
Created March 15, 2022 17:01
Decode HTML files with inline Base64 images and store the image files separately.
import base64
import mimetypes
import os
from bs4 import BeautifulSoup
with open('example.html', 'rb') as file_handle: # Read in as a binary file
soup = BeautifulSoup(file_handle)
@martinwoodward
martinwoodward / mermaid.md
Created February 11, 2022 20:34
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe->>dotcom: iframe ready
@4abhinavjain
4abhinavjain / reinstall_VPS_from_inside.txt
Last active March 27, 2026 22:10 — forked from ClashTheBunny/reinstall_VPS_from_inside.sh
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...
@akemin-dayo
akemin-dayo / 00-QEMU-QoS-patch-README.md
Last active December 8, 2024 13:37
A WIP patch that declares QEMU thread(s) as high-performance to the macOS QoS scheduler. Apply this patch using `git am 0001-util-qemu-thread-posix.c-Declare-QEMU-thread-s-as-hi.patch`.

This is a WIP patch that declares QEMU thread(s) as high-performance to the macOS QoS scheduler.

Apply this patch using git am 0001-util-qemu-thread-posix.c-Declare-QEMU-thread-s-as-hi.patch.

This is most useful on Apple Silicon (arm64) machines, as this pins QEMU to the faster performance cores instead of the slower efficiency cores on those systems (which use a heterogeneous core architecture).

This may possibly also result in better performance on x86_64 macOS machines, as well.

TODO: Determine if there is a better place to put this function call, as this would effectively declare every QEMU thread as high-performance, which may not be desired behaviour if QEMU spawns threads for purposes other than guest OS emulation (which I am not certain about).

@TimothyJones
TimothyJones / handover-documentation-checklist.md
Last active December 16, 2024 18:23
Handover documentation checklist

Handover documentation

Here's a list of things I find useful to check off when writing handover documentation for source code.

General sanity checks

These get checked at the end, but they're at the front of the document because they're good to keep in mind the whole time

  • Do these instructions work cross-platform? If not, which platform do they work on?
  • If the source of truth is not this document, should some of the questions be answered with links (to eg confluence/other repos)
@jameshd
jameshd / README.md
Created May 20, 2021 15:29
Docusaurus Footer Override
@khushal87
khushal87 / blog3.md
Last active July 21, 2025 07:23
Linking a custom domain from Google domains to Vercel app

Linking a custom domain to a deployed application is confusing and at times you don't get a route on how to link the domain with the website. 😫

In this article, I will be explaining how to link a Custom domain brought in Google Domains service to an application hosted on Vercel.

Perks of using vercel is that it allows adding domain without any verification unlike Heroku/Netlify, which means you don't have to add your billing details to add a domain to your application. Moreover, it is fast, efficient, and easy to use.😁

What is Vercel?

​Vercel is a deployment and collaboration platform for frontend developers. ​Vercel enables developers to host websites and web services that deploy instantly and scale automatically – all without any configuration. Source - Official Docs

@sindresorhus
sindresorhus / esm-package.md
Last active March 30, 2026 18:10
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@ctsrc
ctsrc / README.md
Last active March 10, 2026 11:23 — forked from niw/README.en.md
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
@LeZuse
LeZuse / 00_README.md
Last active October 29, 2025 12:26
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms