Skip to content

Instantly share code, notes, and snippets.

View ffittschen's full-sized avatar

Florian Fittschen ffittschen

View GitHub Profile
@ffittschen
ffittschen / COVID-19 Testergebnis.js
Last active November 7, 2020 17:51
COVID-19 Test Result Widget for DoctorBox (Scriptable)
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: microscope;
/**
* Parameters:
*
* TEST_ID: The test number (9 or 10 digit number below barcode)
* DAY: The day of your birthdate.
* MONTH: The month of your birthdate.
@ffittschen
ffittschen / incidens_and_newcases.js
Created October 28, 2020 09:14
Kombination der Covid-19 Neuinfektionen und der Inzidenz-Zahl für die aktuelle Location. Inspiriert von https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Define URLs based on the corona.rki.de webpage
const newCasesApiUrl = `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?f=json&where=NeuerFall%20IN(1%2C%20-1)&returnGeometry=false&spatialRel=esriSpatialRelIntersects&outFields=*&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D&resultType=standard&cacheHint=true`;
const incidenceUrl = (location) =>
`https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=GEN,cases7_per_100k&geometry=${location.longitude.toFixed(
3
)}%2C${location.latitude.toFixed(
3
)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`;
@ffittschen
ffittschen / DetailViewController.swift
Created November 25, 2017 10:32
How to organize a swift file
// From Jared Sinclair's blog: http://blog.jaredsinclair.com/post/152672541355/how-i-organize-a-swift-file
import UIKit
import CoreData
class DetailViewController: UIViewController {
// MARK: Internal Properties
weak var delegate: DetailViewControllerDelegate?
@ffittschen
ffittschen / mail-server-cert-expiry-check.md
Last active September 9, 2016 10:37
Check mail server certificate expiry

How to show the expiration date of certificates of a mail server

openssl s_client -connect host:port | openssl x509 -enddate -noout

e.g. the command

openssl s_client -connect imap.gmail.com:993 | openssl x509 -enddate -noout

returns:

depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
@ffittschen
ffittschen / gitconfig.md
Last active January 3, 2024 08:40
Use IntelliJ or WebStorm as git mergetool with SourceTree

Use IntelliJ or WebStorm as git mergetool

Configure Sourcetree

The merge tool that ships with JetBrain's IntelliJ IDEA or WebStorm is really awesome and way better than FileMerge. It is quite simple to configure SourceTree to use it as the default mergetool:

  1. Open the SourceTree preferences and select the Diff tab
  2. Choose Custom both as Visual Diff Tool and as Merge Tool
  3. Paste the following commands into the textfields:
  • Diff Command: /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea diff
@ffittschen
ffittschen / keybase.md
Created May 26, 2015 18:56
keybase.md

Keybase proof

I hereby claim:

  • I am ffittschen on github.
  • I am flo23 (https://keybase.io/flo23) on keybase.
  • I have a public key whose fingerprint is 3FCF FA81 0BEC E569 61D9 8C58 9D95 E0A5 5BD2 B364

To claim this, I am signing this object: