Skip to content

Instantly share code, notes, and snippets.

View FibreFoX's full-sized avatar
🕑
making changes to his life the next months

Danny Althoff FibreFoX

🕑
making changes to his life the next months
View GitHub Profile
@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 May 5, 2024 22:42
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 April 27, 2024 12:50
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 September 14, 2023 14:54
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'.
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active February 27, 2024 14:08
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a