Skip to content

Instantly share code, notes, and snippets.

View literalplus's full-sized avatar
🍍

Philipp Nowak literalplus

🍍
View GitHub Profile
@literalplus
literalplus / After.java
Last active August 29, 2015 14:10
Something I made with bitmasks. Sorry for the title. Feel free to use `After.java` and `ConventionalChestHelperTest.java` under the terms of the [MIT license](http://opensource.org/licenses/MIT). I'd appreciate if you credit me.
/**
* Calculates loot for clicking conventional chests.
*
* @author <a href="http://xxyy.github.io/">xxyy</a>
* @since 02/12/14
*/
public final class ConventionalChestHelper {
public static final String CHEST_NUMBER_METADATA = "chests_collected"; //Store metadata key as constant to avoid being deprecated by Bukkit
private ConventionalChestHelper() {
@literalplus
literalplus / CommandHelpBuilder.java
Last active December 28, 2015 00:13
Dirty help builder for OvercastNetwork/sk89q-command-framework using mkremins/fanciful
package me.sebi7224.minoduel;
import com.sk89q.minecraft.util.commands.CommandsManager;
import com.sk89q.minecraft.util.commands.NestedCommand;
import mkremins.fanciful.FancyMessage;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@literalplus
literalplus / build.sh
Created January 6, 2016 00:57
Random PHP "build" script
#!/bin/sh
if [ "$GIT_COMMIT" == "" ]; then
GIT_COMMIT="unknown"
fi
if [ ! -f data/config.php ]; then
cp data/config.php.example data/config.php
echo "Copied default config to data/config.php!"
fi
@literalplus
literalplus / xmpp-otr-fingerprints.txt
Last active October 29, 2016 21:24
Signed confirmation of my XMPP Off-The-Record Fingerprints (GPG key verification: https://keybase.io/literallie)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
These are in fact my XMPP Off-The-Record fingerprints:
literallie@dukgo.com/toaster:
57ECD606 727AF0A6 BB7E667D 48110DE2 72759DB3
literalliq@dukgo.com/dogephone:
BEDC168E 3F294047 ADD81E64 651FE1D6 55C65C11
@literalplus
literalplus / screenwrap-open.sh
Created November 15, 2016 08:55
A thin wrapper around gnome-screenshot that allows to open the created screenshot in a given application
#!/bin/bash
# MIT License
#
# screenwrap-open.sh
# Copyright (c) 2016 Philipp Nowak
#
# 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
@literalplus
literalplus / 00_DEMO.md
Last active June 28, 2017 06:51
This is a scrolling chart with random fake net usage data. In Production, this will be linked to real data. This is intended for the Zimon Project: https://github.com/realzimon/ng-zimon
@literalplus
literalplus / 00_Spigotctl
Last active September 1, 2017 19:27
Spigotctl, control 'framework' for Spigot servers running in RemoteToolkit in Tmux.
MIT License
Copyright (c) 2016 - 2017 Philipp Nowak
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 the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@literalplus
literalplus / 00_Install Graphite on Debian 8 (partial guide).md
Last active October 6, 2017 00:10
Information I collected from the web on how to install a working Graphite Stack (Whisper, Carbon, Graphite-Web, Grafana, Statsd) on Debian 8. Most info is partial because every install resulted in unexplicable errors that needed to be fixed individually. Take care.
@literalplus
literalplus / 0_tomcat.conf
Last active January 15, 2018 00:25
A Jenkins,Artifactory/Nginx reverse proxy setup (is work, no touchy)
# /etc/nginx/sites-available/tomcat.conf
server {
include snippets/listen_both_le.conf;
include snippets/cert_l1t.conf;
server_name ci.l1t.li;
location / {
include snippets/proxy-header.conf;
@literalplus
literalplus / chi-ext-a4.tex
Created January 11, 2018 10:41
A4 margins for the Chi-Ext LaTeX template - this keeps the page margins the same (to about 2mm accuracy) as the original template has for the US Letter paper size
% Note the a4paper - patch start (line 33, cbhi-ext.cls)
\LoadClass[10pt,a4paper,landscape]{article}[1996/10/31]
% -----------------------------------------------------------------------------
% Set paper and margin sizes
% Original freedom margins and sizes
% \setlength{\paperheight}{8.5in}
% \setlength{\paperwidth}{11in}