Skip to content

Instantly share code, notes, and snippets.

@enkore
enkore / ratsbot.py
Last active August 29, 2015 14:04
ratsbot
#!/usr/bin/env python
import urllib.request
import xml.etree.ElementTree as ET
import irc.bot
import irc.strings
# PyPI: mde_bbcode
import bbcode
# -*- coding: utf-8 -*-
import sys
import json
import urllib.request
import time
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtQuick import *
class Dashboard(QObject):
@enkore
enkore / settings.h
Last active August 29, 2015 14:06
Qt utility macro for creating a proper QSettings hierarchy without hassle
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QSettings>
#include <QMap>
#include <QObject>
#include <QStringList>
extern QMap<QObject*, QSettings*> _settings_h_settings;
@enkore
enkore / X1000.md
Created April 9, 2012 20:17
RFC X1000

Specification Formatting Conventions

Misc - Workgroup: 0x10c Standards Committee

Authors

This draft provides guidelines on formatting draft specifications for submission to the 0x10c standards committee. It is designed to loosely correlate with the formatting of RFCs.

@enkore
enkore / X1005.md
Created April 10, 2012 09:35
X1005

String Format

Lib - Workgroup: 0x10c Standards Committee

Authors

This document presents a general format for strings in libraries intended to be shared across programs and with other users.

  • l1
  • l2
  • l3

sdsadasdsa dasdsadsa dsadasdsa 32sad

sdas32regdsf

_____ _____
/\ \ /\ \
/::\ \ /::\ \
/::::\ \ /::::\ \
/::::::\ \ /::::::\ \
/:::/\:::\ \ /:::/\:::\ \
/:::/__\:::\ \ /:::/ \:::\ \
\:::\ \:::\ \ /:::/ \:::\ \
___\:::\ \:::\ \ /:::/ / \:::\ \
/\ \:::\ \:::\ \ /:::/ / \:::\ \

RFC X1001 - Assembly Relocation Table

Asm - Workgroup: 0x10c Standards Committee

Authors

This draft provides a formal structure for providing an assembly relocation table from within DCPU-16 programs.

@enkore
enkore / 0xSCA.xml
Created April 17, 2012 12:39
0xSCA/Rationale
<section title="Design Rationale">
<section title="Labels">
<t>Although Notch used the syntax :label in his first
examples, it is not common in any popular assembler.
Thus we decided for label: as the recommended form,
still silently allowing the deprecated form.</t>
<t>To simplify writing reusable code we also introduced
local labels, which are only visible from within the
global label they are defined within. Implementing this
is easy to do and introduces little overhead, as nesting
@enkore
enkore / form.py
Created April 21, 2012 14:54
Generic AJAX forms in Django
class BasicDialogForm(object):
dialog = {
"title": _("NOT SET"),
"text": "",
"submit": {
"text": _("Save changes"),
"active": _("Saving..."),
"color": "btn-primary",
},
"id": "some-value",