Skip to content

Instantly share code, notes, and snippets.

View FibreFoX's full-sized avatar
🕑
busy and exhausted, but still learning more

Danny Althoff FibreFoX

🕑
busy and exhausted, but still learning more
View GitHub Profile
@geerlingguy
geerlingguy / recompile-mesa-raspberry-pi.md
Last active October 18, 2025 22:12
Getting a newer Mesa version on Raspberry Pi (Debian)

Compile Mesa from source (note: doing this makes it difficult to get back to a clean package install):

  1. Allow sources to be installed via apt:
    1. Bookworm and earlier: Uncomment the deb-src line inside /etc/apt/sources.list.d/raspi.list and save it
    2. Trixie and later: Edit /etc/apt/sources.list.d/raspi.sources and add set Types to Types: deb deb-src and save it
  2. Install build dependencies:
    1. sudo apt update && sudo apt build-dep mesa -y
    2. sudo apt install python3-pycparser
  3. Install later version of meson:
  4. sudo apt remove meson -y
@TheAlienKnight
TheAlienKnight / v4.0.0-migration.sh
Last active November 23, 2022 00:31
v3.5.3 to v4.0.0 - Mastodon Docker Migration
#!/bin/bash
echo "Creating backup folder if one doesn't exist already..."
mkdir -p ./backups/3.5.3/
echo "Backing up the Mastodon Database"
docker exec mastodon-db-1 pg_dump -Fc -U postgres postgres > ./backups/3.5.3/pg-3.5.3.dump
echo "Assuming docker-compose.yml exists in this directory, replacing v3.5.3 with v4.0.0"
sed -i 's/v3.5.3/v4.0.0/g' docker-compose.yml
echo "Pulling new versions from dockerhub"
docker compose pull
echo "Performing Pre-deployment database migrations..."
@ccdle12
ccdle12 / Rust-Cheat-Sheet.md
Last active September 29, 2023 01:51
My Cheat Sheet for programming in Rust.

Rust Cheat Sheet

Covers different areas of programming and the best practices/components explained.

Frequently used crates

A crate that contains a trait StructOpt. Allows a structure Opt to be converted
@TrillCyborg
TrillCyborg / mastodon-docker-setup.md
Last active November 10, 2025 16:38
Mastodon Docker Setup

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@AdamCarroll
AdamCarroll / publish-to-local-maven.gradle
Created March 25, 2018 13:46
Gradle snippet for local Maven publish
apply plugin: 'maven-publish'
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
#!/bin/bash
OLDIFS=$IFS
export IFS=$'\n'
# Find all boxes which have updates
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 2>/dev/null)
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then
@kristovatlas
kristovatlas / cssbanner-beautified2.js
Last active March 9, 2018 21:49
cleaned up version of cssbanner.js
//beautified at http://jsbeautifier.org/ with default options
//and then manually modified
/*jslint bitwise: true */
self.onmessage = function (msg) {
var thecode = msg.data;
/**
* Ostensibly unused function
@JonCole
JonCole / Redis-BestPractices-General.md
Last active December 2, 2025 10:45
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

@remojansen
remojansen / class_decorator.ts
Last active July 30, 2025 05:53
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@mgedmin
mgedmin / postfix.py
Last active February 6, 2024 14:21
Ansible module for postfix configuration
#!/usr/bin/python
import subprocess
DOCUMENTATION = '''
---
module: postfix
short_description: changes postfix configuration parameters
description:
- The M(postfix) module changes postfix configuration by invoking 'postconf'.