Skip to content

Instantly share code, notes, and snippets.

@Oreolek
Oreolek / adventure.py
Created January 21, 2019 13:56
Plotex example
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from plotex3 import *
class Scenario(ScenarioClass):
Start = State(
money=0,
location='lobby',
costume='none'
@Oreolek
Oreolek / generate.php
Created November 27, 2018 15:22
generate mutant emoji CSS and HTML
<?php
function rglob ($pattern, $flags = 0, $traversePostOrder = false) {
// Keep away the hassles of the rest if we don't use the wildcard anyway
if (strpos($pattern, '/**/') === false) {
return glob($pattern, $flags);
}
$patternParts = explode('/**/', $pattern);
@Oreolek
Oreolek / footer.php
Created October 28, 2017 13:15
phpbb extension
@Oreolek
Oreolek / input.txt
Created May 12, 2017 06:24
log parser
Feb 10 19:02:17 mail sm-mta[31511]: v1AI2GTr031509: to=<Dalmer.Dalmer@mail.tester-club.com>, ctladdr=<www-data@mail.tester-club.com> (33/33), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=169116, relay=mxlb.ispgateway.de. [80.67.18.126], dsn=5.0.0, stat=Service unavailable
@Oreolek
Oreolek / test.py
Last active April 22, 2017 01:33
mwe plotex bug
#!/usr/bin/python3
from plotex3 import *
class Scenario(ScenarioClass):
Start = State(body=True)
#BecomeEthereal = Once(Lose('body')) # the line is commented out, there's no way to lose the quality
FindBody = Chain(Has(_body=False), Set(body=True))
KillEnemy = Chain(Has(_body=False), Set(killed=True)) # yet somehow plotex passes this action
@Oreolek
Oreolek / transcript.lua
Last active March 6, 2017 10:48
Transcript module for INSTEAD 3
local std = stead
local filename = "game.log"
function writelog(s)
local f = io.open(filename, "a")
f:seek("end", 0)
f:write("\n", s, "\n")
return f:flush()
end

Keybase proof

I hereby claim:

  • I am oreolek on github.
  • I am oreolek (https://keybase.io/oreolek) on keybase.
  • I have a public key ASARtD53Ax83ujr0sk-L33vaJ3YIQqS12DWJKhbUOw9aKgo

To claim this, I am signing this object:

@Oreolek
Oreolek / player.rb
Created April 17, 2014 02:43
Rubywarrior epic intermediate AI solution
class Player
def decide_direction
if (@warrior.listen.empty?) then
@direction = @warrior.direction_of_stairs;
return;
end;
@warrior.listen.each do |neighbour|
@direction = @warrior.direction_of(neighbour);
next if (@warrior.feel(@direction).stairs?);
if (@ticking > 0) then
@Oreolek
Oreolek / PKGBUILD
Created July 18, 2013 04:08
lessc 1.4.1 pkgbuild
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# updated for 1.4.1 by Oreolek
pkgname=lessc
pkgver=1.4.1
pkgrel=1
_commit=290376f4eb57d54fbcffec97e272f42f40bb04c0
pkgdesc="A standalone compiler for the LESS CSS language."
arch=('any')
url="http://lesscss.org/"
@Oreolek
Oreolek / Rakefile
Created December 21, 2012 04:00
Rakefile for VALA+SDL
LIBRARIES = ['sdl', 'sdl-ttf']
INPUT = 'main.vala'
OUTPUT = 'main'
task :default do
compile = 'valac'
LIBRARIES.each do |library|
compile += " --pkg #{library}"
end
compile += " --Xcc=-I/usr/include/SDL -o #{OUTPUT} #{INPUT}"