Skip to content

Instantly share code, notes, and snippets.

View tullo-x86's full-sized avatar
🏳️‍⚧️
trans rights are human rights

Daniel Tullemans tullo-x86

🏳️‍⚧️
trans rights are human rights
View GitHub Profile
@tullo-x86
tullo-x86 / colorutils.h
Last active March 8, 2016 04:05
fill_gradient with palette support
// Fill an array of colors with a sixteen-stop gradient from a palette.
// Only suitable for really long fades where banding must be minimised.
template <typename T>
void fill_gradient( T* targetArray, uint16_t numLeds,
const CHSVPalette16& palette,
TGradientDirectionCode directionCode = SHORTEST_HUES )
{
uint16_t spanLength = (numLeds / 15);
for (uint8_t spanIdx = 0; spanIdx < 14; spanIdx++)
@tullo-x86
tullo-x86 / pre-commit.sh
Created June 15, 2015 17:19
"NOMASTER" Pre-commit hook
#!/bin/bash
echo 'PCH: Running pre-commit hook.'
git rev-parse --abbrev-ref HEAD | grep -qv 'master' && echo 'PCH: Aborting pre-commit hook; you are not on branch `master`.' && exit 0
FILES_PATTERN='\.(c|cpp|h)(\..+)?$'
FORBIDDEN=( 'NOMASTER' )
for i in "${FORBIDDEN[@]}"
do
@tullo-x86
tullo-x86 / keybase.md
Last active August 29, 2015 14:05
Keybase proof

Keybase proof

I hereby claim:

  • I am tullo-x86 on github.
  • I am tullo_x86 (https://keybase.io/tullo_x86) on keybase.
  • I have a public key whose fingerprint is 668A 573E B202 61A0 7C41 C7E0 D5FD 5D25 F7B0 F921

To claim this, I am signing this object: