- test_exp_drain
- test_foolpotion
- test_mistletoe_okay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ./eressea -v0 -t 858 shipinfo.lua > ships.txt | |
require 'config' | |
eressea.read_game(get_turn() .. ".dat") | |
for r in regions() do | |
for s in r.ships do | |
if s.info:len()>120 then | |
print(s.id, s.info) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ./eressea -v0 -t 1001 shipfix.lua | |
require 'config' | |
infos = {} | |
for line in io.lines("ships.txt") do | |
id = string.match(line, "^(%d+)%s*") | |
info = line:sub(id:len()+2) | |
infos[tonumber(id)] = info | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function curse(r) | |
if not r:get_flag("rain") then | |
msg = message.create("rain") | |
msg:set_region("region", r) | |
msg:send_region(r) | |
r:set_flag("rain") | |
end | |
end | |
function rain.update(id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am ennorehling on github. | |
* I am ennorehling (https://keybase.io/ennorehling) on keybase. | |
* I have a public key whose fingerprint is 896F F20D 7F47 3AC0 2997 FC24 2270 9561 3871 3193 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <gnu/libc-version.h> | |
int main(void) { | |
char *endp; | |
char *str = strdup("id"); | |
double ld; | |
puts (gnu_get_libc_version ()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
logo=" | |
$(tput setaf 2).~~. .~~.$(tput sgr0) | |
$(tput setaf 2)'. \ ' ' / .'$(tput sgr0) | |
$(tput setaf 1).~ .~~~..~.$(tput sgr0) _ _ | |
$(tput setaf 1): .~.'~'.~. :$(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_| | |
$(tput setaf 1)~ ( ) ( ) ~$(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | | | |
$(tput setaf 1)( : '~'.~.'~' : )$(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_| | |
$(tput setaf 1)~ .~ ( ) ~. ~$(tput sgr0) |_| |___| |_| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void hex_encode(unsigned char * in, size_t inlen, char * out) { | |
size_t i; | |
for (i=0;i!=inlen;++i, out+=2) { | |
sprintf(out, "%02x", in[i]); | |
} | |
} | |
char digest[16] = "some_random_data"; | |
char buffer[64]; | |
hex_encode(digest, sizeof(digest), buffer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
str() { | |
foo() { | |
echo "fourty-two" | |
} | |
} | |
int() { | |
foo() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function new_faction(email, race, lang, r) | |
f = faction.create(email, race, lang) | |
u = unit.create(f, r, 10) | |
u:add_item("log", 5); | |
u:add_item("horse", 2); | |
u:add_item("silver", 1000); | |
u:add_item("adamantium", 1); | |
end | |
function get_homes(f) |