This file contains 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 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 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 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
minetest.register_chatcommand("l", { | |
params = "lua code", | |
description = "Run lua code", | |
func = function(name, param) | |
f = loadstring("minetest.chat_send_player(\"" .. name .. "\", \"Result: \" .. dump("..param.."))") | |
f() | |
end | |
}) |
This file contains 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
# Based on http://linuxclues.blogspot.co.uk/2011/03/simple-python-irc-bot.html | |
# Requires https://gist.github.com/rubenwardy/4cb29fedb7952e5a4cdf | |
import socket | |
import re | |
import os | |
from noob_gen import * | |
import time | |
class Bot(): |
This file contains 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
# Python Noob Generator by rubenwardy | |
# License: WTFPL | |
# See IRC bot using this: https://gist.github.com/rubenwardy/8863c20a75e4faad3562 | |
# Example: | |
### a random team mate shot your mum also dat enemy scouted a | |
### random gun and a random gun covered a random gun but also your | |
### mum nuked dat arsehole also a random thingy ran it like a arsehole blew up a kid | |
This file contains 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
/* | |
Made this script to automatically open a web page in the correct browser. | |
I use multiple browsers at the same time, so I don't want to keep changing my file associations. | |
(Firefox used to have association, so if I am creating a game in Chrome and open a link in IRC, | |
firefox is opened. With this, it will be chrome because it is the only one open) | |
It priorities Firefox over Chrome, but you can change that. | |
(I use Firefox for browsing, Chrome for HTML5 games. | |
I use both of these and IE for web site development). | |
This file contains 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
_=minetest;h={"get_objects_inside_radius","get_player_name","set_hp","get_hp","remove_node"};_.register_node("t:s",{});_.register_abm({nodenames={"t:s"},interval=0.2,chance=1,action=function(p) local o=_.env[h[1]](_.env,p,2);for k,b in pairs(o) do if b and b[h[2]] and b[h[2]](b)~=nil then b[h[3]](b,b[h[4]](b)-30); for d=-5,5 do for c=-5,5 do for a=-5,5 do if d*d+c*c+a*a<=30 then _.env[h[5]](_.env,{x=p.x+d,y=p.y+c,z=p.z+a}) end end end end _.env[h[5]](_.env,p);break; end end end }) |
This file contains 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
REM To set up, create a text file called users.txt | |
REM in the same directory as this batch file | |
REM with this content (without the REM) | |
REM 1,user1,password,staff | |
REM 2,user2,password,pupil | |
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
GOTO main | |
This file contains 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
-- OS MAP READER | |
-- by rubenwardy | |
-- incomplete | |
-- CC BY SA | |
-- ================= | |
osmapgen = { | |
_api = "http://maps.googleapis.com/maps/api/elevation/json?", | |
url = {}, | |
data = {} |