Skip to content

Instantly share code, notes, and snippets.

FROM resin/amd64-debian:stretch
MAINTAINER Bruno Binet <[email protected]>
ENV IMAGE_VERSION 1.0
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
@bbinet
bbinet / debug.log
Last active July 6, 2023 14:26
esp_modem: silent disconnection leads to endless OTA
I (30) boot: ESP-IDF v5.1-dev-2926-g3df87a91a3 2nd stage bootloader
I (30) boot: compile time Jul 5 2023 10:23:12
I (31) boot: chip revision: v0.3
I (35) boot.esp32c3: SPI Speed : 80MHz
I (40) boot.esp32c3: SPI Mode : DIO
I (44) boot.esp32c3: SPI Flash Size : 4MB
I (49) boot: Enabling RNG early entropy source...
I (54) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=50320h (328480) map
I (63) esp_image: segment 1: paddr=00070348 vaddr=3fc98400 size=02f38h ( 12088) load
I (72) esp_image: segment 2: paddr=00073288 vaddr=40380000 size=0cd90h ( 52624) load
@bbinet
bbinet / scrape_bible_plan.sh
Created December 11, 2023 15:54 — forked from dtxe/scrape_bible_plan.sh
Scrape BibleProject discussion posts from YouVersion bible plans
#!/bin/bash
PLANID=12345678
JWTTOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
for DAY in {1..365}
do
curl 'https://plans.youversionapi.com/4.0/together/$PLANID/activities?day=$DAY&page=1&order=desc&talk_it_over=0' \
-H 'authority: plans.youversionapi.com' \
-H 'x-youversion-app-version: 4' \
@bbinet
bbinet / 1_pdf.py
Created January 30, 2024 16:20 — forked from philfreo/1_pdf.py
Three ways to make a PDF from HTML in Python (preferred is weasyprint or phantomjs)
def render_pdf_weasyprint(html):
from weasyprint import HTML
pdf = HTML(string=html.encode('utf-8'))
return pdf.write_pdf()
def render_pdf_xhtml2pdf(html):
"""mimerender helper to render a PDF from HTML using xhtml2pdf.
Usage: http://philfreo.com/blog/render-a-pdf-from-html-using-xhtml2pdf-and-mimerender-in-flask/
"""