Skip to content

Instantly share code, notes, and snippets.

Avatar

Marian Steinbach marians

View GitHub Profile
@marians
marians / Re-partition_a_disk_on_a_Mac.md
Created Dec 19, 2019
How to re-partition an external drive from a Mac
View Re-partition_a_disk_on_a_Mac.md

WARNING: This erases all data stored on the drive.

I couldn't re-partition a freshly bought USB SSD via the Apple Disk Utility app. With the help of a Stack Overflow thread I came up with this method to create two partitions on the disk.

After this process, the disk can be re-partitioned interactively using Disk Utility.

  1. Plug in the drive to the Computer.
@marians
marians / README.md
Last active Oct 30, 2019
Phoniebox installation log
View README.md
View DSGVO §15 Auskunftsersuchen an CleverReach
<Absender>
CleverReach GmbH & Co. KG
Mühlenstr. 43
26180 Rastede
<Datum>
@marians
marians / read-sds011-data.sh
Created Feb 1, 2019
How to read data from SDS011 sensor via USB serial connection, from http://opengeiger.de/Feinstaub/FeinstaubDatenLogger.pdf
View read-sds011-data.sh
#!/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
@marians
marians / esp8266-dht-webthing.ino
Last active Jun 11, 2020
ESP8266 publishing DHT temperature and humidity via Web Thing API
View esp8266-dht-webthing.ino
/**
* 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 / My_First_Raspberry.md
Last active Jan 7, 2021
Notes on my Raspberry Pi setup
View My_First_Raspberry.md
View keybase.md

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 / import.py
Created Mar 16, 2017
Migrating a Ghost blog database to Jekyll
View import.py
# 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
@marians
marians / Podcasts.md
Created Jan 31, 2017
Podcasts in English or German that could help you find out what's going on in the U.S. (politics)
@marians
marians / main.go
Created Jan 27, 2017
OAuth 2.0 authentication in a Golang CLI
View main.go
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
"net/http"
"net/url"
"time"