Skip to content

Instantly share code, notes, and snippets.

Avatar

Tad Hardesty SpaceManiac

View GitHub Profile
View rustg_sql.dm
/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 Oct 5, 2019
Travis YML file to run dmdoc and upload its output to GitHub pages
View .travis.yml
language: generic
dist: xenial
sudo: false
branches:
except:
- ___TGS3TempBranch
- ___TGSTempBranch
matrix:
@SpaceManiac
SpaceManiac / _Emscripten Coroutines.md
Last active Jul 19, 2019
Simple Emscripten coroutine scheduler
View _Emscripten Coroutines.md
  • 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()
View Add dm2doxy doxygen filter.patch
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
View FrenzyStation.dm
#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()
..()
View mirror-people.md

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 Aug 18, 2018
Demo of thread reclamation crashes w/o hooking world/Del
View test.cpp
#include <thread>
#include <memory>
#include <atomic>
using namespace std;
using namespace std::chrono_literals;
atomic<bool> should_quit;
struct wrapper {
@SpaceManiac
SpaceManiac / gist:a8c05ca4b54d44004e9c2b5248701e73
Created Jun 29, 2018
Comcast "alert" injected into tail of HTTP request in order to deliver supposedly-"critical and time sensitive", non-disableable 100% data cap notif
View gist:a8c05ca4b54d44004e9c2b5248701e73
<script language="JavaScript" type="text/javascript">
// Copyright (C) 2017 Comcast Cable Communications, LLC
// Contact Us: http://customer.xfinity.com/contact-us/
// Intended use of this message is to display critical and time sensitive notifications to customers.
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
View _planetstation.md
  1. cd to your tgstation directory
  2. mkdir data/planetstation
  3. Place planetstation.py in tools/mapmerge2/
  4. set PYTHONPATH=tools/mapmerge2
  5. python3 -m planetstation _maps/map_files/*/*Station.dmm
  6. Observe output in data/planetstation

If that doesn't work ping me on IRC or figure it out.

View dmi.py
#!/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
You can’t perform that action at this time.