Skip to content

Instantly share code, notes, and snippets.

View bmarwell's full-sized avatar

Benjamin Marwell bmarwell

View GitHub Profile
@bmarwell
bmarwell / Minecraft Log Lexer for Python Pygments
Created October 16, 2014 11:04
Use like this: 'zcat /opt/mcserver/bin/spigot/logs/2014-10-15-1.log.gz | tail -n 200 | pygmentize -l log' or just 'pygmentize /opt/mcserver/bin/spigot/logs/latest.log'.
from pygments.lexer import RegexLexer, bygroups
from pygments.token import *
__all__ = [ 'LogLexer' ]
class LogLexer(RegexLexer):
"""
Lexer for (minecraft) Log files.
"""
@vlastikcz
vlastikcz / StringJoiner (JDK 1.8)
Last active December 12, 2019 18:28
IntelliJ Idea - toString() template w/ StringJoiner
public java.lang.String toString() {
return new StringJoiner(", ", "$class.name{", "}")
#set($i = 0)
#foreach($member in $members)
#if(!$member.modifierStatic)
#if($member.primitiveArray || $member.objectArray)
.add("$member.name=" + java.util.Arrays.toString($member.name))
#elseif ($member.string)
.add("$member.name='" + $member.accessor + "'")
#else
@NickSeagull
NickSeagull / ubuntu-bloat-removal.sh
Last active November 6, 2024 16:38
Updated Jan 22nd, 2024 - Simple command to remove all "bloatware" from ubuntu
sudo apt-get remove \
aisleriot \
brltty \
duplicity \
empathy \
empathy-common \
example-content \
gnome-accessibility-themes \
gnome-contacts \
gnome-mahjongg \