Skip to content

Instantly share code, notes, and snippets.

View ClemRz's full-sized avatar
💰
Doing cool stuff for fintech industry

Clément Ronzon ClemRz

💰
Doing cool stuff for fintech industry
View GitHub Profile
@ClemRz
ClemRz / readme.md
Last active February 23, 2017 00:02
My solutions to Advent Of Code 2015 puzzles

Advent of Code - challenge 2015

@ClemRz
ClemRz / readme.md
Last active March 16, 2017 16:32
My solutions for the 1st Nearsoft Code Challenge puzzles

Ible Sort

This Gist shows how to quickly sort the Instructables entries in a contest.

How to

First you need to know the Contest ID. Follow the steps:

  • Open the developper tools of your browser and navigate to the contest page
  • in the network tab search for getContestEntries.json
@ClemRz
ClemRz / readme.md
Last active May 11, 2017 15:15
This is how you convert GPX files (or any other file) to fit for the Navilink software / Locosys BGT-31 GPS.

Convert GPS files for Navilink (Locosys BGT-31 GPS)

This is how you convert GPX files (or any other file) to fit for the Navilink software / Locosys BGT-31 GPS.

Convert a GPX file to a waypoint file (OziExplorer format: wpt)

Install GPSBabel then run the following in your terminal:

gpsbabel -i gpx -f your-input-file-name.gpx -o ozi -F your-waypoint-file-name
@ClemRz
ClemRz / readme.md
Last active May 11, 2017 15:24
This is how you synchronise your photos with a GPS track in order to geoloc them

How to synchronise your photos with a GPS track

Install ExifTool and run the following in a terminal:

exiftool -geotag="/path/to/your/GPS/track.kml" -geosync=7:00:00 /path/to/your/photos/folder

The geosync parameter is used when your GPS track is not in the same timezone as your photos. In the above example the GPS track is in the UTC timezone while the photos are in UTC-7.

@ClemRz
ClemRz / readme.md
Last active October 1, 2018 17:48
Removes inaccurate point from a GPS trace.

Filter a KML by HDOP value

Sometimes a trace KML file obtained from a GPS has some points with high HDOP value. Those are usually not accurate and can be omitted from the trace.

How to use this script

Then open a terminal and run:

python zFilterByHdop.py /path/to/your/file.kml
@ClemRz
ClemRz / readme.md
Last active July 6, 2017 16:35
How to override a class in C++ in an Arduino environment

How to override a class in C++ in an Arduino environment

I was working on a custom firmware for ESP8266 using the famous Arduino library and I wanted to create a websocket server. I also wanted the EPS to serve the web page that acts as a websocket server (having the ESP in AP mode).

The awesome library ArduinoWebSockets is very easy to set up and make the ESP serve websockets connections on port 81. The thing is that when I was opening a browser at http://192.168.4.1:81 I had this message: "This is a Websocket server only!". Wow! This means that ESP is capable of returning a http message to the browser! This also means that the message could be tweaked to include the actual html page with the websocket JS client!

I looked at the library file WebSocketsServer.h and found that the method handleNonWebsocketConnection was the one sending this message.

@ClemRz
ClemRz / readme.md
Last active November 12, 2024 15:56
How to pass a callback function as an argument (Arduino, C++)

How to pass a callback function as an argument (Arduino, C++)

Arduino Uno:

bool myCallback(int value) {
  // here your custom logic
  return status;
}
@ClemRz
ClemRz / readme.md
Created August 31, 2017 19:04
This is a guide to add vectorial forest data to your QGIS map.

How to add vectorial PALSAR-2 Global Forest data in QGIS

Follow those simple steps:

  1. Go to http://www.eorc.jaxa.jp/ALOS/en/palsar_fnf/data/index.htm and select latest FNF map.
  2. Select the region and sub-region
  3. Download the FNF file
  4. In your QGIS project open the file that has no extension
  5. If you need to merge several FNF files, save them first as GTIFF (raster) and use the merge tool in the raster menu
  6. In the raster menu select Conversion > Polygonize, remember to check the "field name" checkbox
@ClemRz
ClemRz / readme.md
Last active August 31, 2017 20:38
This is how you download vectorial OSM data for your QGIS map

How to import OSM vectorial data into QGIS

Follow the steps:

  1. Go to https://www.openstreetmap.org and log in
  2. On the right, open the layer menu and check the public GPS trace
  3. On the top-left corner click on "Export"
  4. Enter the coordinates
  5. Click on Export button
  6. Open the file with a text editor