Skip to content

Instantly share code, notes, and snippets.

View NetzwergX's full-sized avatar

Sebastian Teumert NetzwergX

View GitHub Profile
@NetzwergX
NetzwergX / .gitattributes
Last active April 24, 2018 13:12
My .gitignore for Java projects
# ignore tests
tests/ export-ignore
@NetzwergX
NetzwergX / com.jme3.terrain.util.HeightBasedAlphaMapGenerator.java
Last active November 24, 2016 14:26
Heightmap based alpha map generator for jME3
/*
* Copyright (c) 2009-2016 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@NetzwergX
NetzwergX / git-sync.sh
Created May 5, 2012 17:17
Ever needed to keep your forks in sync with their origin? This will help you for your GIT repositories.
#!/bin/sh
#
# GIT Repository update script by Sebastian Teumert
#
# Stashes local changes, checks out specified branch, pulls branch from origin
# and pushes to upstream.
#
# Used to keep forks synced with their origin
#
# When no argument is specified, this script works in pwd, works on the 'master'-
@NetzwergX
NetzwergX / wcf-sync.sh
Created May 10, 2012 13:03
Pushes contents of WCF repositories to live install
#!/bin/bash
for dir in ~/git/com.woltlab.wcf.*/
do
test -e ${dir}files && cp -r -s --remove-destination ${dir}files/* ./wcf/
test -e ${dir}templates && cp -r -s --remove-destination ${dir}templates/* ./wcf/templates/
test -e ${dir}acptemplates && cp -r -s --remove-destination ${dir}acptemplates/* ./wcf/acp/templates/
done
wcffiles="~/git/WCF/wcfsetup/install/files/"
@NetzwergX
NetzwergX / wmake.sh
Last active December 16, 2015 18:19
Build script for WoltLab Community Framework (WCF) packages Automagically builds packages that obey the standard package structure.
#!/bin/bash
#
# Build script for WoltLab Community Framework (WCF) packages
# by Sebastian Teumert (http://www.teumert.net, http://github.com/NetzwergX)
# clear
if ls *.tar > /dev/null 2>&1
then
rm *.tar
fi
@NetzwergX
NetzwergX / extend-bug.css
Last active December 26, 2015 15:29
LESS :extend Bug
.var {
text-align: right;
}
.foo {
content: "a";
}
.foo:before {
color: green;
}
.foo:before {
@NetzwergX
NetzwergX / net\teumert\swt\ImageButton.java
Created November 17, 2014 12:04
Portable SWT ImageButton
/*
* Copyright (c) 2014 Sebastian Teumert (<http://teumert.net>)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
/*
* written by Sebastian Teumert in 2016.
* Released into Public Domain. No Rights Reserved.
*/
#include "stdafx.h"
#include <string>
#include<map>
#include<vector>
@NetzwergX
NetzwergX / CoordinateUtil.java
Created August 26, 2016 18:27
Simple utility for jme3 to convert cartesian to spherical coordinates and vice-versa
/*
* Copyright (c) 2016 Sebastian Teumert (<http://teumert.net>)
*
* 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:
*
@NetzwergX
NetzwergX / .JavaFX Table|ListCell Formatters.md
Last active November 12, 2020 10:58
Various JavaFX Table/ListCell implementations with support for custom formatters

This Gist contains a few of the TableCell and ListCells with factories I have written for JavaFX.

DatePickerTableCell

column.setCellFactory(
  column -> new DatePickerTableCell<Person>(
    DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)));