Skip to content

Instantly share code, notes, and snippets.

@br3ndonland
br3ndonland / github-actions-notes.md
Last active May 30, 2026 00:06
Getting the Gist of GitHub Actions
@peteristhegreat
peteristhegreat / Readme.md
Last active August 1, 2026 06:49
Realtek bluetooth usb adapter RTL8671b
@gabrielsson
gabrielsson / minecraft-on-raspberry-pi.md
Last active June 12, 2026 06:19
Minecraft on Raspberry Pi cluster with metrics

alt

Minecraft on Raspberry Pi cluster with metrics

Ever wanted to put your Rapsberry Pi cluster to great use? Our team is working remotely, so we started to play Minecraft. I decided I would host the Minecraft server on my Raspberry Pi cluster. This gist will guide you through the steps I took to get a k3s cluster up with k3sup and later installed Minecraft as well as metrics exporter and Prometheus Operator

Why?

Quoniam Possumus - Because we can

You'll need

@dabit3
dabit3 / App.js
Created March 20, 2020 19:47
Expo + Amplify DataStore App
import Amplify from '@aws-amplify/core'
import config from './aws-exports'
Amplify.configure(config)
import React, { useState, useEffect } from 'react'
import { Text, View, TextInput, Button } from 'react-native'
import { DataStore } from '@aws-amplify/datastore'
import { Message} from './src/models'
const initialState = { color: 'black', title: '' }
@pseudosavant
pseudosavant / canvasToObjectUrl.js
Last active November 19, 2023 17:14
async method for creating an object URL from a canvas
const canvasToBlobUrl = (() => {
const canvasToBlobURL = (canvas, type='image/webp', option=0.1) => {
const promise = new Promise(async (resolve) => {
await rAF();
const blob = await canvasToBlob(canvas);
resolve(URL.createObjectURL(blob, type, option));
});
return promise;
}
@EricTendian
EricTendian / email-over-curl.sh
Created February 17, 2020 22:11
Sending an HTML email with curl over SMTP
#!/bin/bash
cat << EOF > email.eml
From: "${MAIL_FROM_NAME}" <${MAIL_FROM_ADDRESS}>
To: "${MAIL_TO_NAME}" <${MAIL_TO_ADDRESS}>
Reply-To: "${MAIL_TO_NAME}" <${MAIL_TO_ADDRESS}>
Subject: ${MAIL_SUBJECT}
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
@alexellis
alexellis / FAASD_MULTIPASS.md
Last active July 31, 2021 01:50
FAASD_MULTIPASS.md
@tmarshall
tmarshall / lazy-template-literals.js
Last active October 29, 2023 11:21
Lazy javascript template literals
const templatized = (template, vars = {}) => {
const handler = new Function('vars', [
'const tagged = ( ' + Object.keys(vars).join(', ') + ' ) =>',
'`' + template + '`',
'return tagged(...Object.values(vars))'
].join('\n'))
return handler(vars)
}
var kb = require("ble_hid_keyboard");
var services = {
0x180a: {
0x2a50: {
value: [
0x01, /* Use USB Vendor IDs */
0xac, 0x05, /* Apple */
0x5a, 0x02, /* Internal Keyboard */
0x00, 0x00