Skip to content

Instantly share code, notes, and snippets.

View depwl9992's full-sized avatar

Daniel Powell depwl9992

View GitHub Profile
@depwl9992
depwl9992 / Bundle - Derating.csv
Created March 1, 2023 20:49
MIL-W-5088L Bundled Wire Current Derating
Bundle Derating
Wires in Bundle (X) 20% Total Bundle Loading 40% Total Bundle Loading 60% Total Bundle Loading 80% Total Bundle Loading 100% Total Bundle Loading
1 1 1 1 1 1
2 0.9675 0.92 0.91 0.87 0.825
3 0.935 0.855 0.815 0.77 0.725
4 0.9075 0.805 0.75 0.705 0.66
5 0.875 0.76 0.695 0.65 0.61
6 0.85 0.725 0.655 0.605 0.5725
7 0.82 0.695 0.625 0.57 0.54
8 0.795 0.6675 0.595 0.5425 0.5125
@depwl9992
depwl9992 / SpigotMC-Mob_Heads-Config.yml
Last active July 13, 2020 17:45
An updated config file for https://www.spigotmc.org/resources/ultimate-mob-heads-fork.70019/ to match VanillaTweaks' MoreMobHeads 2.6.2 datapack for MC v1.16, including the more generous VT probabilities. Some head names are also updated to be a bit cleaner and more "in-character" (e.g. "Mooshroom[Brown] Head" -> "Brown Mooshroom Head").
#List of all mobs that are supported in this plugin.
#dropChance = the chance of the mob dropping their corresponding head.
#lootingBonus = the added drop bonus when the mob was killed by a sword with looting. This value is multiplied by the level of looting and added to the dropChance.
#broadcastMessage = when a player kills a mob and it drops their head, it will broadcastMessage a message to the server. You might want to disable the broadcastMessage option for mobs that are easily farmable, such as an enderman farm.
ListOfMobs:
Bat:
dropChance: 2%
lootingBonus: 2%
broadcastMessage: true
dropOnChargedCreeperDeath: true
@depwl9992
depwl9992 / VT-Wandering-Trades-To-Shopkeepers.md
Last active February 26, 2021 20:10
Converting VanillaTweaks' Wandering Trader Miniblock loot tables to the SpigotMC Shopkeepers plugin
# Defines all Languages known to GitHub.
#
# fs_name - Optional field. Only necessary as a replacement for the sample directory name if the
# language name is not a valid filename under the Windows filesystem (e.g., if it
# contains an asterisk).
# type - Either data, programming, markup, prose, or nil
# aliases - An Array of additional aliases (implicitly
# includes name.downcase)
# ace_mode - A String name of the Ace Mode used for highlighting whenever
# a file is edited. This must match one of the filenames in http://git.io/3XO_Cg.
@depwl9992
depwl9992 / Rendering-the-Nether-Roof.md
Last active April 8, 2024 12:27
A fully comprehensive tutorial for webbukkit/dynmap to render the nether roof in Minecraft

Initial Setup of the Nether Roof Map

  1. Assuming dynmap is already initialized and the folder structure has been generated during a first-time run, <Spigot_Server>/plugins/dynmap/custom-perspectives.txt should exist.
  2. Open custom-perspectives.txt in a text editor.
  3. In this file below the line perspectives: add the following lines of text.
  - class: org.dynmap.hdmap.IsoHDPerspective
    name: nether_top_map_lowres
    maximumheight: 256
    minimumheight: 129
    inclination: 90
@depwl9992
depwl9992 / database.php
Created March 13, 2019 02:04
Servatrice Decklist Viewer
<?php
$dbName = "servatrice";
$dbHost = "localhost";
$dbUser = "servatrice";
$dbPass = "<password>";
$dbConnect = new PDO("mysql:dbname=$dbName;host=$dbHost;charset=utf8",$dbUser,$dbPass);
$dbConnect->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); // Enable emulated, prepared statements. Note - false means we will try to use NATIVE prepared statements, but will fall back on emulation.
$dbConnect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Set errors to display if PDO fails.
?>
@depwl9992
depwl9992 / MSSP_Packet.hex
Last active January 19, 2019 14:34
MUSHClient Telnet Option Reporter
Incoming packet: 3 (15 bytes) at Wednesday, January 16, 2019, 1:10:09 PM
ÿý.ÿý.ÿû*ÿûFÿûÉ ff fd 18 ff fd 1f ff fb 2a ff fb 46 ff fb c9
Sent packet: 2 (3 bytes) at Wednesday, January 16, 2019, 1:10:09 PM
ÿû. ff fb 18
Sent packet: 3 (3 bytes) at Wednesday, January 16, 2019, 1:10:09 PM
@depwl9992
depwl9992 / makegitsha1.bat
Last active November 18, 2019 17:01
Git revision generator for C/C++ (Windows Batch file)
@echo off
echo Writing to %file%
echo /** @file git_sha1.h > %file%
echo * Auto-generated git revision. Created by makegitsha1.bat which is run >> %file%
echo * as a pre-build event. The #define generated is then referenced >> %file%
echo * within the program in something like an About screen. Simply #include "git_sha1.h" >> %file%
echo * from another c/cpp/h/hpp file and pull GIT_SHA1 as a string variable. >> %file%
echo * Do note, however, that git_sha1.h MUST be ignored within .gitignore to >> %file%
echo * avoid recursive weirdnesses. Additionally this script should only be run >> %file%
echo * in a directory that has been initialized as a git repo. >> %file%
#!/bin/sh
#
# Update A-records on each domain hosted at enom.com.
# Updated by Daniel Powell on 2017-02-24
# 2017-02-24 - Turns out according to https://gist.github.com/agarzon/2431219, we can combine HostName+Zone into Zone, and omitting Address assumes the IP performing the HTTP call.
# - Functionize this script! It's totally awesome now.
#
# Make a GET call to http://dynamic.name-services.com/interface.asp
# All known params according to https://www.enom.com/download/updateip.cpp:
# Command=SetDNSHost -- I don't know if this is the only option. Would be great if one could set cnames, mx records, redirects, text records from this too...
@depwl9992
depwl9992 / ip-update.php
Last active February 25, 2017 00:11 — forked from agarzon/ip-update.php
ENOM IP Updater (PHP)
<?php
/** Fork from Agarzon's original version using beefed up cURL script and function calls */
function runEnom($zone, $pass) {
$sh = curl_init();
$url = "http://dynamic.name-services.com/interface.asp";
$get = array(
"Command"=>"SetDNSHost",
"Zone"=>$zone,
"DomainPassword"=>$pass
);