Skip to content

Instantly share code, notes, and snippets.

@SpaceManiac
SpaceManiac / MapListener.java
Created August 2, 2011 04:39
Examples of the work-in-progress Bukkit Map API.
package com.platymuus.bukkit.maptest;
import org.bukkit.event.server.MapInitializeEvent;
import org.bukkit.event.server.ServerListener;
import org.bukkit.map.MapView;
/**
* A sample ServerListener which broadcasts a message any time a map is initialized.
*/
public class MapListener extends ServerListener {
/proc/get_connection()
var/options = list(
"host" = "127.0.0.1",
"port" = 3306,
"user" = "some_username",
"pass" = "some_password",
"db_name" = "some_dbname",
"min_threads" = 1,
"max_threads" = 5,
)
@SpaceManiac
SpaceManiac / .travis.yml
Created October 5, 2019 21:04
Travis YML file to run dmdoc and upload its output to GitHub pages
language: generic
dist: xenial
sudo: false
branches:
except:
- ___TGS3TempBranch
- ___TGSTempBranch
matrix:
@SpaceManiac
SpaceManiac / _Emscripten Coroutines.md
Last active July 19, 2019 05:20
Simple Emscripten coroutine scheduler
  • Replace void SceneLoop() with TASK(void) SceneLoop()
  • Replace AnotherSceneLoop() with AWAIT AnotherSceneLoop()
  • Replace flip_screen() with AWAIT flip_screen()
  • Replace return with CO_RETURN
  • At the end of flip_screen() impl, AWAIT next_frame()
From b80b1832ea6fa92402e79697ade7853241a9f2d5 Mon Sep 17 00:00:00 2001
From: Tad Hardesty <tad@platymuus.com>
Date: Sat, 28 Jul 2018 17:24:36 -0700
Subject: [PATCH] Add dm2doxy doxygen filter
Works by parsing the whole environment and creating dummy files
corresponding to each real file, which are then served instead of
parsing the real files one-by-one.
Not recommended for use, as Doxygen takes upwards of 6.5 hours to
package com.platymuus.bukkit.maptest;
import com.platymuus.bukkit.mapapi.MapAPI;
import com.platymuus.bukkit.mapapi.MapInfo;
import com.platymuus.bukkit.mapapi.TextRenderer;
import com.platymuus.bukkit.mapapi.TextRenderer.CharacterSprite;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
#define JOB_MODIFICATION_MAP_NAME "NSS Frenzy"
// Command
/datum/job/New()
..()
MAP_JOB_CHECK
supervisors = "the captain and the head of personnel"
/datum/job/captain/New()
..()
#!/usr/bin/env python3
import sys, shutil
from PIL import Image
from PIL.PngImagePlugin import PngInfo
def split(fname):
image = Image.open(f"{fname}.dmi")
if 'Description' not in image.info:
return

Mirror Dimension Infiltration

Abstract

  • Conversion mode
  • Minimal additional mechanics
  • Non-lethal focus
  • Paranoia rather than team deathmatch

Mirror People

@SpaceManiac
SpaceManiac / test.cpp
Last active August 18, 2018 06:20
Demo of thread reclamation crashes w/o hooking world/Del
#include <thread>
#include <memory>
#include <atomic>
using namespace std;
using namespace std::chrono_literals;
atomic<bool> should_quit;
struct wrapper {