This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is intended to be dropped in a Playground. | |
| import Foundation | |
| let json = | |
| """ | |
| { | |
| "name": "Casey's Corner", | |
| "menu": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // KeyCommand.swift | |
| // Adds Keyboard Shortcuts to SwiftUI on iOS 13 | |
| // See https://steipete.com/posts/fixing-keyboardshortcut-in-swiftui/ | |
| // License: MIT | |
| // | |
| // Usage: (wrap view in `KeyboardEnabledHostingController`) | |
| // Button(action: { | |
| // print("Button Tapped!!") | |
| // }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # We'll be installing Homebrew in the /opt directory. | |
| cd /opt | |
| # Create a directory for Homebrew. This requires root permissions. | |
| sudo mkdir homebrew | |
| # Make us the owner of the directory so that we no longer require root permissions. | |
| sudo chown -R $(whoami) /opt/homebrew | |
| # Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 = { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Requirements: a NSLocationWhenInUseUsageDescription entry in Info.plist | |
| // Usage: @State var locator = CLLocationManager.publishLocation() | |
| // and | |
| // .onReceive(locator) { location in | |
| // Improvements needed: Move requestWhenInUseAuthorization into its own publisher and perhaps have a combineLatest pipeline for both authorized and valid location. | |
| // A configuration param to init(), e.g. so each manager can have the same distanceFilter. | |
| import Foundation | |
| import Combine | |
| import CoreLocation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| rev="12" | |
| _log(){ | |
| echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log | |
| } | |
| _log_para(){ | |
| echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // PagerView.swift | |
| // | |
| // Created by Majid Jabrayilov on 12/5/19. | |
| // Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
| // | |
| import SwiftUI | |
| struct PagerView<Content: View>: View { | |
| let pageCount: Int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cask_args appdir: "/Applications" | |
| tap "homebrew/cask-fonts" | |
| brew "mas" | |
| #### LAPTOPS #### | |
| #cask "tripmode" | |
| #### LAPTOPS #### | |
| mas "Boop", id: 1518425043 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| browser = 'wdgaB1CilGA-S_s2' # Streams HIGH/LOW Quality over RTMP, FLAC and Videos over HTTP, but many Lossless Streams are encrypted. | |
| android = 'kgsOOmYk3zShYrNP' # All Streams are HTTP Streams. Correct numberOfVideos in Playlists (best Token to use) | |
| ios = '_DSTon1kC8pABnTw' # Same as Android Token, but uses ALAC instead of FLAC | |
| native = '4zx46pyr9o8qZNRw' # Same as Android Token, but FLAC streams are encrypted | |
| audirvana = 'BI218mwp9ERZ3PFI' # Like Android Token, supports MQA, but returns 'numberOfVideos = 0' in Playlists | |
| amarra = 'wc8j_yBJd20zOmx0' # Like Android Token, but returns 'numberOfVideos = 0' in Playlists | |
| # Unkown working Tokens | |
| token1 = 'P5Xbeo5LFvESeDy6' # Like Android Token, but returns 'numberOfVideos = 0' in Playlists | |
| token2 = 'oIaGpqT_vQPnTr0Q' # Like token1, but uses RTMP for HIGH/LOW Quality | |
| token3 = '_KM2HixcUBZtmktH' # Same as token1 |
NewerOlder