Skip to content

Instantly share code, notes, and snippets.

View marians's full-sized avatar

Marian Steinbach marians

View GitHub Profile
@marians
marians / Ernests struggle.md
Last active August 25, 2016 11:53
Ernest Gagnon wants to ride with you

August 25, 2016

Some time ago the inspiring story of Ernest Gagnon (Blog, Facebook, Strava) captured my attention. Ernest (570 lbs/258 kg as of April 2010) is fighting to loose weight by riding his bike on a regular basis and even participating in Cyclocross races. I followed him from the distance on Strava ever since to support his fight idealistically by hitting the Kudos button for his efforts.

Photo of Ernest

Today, Ernest added an activity on Strava titled My last strava posting. In the comments, Ernest explains why he seems decided to quit cycling for good and end his fight.

been a really hard few months, lost lots of friends to new jobs moving and all that, been really hard to find people to ride with

@marians
marians / openapi-spec.yaml
Created November 14, 2016 15:45
How to avoid repeating a parameter definition in an Open API 2.0 spec?
swagger: "2.0"
host: api.example.com
schemes:
- https
info:
title: An Example API Spec
version: "1"
paths:
/users/{user_id}/:
@marians
marians / Chromium Linux.md
Last active April 25, 2025 13:36
How to install CA certificates and PKCS12 key bundles on different platforms

We install certutil and pk12util if necessary:

sudo apt install libnss3-tools

On Linux, Chromium uses the NSS Shared DB. Check if you have the ~/.pki/nssdb directory:

ls $HOME/.pki/nssdb
@marians
marians / main.go
Created January 27, 2017 10:25
OAuth 2.0 authentication in a Golang CLI
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
"net/http"
"net/url"
"time"
@marians
marians / Podcasts.md
Created January 31, 2017 21:21
Podcasts in English or German that could help you find out what's going on in the U.S. (politics)
@marians
marians / import.py
Created March 16, 2017 13:09
Migrating a Ghost blog database to Jekyll
# coding: utf8
"""
This script helps to import content from a Ghost blog database to Jekyll.
The database is expected to be running on a reachalbe MySQL host.
See the very end for DB configuration.
Quick Usage:
pip install -r requirements

Keybase proof

I hereby claim:

  • I am marians on github.
  • I am marians (https://keybase.io/marians) on keybase.
  • I have a public key ASC59Z_e1Q8cm9jPZ4xhDuDFkxS1DJuecrMCau60nd58jgo

To claim this, I am signing this object:

@marians
marians / My_First_Raspberry.md
Last active January 7, 2021 08:31
Notes on my Raspberry Pi setup
@marians
marians / esp8266-dht-webthing.ino
Last active April 9, 2021 23:47
ESP8266 publishing DHT temperature and humidity via Web Thing API
/**
* Publishing DHT temperature and humidity via the Web Thing API.
*
* This should work with DHT11, DHT21, DHT22 alike thanks to
* device auto detection in the markruys/arduino-DHT library.
*
* This will make the device available under http://livingroom.local/
* for msdns-aware clients.
*
* Dependencies:
@marians
marians / read-sds011-data.sh
Created February 1, 2019 20:52
How to read data from SDS011 sensor via USB serial connection, from http://opengeiger.de/Feinstaub/FeinstaubDatenLogger.pdf
#!/bin/bash
# Anpassung für big endian unter RHEL 7
WDIR=~
while true; do
stty -F /dev/ttyUSB0 9600 raw
INPUT=$(dd conv=swab bs=10 count=1 </dev/ttyUSB0 2>/dev/null | od -x -N10 |head -n 1|cut -f2-10 -d" ");
#Ausgabe
#echo $INPUT