Skip to content

Instantly share code, notes, and snippets.

/**
* Advanced Scoreboard
*
* @author Cr1N
* @version 1.0.1
*/
BBLog.handle("add.plugin", {
/* Plugin Infos */
id : "bf4-advanced-scoreboard-plugin-dev-1-0",
@dot-mike
dot-mike / archive_magic_wallpaper.sh
Last active August 31, 2021 22:31
Archive Magic: The Gathering wallpapers
#!/usr/bin/env bash
set -euo pipefail
main() {
which pup > /dev/null || (echo "Error: missing 'pup'; see https://github.com/ericchiang/pup" ; exit 1)
which jq > /dev/null || (echo "Error: missing 'jq'; install with: apt install jq" ; exit 1)
mkdir -p "wizard_wallpapers" && pushd "wizard_wallpapers" >/dev/null || exit
@dot-mike
dot-mike / git-hook-support-for-portainer.patch
Created July 17, 2022 14:08
Support for running Git hooks in Portainer 2.14
diff --git a/api/exec/compose_stack.go b/api/exec/compose_stack.go
index e99f265b5..2dbfc6b1f 100644
--- a/api/exec/compose_stack.go
+++ b/api/exec/compose_stack.go
@@ -194,7 +194,7 @@ func createNetworkEnvFile(stack *portainer.Stack) error {
}
envfile, err := os.OpenFile(path.Join(stack.ProjectPath, ".env"),
- os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
+ os.O_WRONLY|os.O_CREATE, 0600)
@dot-mike
dot-mike / README.md
Last active July 18, 2022 00:47
Script to fetch Yahoo GMD archive from the Archiveteam and
@dot-mike
dot-mike / gpg-ssh-setup.md
Created July 2, 2023 13:54 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@dot-mike
dot-mike / extract_zst.py
Created November 21, 2023 20:46 — forked from scivision/extract_zst.py
Extract a .zst file in Python
from pathlib import Path
import tempfile
import tarfile
import zstandard
# pip install zstandard
def extract_zst(archive: Path, out_path: Path):
"""extract .zst file
@dot-mike
dot-mike / squid-plus-mikrotik.txt
Created May 6, 2024 14:54 — forked from riipandi/squid-plus-mikrotik.txt
Squid Proxy & Mikrotik Setup Script
http://ictsentani.org/?p=258
http://opensource.telkomspeedy.com/forum/viewtopic.php?pid=122506
#-------------------------------------------------------------------------------
E1 Modem1 : 192.168.77.1 -> IP Modem1 : 192.168.77.2
E2 Server : 192.168.88.1 -> IP Server : 192.168.88.2
E3 Hotspot : 192.168.99.1 -> IP Hotspot : 192.168.99.10 - 192.168.99.250
E4 Labkom : 10.10.10.254 -> IP Labkom : 10.10.10.1 - 10.10.10.20
#-------------------------------------------------------------------------------
@dot-mike
dot-mike / profile.js
Created May 9, 2024 17:54
Firefox profile privacy tweaks
user_pref("devtools.editor.keymap", "emacs");
user_pref("browser.tabs.closeWindowWithLastTab", false);
user_pref("app.normandy.api_url", "");
user_pref("app.normandy.enabled", false);
user_pref("app.shield.optoutstudies.enabled", false);
user_pref("beacon.enabled", false);
user_pref("breakpad.reportURL", "");
user_pref("browser.aboutConfig.showWarning", false);
user_pref("browser.crashReports.unsubmittedCheck.autoSubmit", false);
user_pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
@dot-mike
dot-mike / synology-free-port.sh
Created May 28, 2024 16:17
Free port from Synology system
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@dot-mike
dot-mike / README.md
Last active March 25, 2025 11:46
Inital setup script for Ubuntu server

Inital Ubuntu setup script

This script is meant to be run on a fresh Ubuntu LTS installation.