Skip to content

Instantly share code, notes, and snippets.

View warriordog's full-sized avatar

Hazel K warriordog

  • United States
View GitHub Profile
@ShadowJonathan
ShadowJonathan / haproxy.cfg
Last active April 3, 2024 19:08
A reverse proxy daisy chain config that buffers fediverse traffic
# Place this after your default configuration
frontend fedi_fe
mode http
# this is the address that haproxy will listen on,
# when doing this local loopback, its recommended to set to localhost (127.0.0.1)
bind 127.0.0.1:28080
default_backend fedi_fe
@jaygooby
jaygooby / log4j-jndi.conf
Last active February 2, 2022 12:04
fail2ban filter rule for the log4j CVE-2021-44228 exploit
# log4j jndi exploit CVE-2021-44228 filter
# Save this file as /etc/fail2ban/filter.d/log4j-jndi.conf
# then copy and uncomment the [log4j-jndi] section
# to /etc/fail2ban/jail.local
#
# jay@gooby.org
# https://jay.gooby.org/2021/12/13/a-fail2ban-filter-for-the-log4j-cve-2021-44228
# https://gist.github.com/jaygooby/3502143639e09bb694e9c0f3c6203949
# Thanks to https://gist.github.com/kocour for a better regex
#
@FiXato
FiXato / Mastodon-indicate_undescribed_media_with_borders-subtler.user.css
Last active March 7, 2024 18:29
CSS user style to add a red border around media (images, audio, video and animated 'gifv') that lacks a description. Based on code by Paul: https://linernotes.club/@balrogboogie
/* indicate media without a description
initial code by Paul (https://linernotes.club/@balrogboogie), expanded upon by FiXato (https://contact.fixato.org)
related discussions: https://dragonscave.space/@Mayana/106443499687608116.
Feel free to reuse it; it's public domain (https://linernotes.club/@balrogboogie/106681622019395866) */
.media-gallery__item-thumbnail img:not([alt]),
.audio-player__canvas:not([title]),
.video-player video:not([title]),
.media-gallery__gifv video:not([title])
{
border: 1px dashed rgba(255, 0, 0, 0.5);
@RichardB122
RichardB122 / ExperienceManager.java
Created June 20, 2015 06:28
A simple and easy to use class that can get and set a player's total experience points in Minecraft. This is based off the Bukkit API. The determines this with a mathematical formula based off the player's current level and their progress towards the next one.
/*
AUTHOR: Dev_Richard (https://www.spigotmc.org/members/dev_richard.38792/)
DESC: A simple and easy to use class that can get and set a player's total experience points.
Feel free to use this class in both public and private plugins, however if you release your
plugin please link to this gist publicly so that others can contribute and benefit from it.
*/
import java.math.BigDecimal;
import java.util.List;