Skip to content

Instantly share code, notes, and snippets.

import re
import string
""" Custom formatter mimicing str.format() with additional capabilities.
A format string can now additionally take the form:
{literal|:format_spec}
This form will treat the text "literal" as the text to be formatted
instead of attempting to get the value from the passed-in arguments.
tinymce.PluginManager.add('dieroller', function (editor, url) {
"use strict";
var activeTab;
// Adds a menu item to the tools menu
editor.addButton('dieroller', {
image: url + '/img/dice.jpg',
context: 'tools',
tooltip: 'Dice roller',
onclick: function () {

WHOX support for UnrealIRCD 4.

To install:

  1. Add m_whox.c to your src/modules/third directory
  2. Run make
  3. Run make install
  4. Add loadmodule "third/m_whox" to your conf
  5. /rehash

This adds the token WHOX to the ISUPPORT reply and allows for specifying WHOX fields in /WHO commands.

.sheet-rolltemplate-attack .sheet-template-container .sheet-row1 {
background-color: #ffffff;
}
.sheet-rolltemplate-attack .sheet-template-container .sheet-row2 {
background-color: #e5e5e5;
}
.sheet-rolltemplate-attack .sheet-template-container {
background-color: #ffffff;
@skizzerz
skizzerz / skinnotes.md
Last active January 28, 2019 18:41
Stuff

Ideas for structure of a revamped skinning system based on Mustache (or insert-other-templating-engine-of-choice)

  • Defined inheritance between skins. Can be multiple levels, but they all chain back to the fallback skin eventually. Templates defined in a child skin completely override templates defined in the parent skin.
  • Use partials/subtemplates/whatever-they're-called to break out bits of the skin into logical chunks. This lets each partial focus on one task, and components using that can be composed easily. Child skins therefore only need to override exactly what they want to change rather than requiring tons of boilerplate stuff.
  • In addition to inheritance with templates (for the generated HTML), provide core LESS files that can be overridden by children skins. Unlike templates, these cascade so children don't need to override everything in the parent.
  • One of the core LESS files should be defining a buttload of variables for everything from color scheme to default padding, and then the other LESS
import re
import sys
import argparse
parser = argparse.ArgumentParser(description="Format scenario updates")
parser.add_argument("filename", help="File containing unformatted scenario update")
parser.add_argument("players", metavar="player", default=[], nargs="*", help="Players to populate turn order")
parser.add_argument("--turn", "-t", type=int, default=0, help="Current turn")
args = parser.parse_args()
@skizzerz
skizzerz / api.js
Last active May 6, 2019 15:47
hotfix-update-xpi-intermediate@mozilla.com-1.0.2-signed
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "skeleton" }]*/
ChromeUtils.defineModuleGetter(this, "XPIDatabase", "resource://gre/modules/addons/XPIDatabase.jsm");
var skeleton = class extends ExtensionAPI {
getAPI(/* context */) {
return {
experiments: {
skeleton: {
async doTheThing() {
// first inject the new cert
package Cpanel::API::VCDeployStatus;
use strict;
use warnings;
our $VERSION = '1.0.0';
# Because VersionControlDeployment::retrieve sucks and doesn't let us filter on a given id
use Cpanel::VersionControl::Deployment::DB ();
import re
import sys
import argparse
parser = argparse.ArgumentParser(description="Format scenario updates")
parser.add_argument("filename", help="File containing unformatted scenario update")
parser.add_argument("players", metavar="player", default=[], nargs="*", help="Players to populate turn order")
parser.add_argument("--turn", "-t", type=int, default=0, help="Current turn")
parser.add_argument("--weapon", type=int, default=5, help="Number of random weapons generated (2-5)")
parser.add_argument("--armor", type=int, default=5, help="Number of random armors generated (2-5)")
@skizzerz
skizzerz / irc_log.json
Created September 9, 2021 21:12
ElasticSearch ingest pipeline for ZNC logs (via filebeat)
{
"irc_log" : {
"description" : "Pipeline for parsing ZNC logs.",
"processors" : [
{
"grok" : {
"field" : "log.file.path",
"patterns" : [
"/var/log/znc/%{DATA:host.user.name}/%{DATA:irc.server}/%{DATA:irc.channel}/%{DATEFMT:date1}.log"
],