This file contains 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 { parse, valid } from "semver"; | |
type Status = "AFFECTED" | "FIXED" | |
function isVulnerable(selectedVersion: string, versions: [string, Status][]) { | |
return isFilterSelected(selectedVersion, versions) || checkVersionAffected(selectedVersion, versions); | |
} | |
function isFilterSelected(selectedVersion: string, versions: [string, Status][]) { | |
return versions |
This file contains 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
# https://support.apple.com/en-gb/guide/compressor/cpsr9be73312/4.6.1/mac/11.5.1 | |
import subprocess | |
proc = subprocess.Popen(['/Applications/Compressor.app/Contents/MacOS/Compressor', '-monitor'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL) | |
while True: | |
c = proc.stdout.read(1) | |
print(c) # prints up to the last '\n' | |
# never gets here | |
print('done') |
This file contains 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 | |
// Thanks to @rphl (https://github.com/rphl) and @tzschies (https://github.com/tzschies) for their inspiring work on this widget. See https://gist.github.com/rphl/0491c5f9cb345bf831248732374c4ef5 and https://gist.github.com/tzschies/563fab70b37609bc8f2f630d566bcbc9. | |
function round(n, d) { | |
const m = Math.pow(10, d); | |
return Math.round((n + Number.EPSILON) * m) / m; | |
} | |
function buildQuery(params) { |
This file contains 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
from datetime import datetime, time, date, timedelta | |
def rollover(dt: datetime, rollover: time) -> date: | |
given_time = dt.time() | |
if given_time < rollover: | |
return dt.date() | |
else: | |
return dt.date() + timedelta(days=1) | |
def test_rollover(): |
This file contains 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> | |
<style type="text/css"> | |
.box { | |
background: linear-gradient(180deg, #2a4b65 0%, #0a748a 100%); | |
width: 1020px; | |
margin: 0 auto; | |
position: absolute; |
This file contains 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
.header-1 { | |
&:hover { | |
& .team-project-icon { | |
transform: scale(1.2); | |
} | |
} | |
} | |
.header-2 { | |
&:hover { |
This file contains 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
/* Block URLs with uBlock Origin: | |
* https://www.gstatic.com/meet/sounds/* | |
*/ | |
/* Top Right Menu */ | |
.NzPR9b { display: none } | |
/* On-Hover-Footer */ | |
.rG0ybd { display: none } |
This file contains 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 java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
import org.freedesktop.gstreamer.Element; | |
import org.freedesktop.gstreamer.Gst; | |
import org.freedesktop.gstreamer.Pad; | |
import org.freedesktop.gstreamer.Pipeline; | |
import org.slf4j.Logger; |
This file contains 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
ffmpeg -v warning -nostats -nostdin -y -analyzeduration 3000000 \ | |
-i http://live.ber.c3voc.de:8000/sloop_native_hd.webm \ | |
\ | |
-c:v libx264 -preset:v veryfast -profile:v main -pix_fmt yuv420p -flags +cgop \ | |
-r:v:0 25 -g:v:0 75 -crf:v:0 21 -maxrate:v:0 4M -bufsize:v:0 18M \ | |
-threads:v 0 -aspect 16:9 \ | |
\ | |
-c:a aac -b:a 192k -ar 48000 -ac 1 \ | |
\ | |
-map 0:v:0 -map 0:a:0 \ |
This file contains 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
export declare type QueryCallbackFunction = (results: string[]) => void; | |
declare type QueryFunction = (query: string, callback: QueryCallbackFunction) => void; | |
import {Component, Input} from '@angular/core'; | |
@Component({ | |
selector: 'app-example', | |
styleUrls: ['./example.component.scss'], | |
templateUrl: './example.component.html', | |
}) |
NewerOlder