Skip to content

Instantly share code, notes, and snippets.

View DoomyTheFroomy's full-sized avatar
👀
Looking forward

Martin Rudolph DoomyTheFroomy

👀
Looking forward
View GitHub Profile
@DoomyTheFroomy
DoomyTheFroomy / HTTPStatusCode.swift
Created July 19, 2021 12:48 — forked from ollieatkinson/HTTPStatusCode.swift
HTTP status codes as a Swift enum.
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes.
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes.
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum.
enum HTTPStatusCode: Int, Error {
/// The response class representation of status codes, these get grouped by their first digit.
enum ResponseType {
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.
case informational
@DoomyTheFroomy
DoomyTheFroomy / PollenAlarm.js
Last active February 27, 2024 07:31
Scriptable Widget to display the pollen state in Germany
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-purple; icon-glyph: tree;
/* global Location args config Script ListWidget Font Color Request */
const pollenUrl = 'https://opendata.dwd.de/climate_environment/health/alerts/s31fg.json'
const regions = {
10: 'Schleswig-Holstein und Hamburg',
11: 'Inseln und Marschen',
@DoomyTheFroomy
DoomyTheFroomy / RadioTeddyScriptable.js
Last active October 7, 2020 08:19
#Scriptable Radio Teddy Live Information - Get Info about what's currently playing and on click you will be leaded to either the song in Apple Music or the radio station in Apple Music
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: theater-masks;
/* global Request ListWidget Color Font Script config */
const radioTeddyNowPlayingUrl = 'https://np.radioplayer.de/qp/v3/onair?rpIds=57&nameSize=200&artistNameSize=200&descriptionSize=200'
const appleMusicSearchUrl = 'https://tools.applemediaservices.com/api/apple-media/music/DE/search.json?types=songs&limit=25&l=en-US'
const radioTeddyShowInfoUrl = 'https://webplayer.radioteddy.de/currentshow.php'
const defaultShowImageUrl = 'https://webplayer.radioteddy.de/livestream/img/teddy-default-cover-2019.png'
const radioTeddyAppleMusicStationUrl = 'https://music.apple.com/de/station/radio-teddy/ra.1460998005'
@DoomyTheFroomy
DoomyTheFroomy / Using <details> in GitHub.md
Last active November 3, 2016 17:00 — forked from lee-dohm/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot of noisy logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
@DoomyTheFroomy
DoomyTheFroomy / create_labels.sh
Last active October 5, 2016 06:41 — forked from omegahm/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform
return {
code : 301,
headers : {
"Location" : 'redicrect url'
}
};
@DoomyTheFroomy
DoomyTheFroomy / API.md
Last active December 21, 2015 13:46 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

URL

<The URL Structure (path only, no root url)>

Method:

@DoomyTheFroomy
DoomyTheFroomy / removeDocsFromCouchdb.js
Last active June 19, 2017 12:41 — forked from StephanU/removeDocsFromCouchdb.js
Using jquery couchdb plugin to delete docs from a database (1.6.1)
var targetDB = 'db'
var blacklist = ['_design/']
var ddoc = 'test'
var viewName = 'emittedDocsToBeDeleted'
var toBeDeletedDocs = {}
var skip = 0
var limit = 5000
var totalRows = 0
deleteDocuments(skip, limit)
@DoomyTheFroomy
DoomyTheFroomy / gist:4123528
Created November 21, 2012 07:08 — forked from akolosov/gist:4123274
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt