Skip to content

Instantly share code, notes, and snippets.

View DeathTickle's full-sized avatar

Léopold Delouche DeathTickle

View GitHub Profile
{
"name": "Bob",
"age": 5,
"family": ["Fred", "Maria"]
}
@DeathTickle
DeathTickle / docker issues
Created September 14, 2016 08:24
Interesting Docker issues
- build multiple docker images from same context
- instant docker stats command
- run a command from a stopped container
- change container configuration
- convert filesystem permissions
@DeathTickle
DeathTickle / mq_open_test.c
Created August 11, 2016 15:04
Simple program to test creating a message queue with all permissions set
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h> /* For O_* constants */
#include <sys/stat.h> /* For mode constants */
#include <mqueue.h>
#define QUEUE_NAME "/my-mqueue"
#define QUEUE_SIZE 128
#define QUEUE_MSG_SIZE 64
@DeathTickle
DeathTickle / trf796xa.c
Created January 27, 2016 20:01
Functions used for CC2650 with TI-RTOS to read a TI tag UID with the TRF7960A reader
void Trf796xTurnRfOn(void) {
Trf796xWriteSingle(CHIP_STATE_CONTROL, 0x20);
}
void Trf796xConfigureIsoProtocol(void) {
uint8_t txbuf[11];
txbuf[0] = 0x02; // ISO_CONTROL reg: ISO15693 high bit rate, one subcarrier, 1 out of 4
txbuf[1] = 0x00; // ISO_14443B_OPTIONS
txbuf[2] = 0x00; // ISO_14443A_OPTIONS
txbuf[3] = 0xC1; // TX_TIMER_EPC_HIGH: timer start condition, end of SOF