Skip to content

Instantly share code, notes, and snippets.

View mallardduck's full-sized avatar
🦑
Rockin the suburbs

Dan mallardduck

🦑
Rockin the suburbs
View GitHub Profile
@mallardduck
mallardduck / vue-dev.js
Created February 15, 2024 19:03
Enable Vue DevTools in Prod
const app = Array.from(document.querySelectorAll('*')).find((e) => e.__vue__).__vue__
const version = app.version
const devtools = window.__VUE_DEVTOOLS_GLOBAL_HOOK__
devtools.enabled = true
const Vue = Object.getPrototypeOf(app).constructor
while (Vue.super) {
Vue = Vue.super
}
Vue.config.devtools = true
devtools.emit('init', Vue)
@mallardduck
mallardduck / README.md
Last active February 3, 2024 11:05
Palworld Server Config Values Guide
  • Difficulty: The difficulty of the server's map. (Default: None)
  • DayTimeSpeedRate: Day time speed (Default: 1.000000)
  • NightTimeSpeedRate: Night time speed (Default: 1.000000)
  • ExpRate: EXP rate (Default: 1.000000)
  • PalCaptureRate: Pal capture rate (Default: 1.000000)
  • PalSpawnNumRate: Pal appearance rate; note, may affect game performance. (Default: 1.000000)
  • PalDamageRateAttack: Damage from pals multiplier (Default: 1.000000)
  • PalDamageRateDefense: Damage to pals multiplier (Default: 1.000000)
  • PlayerDamageRateAttack: Damage from player multiplier (Default: 1.000000)
  • PlayerDamageRateDefense: Damage to player multiplier (Default: 1.000000)
@mallardduck
mallardduck / RFC-77847132696872.md
Last active June 12, 2023 16:11
What if there was an RFC style specification for tracking "player game state" of EDH magic the gathering games? Welp I guess this might be kinda what that would be like...

MTG EDH Game State Tracker Specification

Status of this Memo

This document is created purely for entertainment purposes and is not meant to imply any authoratative stance. The memo has been created by a fan of the EDH game format and is not at all associated with the EDH rules committee.

Abstract

This document serves as a specification for the properties of a single player's "Game State" in the context of an EDH Commander Magic: The Gathering game.

The intention of this specification is to provide a comprehensive overview of the game state elements that should be tracked for each player during gameplay. It is important to note that this document is not authoritative and is independent of the EDH Rules Committee.

@mallardduck
mallardduck / 0-twitter-nuke-script.name
Last active November 16, 2023 23:02
Symfony Panther Tweets Deleter
placeholder to control gist title name
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: piholes
image: pihole/pihole:2022.07
network_mode: host # I do this to keep things simple - but could also do macvlan
environment:
TZ: 'America/Detroit' # Update
@mallardduck
mallardduck / supported-avr-chips.md
Created July 9, 2022 19:27
QMK Supported AVR Chips

Current Supported AVR Chips

Type Chipset Total Pins GPIO Pins Usable GPIO Vcc USB
AVR ATmega16U2 / ATmega32U2 32 22 17 5v Native
AVR ATmega16U4 / ATmega32U4 44 26 22 5v Native
AVR AT90USB64 / AT90USB128 64 48 44 5v Native
AVR AT90USB162 32 22 17 5v Native
AVR ATmega32A 44 32 29 5v vUSB
AVR ATmega328P 32 23 15 5v vUSB
@mallardduck
mallardduck / db.md
Created June 30, 2022 00:55
suse-hackweek-support-matrix
erDiagram

	rancher_releases {
		INTEGER RancherReleaseId
		NVARCHAR Version
	}

	hosted_runtime_versions {
		INTEGER HostedRuntimeVersionId
@mallardduck
mallardduck / missyElliott.php
Last active April 22, 2022 23:46
Apply the "Work It" transformation to an Integer with PHP
<?php
function missyElliott(int $id): int {
if ($id > 4294967295) {
throw new \RuntimeException('Maximum integer size is 4_294_967_295');
}
// Int to Binary - ensure at least 32 char long binary string
$binaryInt = str_pad(decbin($id), 32, '0', STR_PAD_LEFT);
// Split into workIt array
$workIt = str_split($binaryInt, 1);
@mallardduck
mallardduck / script.sh
Last active April 8, 2022 16:44
How to unpack and modify/customize the initrd (using zstd compression)
export LANG=C
TMP=`mktemp -d`
umask 022
mkdir -p $TMP/earlycpio
mkdir $TMP/initramfs
umask 077
cd $TMP/earlycpio
@mallardduck
mallardduck / HumanDateTimeDiff.php
Created March 20, 2022 19:48
Laravel Human date time diff example
<?php
namespace App\View\Components;
use Carbon\Carbon;
use Illuminate\View\Component;
class HumanDateTimeDiff extends Component
{
public $dateTime;