Skip to content

Instantly share code, notes, and snippets.

View PRGfx's full-sized avatar

M. Klatte PRGfx

  • Karlsruhe, Germany
View GitHub Profile
@PRGfx
PRGfx / i18next-init.js
Created January 10, 2020 15:14
i18next - change the language of the HTML element when the language changes
const changeHtmlLanguage = {
type: '3rdParty',
init: i18n => {
i18n.on('languageChanged', l => document.documentElement.lang = l);
},
};
// example usage
i18n
.use(LanguageDetector)
@PRGfx
PRGfx / kickstart-neos-ui-plugin.sh
Created November 23, 2018 13:07
Create all files for starting a new Neos React-UI plugin. To be executed from within your package's Resources/Private folder
#!/usr/bin/env bash
if [[ ${PWD##*/} != "Private" ]]; then
echo "You don't seem to be in a private resources folder"
exit 1
fi
neospackage=$(basename $(pwd | grep -oP '([A-Z].*\.[A-Z].*)(?=/Resources)'))
read -p "name the package [$(echo $neospackage|cut -d'.' -f2)]: " packagename
if [[ -z "$packagename" ]]; then
packagename=$(echo $neospackage|cut -d'.' -f2)
fi
@PRGfx
PRGfx / GL.Script.txt
Last active February 18, 2018 11:32
ManiaPlanet ManiaScript editor rendering pipeline for rendering vertices as blocks
#RequireContext CMapEditorPlugin
#Include "MathLib" as MathLib
/**
* yield after placing S_RenderingSteps blocks to avoid consuming to many resources
*/
#Setting S_RenderingSteps 5000 as "Rendering Steps"
/**
* A block is on a plane if it is S_PlaneDistanceLeeway away from said plane
*/