This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stream { | |
### | |
### Setup | |
### | |
# connection-limiting | |
limit_conn_zone $binary_remote_addr zone=addr:10m; | |
limit_conn_log_level warn; | |
limit_conn addr 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2023 by Addison Schuhardt | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I'm an ImageMagick newbie and don't know/care enough to make this performant | |
# I made this for working with this isometric walls pack: https://screamingbrainstudios.itch.io/isowallpack | |
foreach ($name in Get-ChildItem -Recurse -Filter *.png | ForEach-Object FullName) { | |
# convert magenta and black to transparent | |
mogrify -transparent "rgb(255,0,255)" $name; | |
mogrify -transparent "rgb(0,0,0)" $name; | |
# add 64px of spacing along the X-axis, and 32px along the Y-axis | |
convert $name -background None ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"domain": "pleroma.rareome.ga", | |
"reasons": [ | |
"security-risk", | |
"hate speech", | |
"abuse" | |
] | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is a collection of Playdate patterns compiled into a header-only library | |
* for use in C SDK projects. | |
* | |
* The pattern definitions listed here are copied directly from Ivan Sergeev's | |
* 'gfxp' library, which can be found here: https://github.com/ivansergeev/gfxp | |
* | |
* | |
* USAGE: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -f /tmp/ftb-session-name ]; then | |
echo "No session found! Was the server launched?" | |
exit 1 | |
fi | |
command_prefix="screen -S $session_name -p 0 -X stuff " | |
crontab_file="/tmp/.cronjobs-$(date '+%s')" | |
session_name="$(cat /tmp/ftb-session-name)" | |
# dump existing cron jobs to file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launch_dir="$HOME/rev3" | |
launch_script="$launch_dir/LaunchServer.sh" | |
session_name="ftb-server-$(date '+%s')" | |
command_prefix="screen -S $session_name -p 0 -X stuff" | |
crontab_file="/tmp/.cronjobs-$(date '+%s')" | |
echo "Launch directory: $launch_dir" | |
echo "Launch script: $launch_script" | |
echo "Session name: $session_name" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A resizable buffer object with its underlying array exposed | |
/// </summary> | |
public class ElasticBuffer<T> : ICollection<T> | |
{ | |
private int _capacity = 1, _count = 0; | |
private T[] _buffer; | |
public ElasticBuffer() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Text; | |
namespace WavyText | |
{ | |
class Program | |
{ | |
private enum Direction | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate discord; | |
extern crate time; | |
extern crate rand; | |
use discord::{Discord, State}; | |
use discord::model::{Event, Member}; | |
use std::env; | |
use time::{SteadyTime, Duration}; | |
use rand::Rng; |
NewerOlder