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
| #!/usr/bin/env ruby | |
| require 'open-uri' | |
| require 'pathname' | |
| require 'json' | |
| def strip_hash(f) | |
| ext = f.extname | |
| if ext.include?("?") |
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
| # Usage: | |
| # 1) Ctr+S downloads page to ~/Desktop/books.html | |
| # 2) Run script | |
| # 3) Find your books in /tmp/humble_books | |
| # 4) Read them | |
| # 5) Profit | |
| cat ~/Desktop/books.html | | |
| grep "https://dl.humble.com" | | |
| sed -n -E 's/.data-web\=\"(https://dl.humble.com/([.]+).([a-z]+)?["]+)./\1 \2 \3/p' | | |
| sed 's/&/&/g' > /tmp/humble_books_list && cat /tmp/humble_books_list | |
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
| mean_difference_r <- function(x, object) UseMethod("mean_difference_r", object) | |
| mean_difference_r.lm <- function(x, object) { | |
| x * sigma(object) | |
| } | |
| mean_difference_r.mlm <- function(x, object) { | |
| x * sqrt(mean(sigma(object)^2)) | |
| } |
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
| function ShowAutocompletion(obj) { | |
| // Disable default autocompletion for javascript | |
| monaco.languages.typescript.javascriptDefaults.setCompilerOptions({ noLib: true }); | |
| // Helper function to return the monaco completion item type of a thing | |
| function getType(thing, isMember) { | |
| isMember = (isMember == undefined) ? (typeof isMember == "boolean") ? isMember : false : false; // Give isMember a default value of false | |
| switch ((typeof thing).toLowerCase()) { | |
| case "object": |
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
| import urllib.request | |
| import subprocess | |
| import psutil | |
| import time | |
| import socket | |
| class BahnWifi: | |
| def __init__(self): | |
| self.loginUrl = 'http://www.wifionice.de/?login' | |
| self.logoutUrl = 'http://www.wifionice.de/?logout' |
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
| set -l data_status (curl -s https://iceportal.de/api1/rs/status) | |
| set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
| # next stop | |
| echo (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ] | |
| | first).station.name') | |
| # train number | |
| echo (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"') | |
| # speed | |
| echo speed (echo $data_status | jq -r '"\(.speed) km/h"') |
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
| Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
| ActivityTweet | |
| generic_activity_highlights | |
| generic_activity_momentsbreaking | |
| RankedOrganicTweet | |
| suggest_activity | |
| suggest_activity_feed | |
| suggest_activity_highlights | |
| suggest_activity_tweet |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>MOBA-Time</title> | |
| <style> | |
| * { | |
| cursor: none !important; | |
| pointer-events: none !important; |
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
| // Version 1.3.0 | |
| // 27.11.2021 | |
| // | |
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: red; icon-glyph: notes-medical; | |
| // Mit Caching und Fallback | |
| const cacheMinutes = 60; // 60 min | |
| const today = new Date(); | |
| const neededTotalVaccinations = 83200000; |
OlderNewer