Skip to content

Instantly share code, notes, and snippets.

View Fusselwurm's full-sized avatar
🥸

Moritz Schmidt Fusselwurm

🥸
View GitHub Profile
@Fusselwurm
Fusselwurm / gruppe-adler-concept-sbs.md
Last active September 21, 2021 19:30
Slotting Bounty System (SBS)

Slotting Bounty System (SBS)

Motivation

Some roles tend to stay open for a long time, some roles are taken the instant the slotting goes online. We want some system that equals the playing field and

  • incentivizes players to cover all roles
  • prevents slot sniping
  • gives everyone a chance to play their preferred role

Arma 3 Discord Rich Presence

Show what you're playing in Arma 3 with Discord Rich Presence.

Features

  • Simple plug and play, works on every mission.
  • Automatically activate rich presence as soon as the client spawns in.
  • Update rich presence information instantly using SQF.
  • SP/MP Compatible.
@marceldev89
marceldev89 / a3update.py
Last active April 21, 2024 11:21
Arma 3 Linux server and mod updater (workshop)
#!/usr/bin/python3
# MIT License
#
# Copyright (c) 2017 Marcel de Vries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@dlimpid
dlimpid / string-md5.kt
Created July 7, 2017 09:34
Get MD5 hash of the string (of length 32, with leading zeros) in Kotlin
import java.math.BigInteger
import java.security.MessageDigest
fun String.md5(): String {
val md = MessageDigest.getInstance("MD5")
return BigInteger(1, md.digest(toByteArray())).toString(16).padStart(32, '0')
}
@nomisum
nomisum / index.php
Created May 2, 2017 19:15
server restart snippet
<?php
const SERVER_TEMPLATE_ROOT = '/home/arma3server/arma3/config/templates';
const RESTART_TRIGGER_FILENAME = '/tmp/arma3server-webrestart-command';
const ARMA3_PATH = '/home/arma3server/arma3';
$secretsFile = '/etc/arma3server-webrestart.ini';
$secrets = parse_ini_file($secretsFile);
if (!$secrets) {
echo 'MISSING SECRETS FILE OR SECRETS FILE INVALID. EXAMPLE FOR VALID STRUCTURE: nomisum=s3cr3t';
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@conspect
conspect / cult_of_ignorance.md
Last active January 22, 2024 10:33
A Cult Of Ignorance, Isaac Asimov

It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingeniously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"

None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.

There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way throughout political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people

@traviskaufman
traviskaufman / logback_disable_in_unit_tests.md
Last active March 20, 2023 08:38
Logback: Disable all logging in unit tests

After scouring the internet and piece-mealing together the correct way to do this, here is a step-by-step, all-in-one-place guide to making logback STFU when running your unit tests.

Here's how to do it

Save the following as logback-test.xml under src/test/resources:

<configuration>
  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <pattern>%msg%n</pattern>
@will-hart
will-hart / README.md
Last active March 22, 2024 04:55
Stitch together tilemaps into a single image

Why?

This is a simple Python / PIL utility for taking a series of images in a tile map set and stitching them together into a single image. This is being used to convert these http://forums.bistudio.com/showthread.php?178671-Tiled-maps-Google-maps-compatible-(WIP) for www.anvilproject.com.

How?

  1. Drop the stitcher.py file into the root directory of your tile map set, where all the numbered folders are
  2. Edit two lines in the file, these are commented - one for the number of folders and one for the number of images in each folder