Skip to content

Instantly share code, notes, and snippets.

@avilleret
avilleret / Burn_Caterina_Bootloader_to_ItsyBitsy
Last active May 2, 2019 04:00
How to burn caterina bootloader to Adafruit ItsyBitSy 32u4 5V 16M with Arduino as ISP
# Requirement :
- Arduino UNO
- blocked Adafruit ItsyBitsy
- some wiring cable
- avrdude
Tested on Archlinux with avrdude 6.3
1. upload Arduino as ISP sketch to an Arduino UNO
2. wire Arduino UNO to ItsyBitsy as follow :
@avilleret
avilleret / gist:a8a72f3ae09ff93d5bafded68a67deea
Created December 16, 2016 08:59 — forked from Manu343726/gist:ca0ceb224ea789415387
Running ARM docker image with QEMU on x86_64 Arch Linux host
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
@avilleret
avilleret / apa102_withGlobalBrightness.ino
Last active November 6, 2016 19:16
apa102_withGlobalBrightness
#include <FastLED.h>
template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = BGR, uint8_t SPI_SPEED = DATA_RATE_MHZ(24)>
class APA102Controller_WithBrightness : public CLEDController {
typedef SPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED> SPI;
SPI mSPI;
uint8_t bBaseValue;
void startBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); }
@avilleret
avilleret / backtrace
Created October 19, 2015 15:43
crash on scenario loading
(gdb) thread apply all bt
Thread 6 (Thread 0x7fffeda7b700 (LWP 13915)):
#0 0x00007ffff61a28dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007ffff174ab72 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007ffff174c64f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007fffef0b1629 in ?? () from /home/antoine/Qt/5.5/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#4 0x00007ffff6aad7df in ?? () from /home/antoine/Qt/5.5/gcc_64/lib/libQt5Core.so.5
#5 0x00007ffff567d6aa in start_thread (arg=0x7fffeda7b700) at pthread_create.c:333
#6 0x00007ffff61adeed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
@avilleret
avilleret / backtrace
Created April 28, 2015 19:13
GLSL attributes crashes
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0a54554 in ?? () from /usr/lib/nvidia-349/libnvidia-glcore.so.349.16
(gdb) thread apply all bt
Thread 1 (Thread 0x7ffff7fbb740 (LWP 7588)):
#0 0x00007ffff0a54554 in ?? () from /usr/lib/nvidia-349/libnvidia-glcore.so.349.16
#1 0x00007ffff313bcb6 in gemvertexbuffer::attribute (this=<optimized out>, s=<optimized out>, argc=<optimized out>,
argv=<optimized out>) at gemvertexbuffer.cpp:593
#2 0x000000000047353a in outlet_anything ()
#3 0x00000000004c6c82 in trigger_anything ()
@avilleret
avilleret / carsh.log
Created November 3, 2014 15:06
crash when clicking on a box while playing
antoine@antoine-DellXPS15z:~$ gdb i-score
GNU gdb (Ubuntu 7.8-1ubuntu4) 7.8.0.20141001-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@avilleret
avilleret / gdbbacktrace
Created October 29, 2014 10:21
gemvertexbuffer crashes on Intel after 2 rendering context creation when closing patch
Program received signal SIGSEGV, Segmentation fault.
0xffffffffffffffff in ?? ()
(gdb) thread apply all bt
Thread 7 (Thread 0x7fffd8223700 (LWP 17836)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fffdbd397d3 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#2 0x00007fffdbd39037 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#3 0x00007ffff739e0a5 in start_thread (arg=0x7fffd8223700) at pthread_create.c:309
#4 0x00007ffff6ec784d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
@avilleret
avilleret / gdb_backtrace
Created October 28, 2014 11:05
gemvertexbuffer : gdb backtrace
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) thread apply all bt
Thread 11 (Thread 0x7fffd5de3700 (LWP 15055)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007fffdbd647d3 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#2 0x00007fffdbd64037 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#3 0x00007ffff739e0a5 in start_thread (arg=0x7fffd5de3700) at pthread_create.c:309
#4 0x00007ffff6ec784d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
@avilleret
avilleret / mycobject.c
Created October 9, 2014 15:39
explore verbose() a little bit
/* code for "mycobject" pd class. This takes two messages: floating-point
numbers, and "rats", and just prints something out for each message. */
#include "m_pd.h"
/* the data structure for each copy of "mycobject". In this case we
on;y need pd's obligatory header (of type t_object). */
typedef struct mycobject
{
t_object x_ob;
@avilleret
avilleret / mycobject.c
Created September 23, 2014 15:09
demonstrate "loadbang" method error with A_CANT
/* code for "mycobject" pd class. This takes two messages: floating-point
numbers, and "rats", and just prints something out for each message. */
#include "m_pd.h"
/* the data structure for each copy of "mycobject". In this case we
on;y need pd's obligatory header (of type t_object). */
typedef struct mycobject
{
t_object x_ob;