Skip to content

Instantly share code, notes, and snippets.

@bbinet
bbinet / DejaVuSansMono-Bold-Powerline.ttf
Created July 12, 2012 14:25
DejaVu Sans Mono patched for vim-powerline
svg {
border: 1px solid;
background: white;
}
about = """
Titel: pyYASDI
Autor: Sebastian Schulte
Version: 1.0.0
Datum: 18.3.07 / 18.3.07 / 18.3.07
Datei: pyYASDI.py
+ SMA YASDI Library Wrapper fuer Python Scripting Language v1"""
import yasdiwrapper
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This tool can draw the path of the sun for a given
position on earth. It will draw two lines:
One for June 21 and another for December 21.
You need to have PyEphem and gnuplot installed
for this script to work properly.
@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/
"""