Skip to content

Instantly share code, notes, and snippets.

View lightsprint09's full-sized avatar

Lukas Schmidt lightsprint09

View GitHub Profile
@Axel-Erfurt
Axel-Erfurt / celluloidTV.m3u
Last active September 24, 2024 15:51
Livestreams deutscher TV-Sender
#EXTM3U
#EXTINF:-1,ARD
https://mcdn.daserste.de/daserste/de/master.m3u8
#EXTINF:-1,ARD ONE
https://mcdn.one.ard.de/ardone/hls/master.m3u8
#EXTINF:-1,ARD Alpha
https://mcdn.br.de/br/fs/ard_alpha/hls/de/master.m3u8
#EXTINF:-1,ARD Tagesschau
https://tagesschau.akamaized.net/hls/live/2020115/tagesschau/tagesschau_1/master.m3u8
#EXTINF:-1,ZDF
@ddddxxx
ddddxxx / KeyPath+fieldName.swift
Last active April 28, 2023 10:24
KeyPath Introspection
// This file is based largely on the Runtime package - https://github.com/wickwirew/Runtime
extension KeyPath {
var fieldName: String? {
guard let offset = MemoryLayout<Root>.offset(of: self) else {
return nil
}
let typePtr = unsafeBitCast(Root.self, to: UnsafeMutableRawPointer.self)
let metadata = typePtr.assumingMemoryBound(to: StructMetadata.self)
@michaellihs
michaellihs / jenkins-plugin-licenses.md
Created April 12, 2018 09:35
Get Jenkins Plugin licenses

Get List of Jenkins Plugin Licenes

The following script provides you the licences of Jenkins plugins (e.g. for Open Source compliance checks) read from their pom.xml file on the respective Github repository.

Before using the script, you have to

  1. replace your.jenkins.host.com with the domain of your Jenkins server
  2. create a Jenkins API token for your user and put it into ~/.jenkins-api-token
@smileyborg
smileyborg / InteractiveTransitionCollectionViewDeselection.m
Last active January 15, 2023 13:03
Animate table & collection view deselection alongside interactive transition (for iOS 11 and later)
// UICollectionView Objective-C example
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] firstObject];
if (selectedIndexPath != nil) {
id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
if (coordinator != nil) {
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
@bastianallgeier
bastianallgeier / graphql.js
Created April 26, 2017 09:01
GraphQL micro client
// Client
const query = (query, data, headers) => {
return fetch('/api', {
method: 'POST',
headers: headers || {},
body: JSON.stringify({
query: query,
variables: data
})
}).then((response) => {
@Sorix
Sorix / AsynchronousOperation.swift
Last active May 22, 2024 07:15
Subclass of NSOperation (Operation) to make it asynchronous in Swift 3, 4, 5
// Created by Vasily Ulianov on 09.02.17, updated in 2019.
// License: MIT
import Foundation
/// Subclass of `Operation` that adds support of asynchronous operations.
/// 1. Call `super.main()` when override `main` method.
/// 2. When operation is finished or cancelled set `state = .finished` or `finish()`
open class AsynchronousOperation: Operation {
public override var isAsynchronous: Bool {