Skip to content

Instantly share code, notes, and snippets.

View mxmtsk's full-sized avatar
🎯
Focusing

Max Mitschke mxmtsk

🎯
Focusing
View GitHub Profile
@kevinkub
kevinkub / incidence.js
Last active June 27, 2023 12:53
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
class IncidenceWidget {
constructor() {
this.previousDaysToShow = 31;
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json`
this.stateToAbbr = {
@withchandra
withchandra / #readme.md
Last active April 16, 2022 00:02
Laravel + PHP CS Fixer + Prettier + ESLint + airbnb-base + Husky + lint-staged + commitlint + pre-commit hook + pre-push hook

This is my personal setup for linting and repo branches protection for a new laravel project. Feel free to copy and adjust.

Reason

I am using both bitbucket and github for mostly private projects, while bitbucket allows private repo to use advance features such as branch permission, github limit their protected branch feature for free-user.

On the other hand, implementing standard linting for both JS and PHP will help code-reviewer to read and evaluate the code.

Last but not least, standardized commit message will make everybody happy. =)

@hadynz
hadynz / serverless-deploy.yml
Created May 26, 2020 09:44
Serverless deploy with state management in S3
name: Continuous deploy
on:
push:
branches: [master]
jobs:
serverless-deploy:
runs-on: ubuntu-latest
@halgatewood
halgatewood / ServiceProvider.swift
Last active April 18, 2019 12:07
Completely Dynamic Apple TV Top Shelf using a Remote JSON file, Alamofire, Semaphore and SwiftyJSON
//
// ServiceProvider.swift
// BT Top Shelf
//
// Created by HalBook on 9/28/15.
// Copyright © 2015 HalGatewood.com. All rights reserved.
//
import Foundation
import TVServices
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007