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
#!/usr/bin/python | |
# I recommend that you install it and run it: | |
# $ sudo cp init_cmake.py /usr/bin | |
# $ init_cmake | |
import os | |
print("Initialise CMAKE by rubenwardy") |
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
# | |
# Written by rubenwardy | |
# License: WTFPL | |
# | |
# $ ruby calc.rb | |
# | |
# Turns a string such as "( 0 - (6) + ( 6 ^ 2 - 4 * 1 * 5 ) ^ (1 / 2) ) / ( 2 * 1)" | |
# into a binary syntax tree, and then into Reverse Polish Notation, and then executes it. | |
# | |
# String is typed in the terminal during program execution |
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
-- HudKit, by rubenwardy | |
-- License: Either WTFPL or CC0, you can choose. | |
local function hudkit() | |
return { | |
players = {}, | |
add = function(self, player, id, def) | |
local name = player:get_player_name() | |
local elements = self.players[name] |
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
# | |
# This batch file is specific to Linux. | |
# (the for, mkdir, rm etc commands may be done differently on your OS. | |
# the convert commands should be the same though) | |
# | |
rm /tmp/imageex -r | |
mkdir /tmp/imageex | |
for filename in *.png; do | |
echo "Processing $filename" |
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
#!/usr/bin/python3 | |
# list all servers and their points: | |
# $ python mt_serverlist_points.py | |
# | |
# lists all penalties being applied: | |
# $ python mt_serverlist_points.py pen | |
# | |
# penalty -8 uptime for VanessaE's Nostalgia Server/digitalaudioconcepts.com | |
# penalty -8 uptime for VanessaE's Basic minetest_game server/digitalaudioconcepts.com |
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
var assert = require("assert"); | |
class Result { | |
constructor(n, seq, score) { | |
this.n = n; | |
this.seq = seq; | |
this.score = score; | |
} | |
betterThan(other) { |
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
class MatrixRes { | |
constructor(rows, cols) { | |
this.rows = rows; | |
this.cols = cols; | |
} | |
sizeAfterMultiplyWith(other) { | |
assert(this.canMultiplyWith(other)); | |
return new MatrixRes(this.rows, other.cols); | |
} |
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
PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs | |
get_git_as() { | |
if info=$(git diff --shortstat); then | |
echo $info | |
fi | |
} | |
__prompt_command() { |
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
Meeting 12/Aug/2017 |
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 wrapRegisterCall(name, func) | |
for key, v in pairs(minetest["registered_" .. name .. "s"]) do | |
func(key, v) | |
end | |
local old = minetest["register_" .. name] | |
minetest["register_" .. name] = function(name, def) | |
func(name, def) | |
old(name, def) | |
end |