Skip to content

Instantly share code, notes, and snippets.

View PJB3005's full-sized avatar
🤔
Wondering why anybody would use these status messages.

Pieter-Jan Briers PJB3005

🤔
Wondering why anybody would use these status messages.
View GitHub Profile
@PJB3005
PJB3005 / hue_shift_dmi.py
Last active February 2, 2018 21:08
Shifts the hue of states in a BYOND DMI.
#!/usr/bin/env python3
import argparse
import colorsys
from pathlib import Path
from byond.DMI import DMI
from byond.DMI.State import State as DMIState
from PIL import Image
@PJB3005
PJB3005 / links.md
Last active January 12, 2020 22:08
/vg/station IRC links.
@PJB3005
PJB3005 / status.lua
Created September 15, 2017 20:51
MC OpenComputers SS13 server status poller.
-- I HAVE IMPORTED THE INTERWEB
local internet = require("internet")
local struct = require("struct")
local hex = require("hex")
local urlparse = require("urlparse")
local tprint = require("tprint")
local term = require("term")
local arg = {...}
function make_byond_request(address, port, message)
import colorsys
from random import randint
for x in range(10):
h = randint(0, 360)
s = randint(0, 100)
l = randint(0, 100)
r, g, b = colorsys.hls_to_rgb(h/360, l/100, s/100)
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
Import-Module posh-git
# Set up a simple prompt, adding the git prompt parts inside git repos
function global:prompt {
$realLASTEXITCODE = $LASTEXITCODE
Write-Host($pwd.ProviderPath) -nonewline -ForeGroundColor green
@PJB3005
PJB3005 / __init__.py
Created October 14, 2016 20:55
Discord Relay
#!/usr/bin/env python2
from __future__ import print_function
from flask import Blueprint, request, abort
from multiprocessing.connection import Client
discordrelay = Blueprint("discordrelay", __name__)
@discordrelay.route("/discord")
def relay():
message = {
#!/usr/bin/env python2
from __future__ import print_function, division
from flask import Blueprint, request, render_template, abort, send_file
import os.path
import os
import byond.DMI
import PIL.Image
import random
@PJB3005
PJB3005 / vgui_server_draft.dm
Last active August 22, 2016 11:31
/vg/UI public API draft.
///// /datum LEVEL.
// PUBLIC API.
/*
This is the proc used to open a UI on a datum. No exceptions.
Arguments:
- user: Mob to open the UI for.
- force_reopen: Whether to forcefully reopen the UI instead of updating it if it is already open.
- exargs: Extra arguments to pass to ui_config(). See below.
Returns:
@PJB3005
PJB3005 / nearest_dmi.py
Last active July 31, 2016 13:56
32->64
#!/usr/bin/env python2
# Requires Pillow (fork of PIL) and BYONDTools.
# For Pillow you can just run "$ pip instal pillow" (without quotes) in a terminal.
# If your PATH doesn't include Python just go to %Python directory%/scripts/, it's in there.
# As for BYONDTools: download a ZIP of https://gitlab.com/N3X15/ByondTools, then run setup.py install from a terminal.
from __future__ import print_function
from byond.DMI import DMI
from byond.DMI.State import State
import PIL.Image
import os
@PJB3005
PJB3005 / .atom-build.json
Last active October 4, 2018 06:51
So you want to ascend to Atom for coding BYOND?
{
"cmd": "C:/Program Files (x86)/BYOND/bin/dm.exe",
"args": [ "C:/path/to/your/specific/code.dme" ],
"sh": false,
"errorMatch":
[
"\n(?<file>[\\\\\/0-9a-zA-Z\\._]+):(?<line>\\d+).*"
]
}