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 / 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:

@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 / 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 / Pattern.h
Created August 23, 2015 17:04
Pattern framework for FastLED
/*
* Pattern.h
*
* Created on: 7 Jan 2015
* Author: tully
*/
#ifndef PATTERN_PATTERN_H_
#define PATTERN_PATTERN_H_
@tullo-x86
tullo-x86 / MPR121+FastLED.cpp
Last active July 4, 2016 07:14
How to make MPR121 play with FastLED
Adafruit_MPR121 _cap;
uint16_t _currButtonState;
uint16_t _lastButtonState;
bool isPressed(int button) {
uint16_t bitmask = 1 << button;
return !(_lastButtonState & bitmask) && (_currButtonState & bitmask);
}
@tullo-x86
tullo-x86 / build-output.txt
Last active April 12, 2017 19:34
Slic3r build failure on new Fedora 25 install
[tully@localhost ~]$ sudo dnf install git curl gcc-c++ boost-devel perl-Wx \
> perl-Module-Build perl-App-cpanminus perl-Moo \
> perl-Math-PlanePath perl-Boost-Geometry-Utils \
> perl-Math-ConvexHull perl-Math-Geometry-Voronoi perl-parent \
> perl-Growl-GNTP perl-Class-XSAccessor perl-XML-SAX-ExpatXS \
> perl-Math-ConvexHull-MonotoneChain perl-ExtUtils-XSpp \
> perl-ExtUtils-CppGuess perl-ExtUtils-Typemaps-Default \
> perl-Capture-Tiny perl-Test-Base perl-Test-Differences \
> perl-Text-Diff perl-Module-Build-WithXSpp /usr/bin/cpan
@tullo-x86
tullo-x86 / gist:4c195dbef88c21a49aae064da70480c0
Created April 13, 2017 19:01
CPAN output - F25 fresh install
[tully@localhost ~]$ sudo cpan
[sudo] password for tully:
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes]
@tullo-x86
tullo-x86 / gist:a43ec5003f7d42fa280c4c4d80cf6778
Created April 13, 2017 22:09
`perl Build.PL --gui` output
[tully@localhost Slic3r]$ perl Build.PL --gui
App::cpanminus is up to date. (1.7043)
Class::Accessor is up to date. (0.34)
Growl::GNTP is up to date. (0.21)
--> Working on LWP::UserAgent
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/libwww-perl-6.26.tar.gz ... OK
Configuring libwww-perl-6.26 ... OK
==> Found dependencies: Test::RequiresInternet, HTTP::Daemon
--> Working on Test::RequiresInternet
Fetching http://www.cpan.org/authors/id/M/MA/MALLEN/Test-RequiresInternet-0.05.tar.gz ... OK
#!/bin/bash
DEVICE=$1
FILE=$2
# Save image to file
echo "Pulling data from SD card..."
cat $DEVICE > $FILE
#!/usr/bin/pwsh
param(
# Specifies a path to an assembly file, or directory of assembly files.
[Parameter( Mandatory = $false,
Position = 0,
ValueFromPipeline = $true,
ValueFromPipelineByPropertyName = $true,
HelpMessage = "Path to the assemblies to load")]
[Alias("AsmPath")]