Skip to content

Instantly share code, notes, and snippets.

View mqu's full-sized avatar
🏠
Working from home

Marc Quinton mqu

🏠
Working from home
  • DGAC / DSNA / DTI
  • Toulouse / France
View GitHub Profile
@mqu
mqu / 00-freebox-API-v2-help.txt
Last active December 19, 2015 02:49
API Freebox(OS), nouyelle génération (V2). L'API s'appuie sur REST, qui est l'un des standards, ce qui facilite bien les choses. Il s'agit d'un "draft", La couverture de l'API n'est que très partielle.
liens :
- http://dev.freebox.fr/sdk/os/#api-conventions.
- https://github.com/valentinconan/scriptDownloadFreeBoxV2/blob/master/scriptdownloadFreeBoxV2.sh
- http://forum.ubuntu-fr.org/viewtopic.php?id=448343&p=4
@mqu
mqu / asterix.fdesc
Last active December 27, 2015 14:09
very partial Asterix decoder for Wireshark, using WSGD generic decoder. This decoder is incomplete but can display header information for each Asterix packet (category, size, fspec). TODO : implement category decoding in details. Keywords : Asterix, WSGD, ATC, Wireshark, Eurocontrol, tcpdump, pcapdump, libpcap, pcap. Links: http://wsgd.free.fr/, h…
# ---------------------------------------------------------
#
# Wireshark dissector for Asterix format, using wsgd plugin
#
# ---------------------------------------------------------
# author : Marc Quinton / november 2013
#
# see : http://wsgd.free.fr/
#
@mqu
mqu / usb-auto-backup
Last active October 3, 2023 14:43
usb-auto-backup script - a script connected to UDEV daemon, running rsync backup when user insert USB drive.
TODO :
- manage user notification ; notify-send not really working ; current alternative either.
- display hostid used to customize usb backup script.
INSTALL
- copy usb-auto-backup script to /usr/local/bin,
- create an partition on an USB drive named "backup" ; get id (/dev/sddX) -> will be needed in udev.rules
- identity your drive information for UDEV-rules using : udevadm info -a -p $(udevadm info -q path -n /dev/sdXX)
- create an UDEV rule : /etc/udev/rules.d/99-usb-auto-backup.rules like this one :
@mqu
mqu / Blink.ino
Last active August 29, 2015 14:10
Arduino NANO blinking LED - object oriented version
@mqu
mqu / DHT22
Last active June 1, 2018 11:59
DHT22 for Arduino - All-In-One (standalone)
/******************************************************************
DHT Temperature & Humidity Sensor library for Arduino.
Features:
- Support for DHT11 and DHT22/AM2302/RHT03
- Auto detect sensor model
- Very low memory footprint
- Very small code
http://www.github.com/markruys/arduino-DHT
@mqu
mqu / arduino-serial.ino
Created March 31, 2015 05:21
simple ruby example to read and write bytes to Arduino serial port.
uint8_t c;
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(4800); // 8E2 : 8bits, 2 stops bits, even parity.
// Serial.begin(4800, SERIAL_8E2); // 8E2 : 8bits, 2 stops bits, even parity.
while (!Serial) {
@mqu
mqu / rvitalk.rb
Last active December 30, 2018 10:14
rvitalk : ruby P300 protocol implementation to handle IO to Viessmann heating systems - outdated : please have a look at : https://github.com/mqu/viessmann-mqtt/
#!/usr/bin/ruby
# encoding: utf-8
# author : Marc Quinton, april 2015
# name : rvitalk : ruby P300 protocol implementation to handle IO to Viessmann heating systems
# object : connect to a Viessmann heating system via Optolink adaptator to query internal values.
# version : 0.5 - added write mode for commands, P300 constants,
# requirements : ruby >= 2.1, ruby-serialport, a serial USB optolink adapter, a Viessman heating system.
# licence : MIT
# links : http://openv.wikispaces.com/vcontrold ; https://gist.github.com/mqu
/*
* Arduino Push button
* -------------------
*
* - connect push button to ground and digital pin 2
* - compile and upload program to your arduino,
* - open a terminal to display output : cat /dev/ttyUSB*
* - all times are in mili-seconds
*
*/
@mqu
mqu / ivy-example-01.rb
Last active August 29, 2015 14:22
ivy-ffi.rb - FFI implementation for IVY bus in Ruby language.
#!/usr/bin/ruby
$:.unshift( ".." )
require "ivy-ffi"
ivy = Ivy.initialize("ruby")
ivy.start( )
msg = ivy.bindmsg( "^quit$" ) { |app, msg|
@mqu
mqu / 00-readme.md
Last active November 16, 2015 07:46
an HIDAPI interface, using FFI, for Ruby language, to Delcom button.

Delcom-FFI library

this is delcom-ffi.rb, a library interface to Delcom button/light using HIDAPI based on FFI.

Using Delcom library - hight level fonctions

This library is build in an all-in-one file for easy of use. You can split it by class. This library is know to work with push-button light family, especialy modele 706562

initializing button object instance