Skip to content

Instantly share code, notes, and snippets.

View AzSiAz's full-sized avatar
👨‍💻

Stephan Deumier AzSiAz

👨‍💻
View GitHub Profile
@bashtheshell
bashtheshell / create_clover_bootloader_usb_macos.md
Last active February 16, 2025 11:21
Guide on Creating Clover Bootloader USB on macOS - useful for users with PCIe NVMe SSDs installed on Legacy BIOS machines.

How to Create Clover Bootloader USB on macOS (for PCIe NVMe SSD booting on Legacy BIOS system):

SUMMARY:

If you are a macOS user like me, and you want to create a Clover Bootloader USB on it just so that you can boot up the operating systems that are installed on PCIe NVMe SSDs on your archaic hardware using legacy BIOS? Then you've come to the right place. You may be a homelabber like myself wanting to boot up the hypervisor (e.g. Proxmox).

I've spent numerous hours, searching for a clear step-to-step guide on this, and apparently there isn't an easily-searchable one for macOS users at the time of this writing. Fortunately for us, the Clover project, hosted on GitHub, has a convenient package for us to create a bootloader USB. This project is also hosted on SourceForge.

DOWNLOADING CLOVER:

@mholt
mholt / macapp.go
Last active May 1, 2025 04:32
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@simonw
simonw / how-to-upgrade-heroku-postgresql.md
Last active May 3, 2025 15:45
How to upgrade a Heroku PostgreSQL database to a new plan

How to upgrade a Heroku PostgreSQL database to a new plan

I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).

After assigning the new database, I had two databases attached to the application. They looked something like this:

  • HEROKU_POSTGRESQL_OLIVE (postgresql-dimensional-3321) Old, free-tier (Hobby Dev) database
@posener
posener / go-table-driven-tests-parallel.md
Last active April 24, 2025 20:46
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@dimkir
dimkir / nightmare-on-amazon-linux.MD
Last active October 31, 2024 16:51
How to run nightmare on Amazon Linux

Running nightmare on Amazon Linux

You may have thought of running nightmare on AWS Lambda. But before we can run it on Lambda, we need first to make it run on Amazon Linux.

Provision instance which replicates Lambda environment

According to AWS Documentation on Lambda Execution Environment and available Libraries we would need this AMI image with this alias amzn-ami-hvm-2016.03.3.x86_64-gp2. Keep in mind that AMI-image-id for this instance would be different in different regions (eg):

  • In eu-west-1 - ami-f9dd458a
  • In us-east-1 - ami-6869aa05
How to install and run Headless nightmare.js based scripts in Ubuntu.
Steps:
1. Spin Ubuntu 16.04 x64 server
2. Run: apt-get update
3. Run: apt-get upgrade
4. Run: apt-get install -y libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3 xvfb
5. Install Node.js 6+. See: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
You can then run your script using this command: