Skip to content

Instantly share code, notes, and snippets.

View pgrandin's full-sized avatar

Pierre Grandin pgrandin

View GitHub Profile
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
#include <TM1637Display.h>
#include "config.h"
bool debug = false;
import sys
import requests
from bs4 import BeautifulSoup
target=sys.argv[2]
cookies = {
'navitUserID': 'xxx',
'navitUserName': 'xxx',
'navitToken': 'xxx',
@pgrandin
pgrandin / Dockerfile
Created May 20, 2019 18:15
Building a mingw-w64 toolchain
# http://www.nathancoulson.com/proj_cross.php
FROM ubuntu:18.04
# pocketpc-cab removed
RUN apt-get update && apt-get install -y --no-install-recommends wget build-essential libmpfr-dev gettext \
ca-certificates zip ssh librsvg2-bin xsltproc vim \
&& apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV target="x86_64-w64-mingw32"
ENV binutils_version="2.31.90"
@pgrandin
pgrandin / Marlin-da42f27c9e6ffe5bf2501c78ad23edf7a82e9f35.diff
Created January 6, 2019 17:01
Marlin-da42f27c9e6ffe5bf2501c78ad23edf7a82e9f35 for my Monoprice Maker Select V2 with MKS SBASE V1.3
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 6f722714c..652fa0b91 100644
--- Marlin/Configuration.h
+++ Marlin/Configuration.h
@@ -104,7 +104,7 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-#define SERIAL_PORT 0
+#define SERIAL_PORT -1
a90cbc633993dc236fdb5d2aa174b52c321533c4 : attempt to rename spec 'link' to already defined spec 'nano_link'
d7b699ec340caf0c14efda13c7ced4fec78ecff9 : attempt to rename spec 'link' to already defined spec 'nano_link'
aae02827c07ced2318762a8181d63697de7b7b0b : attempt to rename spec 'link' to already defined spec 'nano_link'
f891416e701ccd9e6153c20d55ac9407a0fcf017 : last commit that doesn't build
b7e15a65e3e3b1cc900f498f59149a96c053ab41 : first commit that build, but doesn't connect
d55f44edba3521d278c04ad91ec7e532c6827efd : no connection
11ac75edcb34a2f90b50ca134ff40839f8c29199 : no connection
724c2ed9b461879d4fa90834d0305278d014d869 : no connection
de4561c9804e10bb1a649dc01b6392281171179f : no connection
@pgrandin
pgrandin / messages.log
Created January 6, 2019 05:53
messages.log
Jan 6 05:47:37 octopi kernel: [ 1061.783749] usb 1-1.2: new full-speed USB device number 7 using dwc_otg
Jan 6 05:47:37 octopi kernel: [ 1061.917298] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=6029
Jan 6 05:47:37 octopi kernel: [ 1061.917313] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 6 05:47:37 octopi kernel: [ 1061.917322] usb 1-1.2: Product: Marlin USB Device
Jan 6 05:47:37 octopi kernel: [ 1061.917330] usb 1-1.2: Manufacturer: marlinfw.org
Jan 6 05:47:37 octopi kernel: [ 1061.917339] usb 1-1.2: SerialNumber: 1.0000000000
Jan 6 05:47:37 octopi kernel: [ 1061.919732] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
Jan 6 05:47:37 octopi kernel: [ 1061.921133] usb-storage 1-1.2:1.2: USB Mass Storage device detected
Jan 6 05:47:37 octopi kernel: [ 1061.921594] scsi host0: usb-storage 1-1.2:1.2
Jan 6 05:47:37 octopi mtp-probe: checking bus 1, device 7: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2"
@pgrandin
pgrandin / marlin.diff
Created January 6, 2019 05:52
de4561c9804e10bb1a649dc01b6392281171179f.diff
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 6f722714c..27c1426f8 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -124,7 +124,7 @@
*
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
-#define BAUDRATE 250000
+#define BAUDRATE 115200
#!/usr/bin/env python
import dbus
import gobject
gobject.threads_init()
from dbus import glib
glib.init_threads()
# Create a session bus.
import dbus
if( ( (this->strict_mode && this->speed_exceed_limit_offset_strict+routespeed<tracking_speed ) ||
(this->speed_exceed_limit_offset+routespeed<tracking_speed ) ) &&

Keybase proof

I hereby claim:

  • I am pgrandin on github.
  • I am pgrandin (https://keybase.io/pgrandin) on keybase.
  • I have a public key whose fingerprint is 0F00 1540 9331 B117 81CC 1E78 02B2 93D1 B54E 9F4F

To claim this, I am signing this object: