Skip to content

Instantly share code, notes, and snippets.

View NobodysNightmare's full-sized avatar

Jan Sandbrink NobodysNightmare

  • Berlin, Germany
View GitHub Profile
@NobodysNightmare
NobodysNightmare / 01-spec.md
Last active May 11, 2018 20:05
Equal entitlement powerbank sharing (EEPS)

Equal entitlement powerbank sharing (EEPS)

Status of this specification: DRAFT

Abstract

The equal entitlement powerbank sharing (EEPS) is an algorithm that allows multiple players to share the power of a single room in the online game Screeps.

It has the following properties:

// from https://blog.golang.org/defer-panic-and-recover
func c() (i int) {
defer func() { i++ }()
return 1
}
@NobodysNightmare
NobodysNightmare / references-subquery.rb
Last active February 3, 2016 07:55
Reproduction Testcase for missing expansion of :references inside a subquery
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@NobodysNightmare
NobodysNightmare / Hiding problem.cs
Last active December 18, 2015 11:29
Demonstrates the problem in using the "new" keyword
class Unchangable
{
public void Foo()
{
Console.WriteLine("Foo");
}
}
class A : Unchangable
{
11:44:56 [INFO] [Multiverse-Core] [Multiverse-Core] Multiverse-Core Version: 2.2-AB
>
11:44:56 [INFO] [Multiverse-Core] [Multiverse-Core] Bukkit Version: git-Bukkit-1.0.1-R1-79-g241b6f1-b1772jnks (MC: 1.1)
>
11:44:56 [INFO] [Multiverse-Core] [Multiverse-Core] Loaded Worlds: 7
>
11:44:56 [INFO] [Multiverse-Core] [Multiverse-Core] Multiverse Plugins Loaded: 2
>
11:44:56 [INFO] [Multiverse-Core] [Multiverse-Core] Economy being used: Simple Item Economy
>
@NobodysNightmare
NobodysNightmare / gist:1675799
Created January 25, 2012 10:51
MVSP startup log
174 recipes
27 achievements
>
22:49:50 [INFO] Starting minecraft server version 1.1
>
22:49:50 [INFO] Loading properties
>
22:49:50 [INFO] Starting Minecraft server on 78.143.57.47:25565
>
22:49:50 [INFO] This server is running Craftbukkit version git-Bukkit-1.0.1-R1-79-g241b6f1-b1772jnks (MC: 1.1) (Implementing API version 1.1-R1-SNAPSHOT)
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/ontologies/2011/11/Ontology1324312786114.owl> .
:Person a owl:Class .
:hasFamilyMember a owl:SymmetricProperty ;
@NobodysNightmare
NobodysNightmare / gist:1471322
Created December 13, 2011 09:09
SemWeb Ü8A1
a)
I_s = hpi:Person -> hPer
hpi:LangsamerVT -> hLVT
hpi:Autophobiker -> hAP
hpi:Gustav -> hGus
hpi:fährt -> hFähr
hpi:Fahrzeug -> hFZ
hpi:Fahrrad -> hFR
hpi:hatBauteil -> hHBT
hpi:hatOptionalesBauteil -> hHOBT
@NobodysNightmare
NobodysNightmare / gist:1345283
Created November 7, 2011 15:30
ANTLR TDL-Grammar
grammar TDL;
specification
: WS? (protocolDefinition | messageDefinition | structDefinition)*;
protocolDefinition
:
'protocol' WS identifier WS? '=' WS? 'ID' WS number
WS? '{'
WS? protocolElement*
@NobodysNightmare
NobodysNightmare / example.apib
Created January 20, 2015 09:19
Shortened spec
FORMAT: 1A
# OpenProject API v3
# Group General
This is the current **DRAFT** of the specification for OpenProject APIv3.
Please note that everything in this document might be **subject to change** in a future version of OpenProject. We intend to keep this specification
as accurate as possible, however as long as the APIv3 is not in a stable state it is possible that there are intermediary differences between