Skip to content

Instantly share code, notes, and snippets.

@malte-laukoetter
malte-laukoetter / RobinChatBot
Last active April 2, 2016 15:35
A chat bot for the reddit 1. April chat (it just sends the time that is left until the room ends and can send you your color and the current votes)
document.querySelector( '#robinChatMessageList' ).addEventListener( 'DOMSubtreeModified', function ( event ) {
var messages = event.target.querySelectorAll( '.robin-message' );
var lastMessage = messages[ messages.length - 1 ];
if ( lastMessage ) {
var author = lastMessage.querySelector( '.robin--username' );
var message = lastMessage.querySelector( '.robin-message--message' );
if ( message && message.innerHTML ) {
message_text = message.innerHTML.toLowerCase();

Keybase proof

I hereby claim:

  • I am malte-laukoetter on github.
  • I am lergin (https://keybase.io/lergin) on keybase.
  • I have a public key ASD0iLFzIu6XuTrb_L97XgOQZTFGAMK8XDrCuIuISLbzcwo

To claim this, I am signing this object:

actions {
pixelmon_throw= {
items = [
{
item = PokeBall
needLevel = 0
xp = 1
},
{
bonus {
ep=[
{
# actions that can award this bonus (BREAK, ENTITY_DAMAGE, ENTITY_KILL, ENTITY_TAME, ITEM_USE, PLACE)
actions=[
BREAK, ENTITY_KILL
]
# maximal amount of minecraft ep
maxEp=10
# maximum level the bonus is awarded at
@malte-laukoetter
malte-laukoetter / Server.ts
Created June 24, 2017 19:28
Hive Gold Medal Leaderboard
import {Player} from "hive-api" //a not jet really published node wrapper for the hive api
import * as admin from "firebase-admin"
const serviceAccount = require("../firebase_service_account.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://dashboard-196e4.firebaseio.com"
});
@malte-laukoetter
malte-laukoetter / calcGlobalLeaderboardPoints.js
Last active January 12, 2018 15:01
A bit of code to automate https://forum.hivemc.com/threads/global-leaderboard.294527/ just needs to be copied into the devtools console on https://hive.lergin.de/player and can then be called like calcGlobalLeaderboardPointsPlayer("name")
async function calcGlobalLeaderboardPoints(pl){
let allGamesTotalPoints = await Promise.all(hive.GameTypes.list.map(async gt => {
let lb = new hive.Leaderboard(gt)
await lb.load(980,1000);
let places = await lb.load(998,1000);
let points = (places.get(998).points + places.get(999).points) / 2;
@malte-laukoetter
malte-laukoetter / most_points_gained_leaderboards.js
Last active January 25, 2018 14:35
calculates the 20 players that have gained the most points on the currently viewed leaderboard on https://hive.lergin.de/leaderboards when executed in the devtools console
var lead = document.querySelector("my-app").shadowRoot.querySelector("hive-gamemode-leaderboards");
var prop = gameModeConfigs[lead.gamemode].leaderboard[0].key;
var collection = firebase.default.firestore().collection("gameLeaderboards").doc(lead.gamemode).collection("data");
var changeDate = new Date(lead.date);
var changeAmount = lead.timeForChanges.split('_')[1]
switch (lead.timeForChanges.split('_')[0]) {
case "day":
changeDate.setDate(changeDate.getDate() - changeAmount);
break;
@malte-laukoetter
malte-laukoetter / pwned 6 digit passwords.log.txt
Created March 2, 2018 14:29
Output of a small programm i used to figure out how many of all possible 6 digit passwords are in https://haveibeenpwned.com/Passwords
searched 000028043 found 0001000/1000000 (000.1000% found) (Breaches total :0050556748 avg: 50556.7480
searched 000035811 found 0002000/1000000 (000.2000% found) (Breaches total :0054899318 avg: 27449.6590
searched 000042044 found 0003000/1000000 (000.3000% found) (Breaches total :0058671983 avg: 19557.3277
searched 000048384 found 0004000/1000000 (000.4000% found) (Breaches total :0062068387 avg: 15517.0968
searched 000054957 found 0005000/1000000 (000.5000% found) (Breaches total :0065147546 avg: 13029.5092
searched 000061788 found 0006000/1000000 (000.6000% found) (Breaches total :0067942343 avg: 11323.7238
searched 000068902 found 0007000/1000000 (000.7000% found) (Breaches total :0070491649 avg: 10070.2356
searched 000076857 found 0008000/1000000 (000.8000% found) (Breaches total :0072819373 avg: 09102.4216
searched 000085273 found 0009000/1000000 (000.9000% found) (Breaches total :0074940088 avg: 08326.6764
searched 000093385 found 0010000/1000000 (001.0000% found) (Breaches total :0076882737 avg: 07688
@malte-laukoetter
malte-laukoetter / freezone.js
Last active April 15, 2018 16:05
Finder für freie 100*100 Zonen auf unlimitedworld
const UwmcTools = require('uwmctools');
let uwmcTool = new UwmcTools();
// get all free zones of an area greater than 100*100 blocks
let length = 100;
let width = 100;
uwmcTool.getFreeZones(length, width).then(function(res){
console.log(res);
import { GameType, Player, PlayerGameInfo, GameTypes, GntmPlayerGameInfo } from "../node_modules/hive-api";
declare let config: any
declare let logging: any
declare let embed: any
//Stats comparison formatting function
//This is what makes sure the stats are
//laid out as evenly as possible