Skip to content

Instantly share code, notes, and snippets.

@leMaik
leMaik / supportcenter.py
Last active May 21, 2024 19:06
Support Center module for willie.
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2013 Craften.de Team
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@leMaik
leMaik / conv-banlist-dokuwiki.py
Last active December 25, 2015 21:09
Converter for Minecraft server ban-lists. Just put the banned-players.txt as argument and this script will convert it into a beautiful table for use in DokuWiki. Licensed under the WTFPL, so do what the f... you want to do! :-)
"""
A converter for Minecraft server ban-lists. It will convert the ugly
banned-players.txt into a beautiful table for use in DokuWiki.
Copyright (c) 2013 Maik Marschner
This program is free software; you can redistribute it and/or
modify it under the terms of the Do What The Fuck You Want To
Public License, Version 2, as published by Sam Hocevar. See
http://www.wtfpl.net/txt/copying/ for more details.
@leMaik
leMaik / CryptedTextAnimation.cs
Last active December 29, 2015 04:59
A tiny class to make strange crypted animated text as you know it from Minecraft. Sounds useless? It is useless! :D
using System;
using System.Text;
using System.Windows;
using System.Windows.Media.Animation;
namespace leMaik.Animations {
class CryptedTextAnimation : AnimationTimeline {
static CryptedTextAnimation() {
LengthProperty = DependencyProperty.Register("Length", typeof(int), typeof(CryptedTextAnimation));
}
@leMaik
leMaik / SnackbarProvider.js
Last active December 20, 2016 16:26
A convenient way to use Material-UI's Snackbar.
import React, { Component, PropTypes } from 'react'
import Snackbar from 'material-ui/Snackbar'
export default class SnackbarProvider extends Component {
constructor (props) {
super(props)
this.state = {
message: null,
open: false
}
@leMaik
leMaik / patchTheme.js
Last active August 20, 2019 13:26
A theme patch function for Material-UI v3 that adds a spacing helper function like in Material-UI v4 but keeps theme.spacing.unit intact.
/**
* Add a Material-UI v4-like spacing helper to the theme.
* @param {object} theme Material-UI v3 theme
* @returns Material-UI v3 theme with the spacing helper function added
*/
function patchTheme(theme) {
const { unit } = theme.spacing;
const spacing = (...args) => args.map(factor => `${factor * unit}px`).join(' '); // spacing helper like in Material-UI v4
spacing.unit = unit; // spacing like in Material-UI v3
return {
@leMaik
leMaik / README.md
Last active August 29, 2023 21:41
Generate Chunky models

This generator helps with generating Chunky models from JSON models.

It doesn't support rotation yet but handles UV mapping pretty well. It also doesn't generate full classes but just some snippets (models, textures) instead.

Usage

node generate-quads.js path-to-some-model.json > some-model.java