I wrote this four years ago, so instead use this command:
$ docker rmi $(docker images -q -f dangling=true)
/// <summary> | |
/// A hash combiner that is implemented with the Fowler/Noll/Vo algorithm (FNV-1a). This is a mutable struct for performance reasons. | |
/// Taken from https://gist.github.com/StephenCleary/4f6568e5ab5bee7845943fdaef8426d2 | |
/// </summary> | |
public struct FnvHash | |
{ | |
/// <summary> | |
/// The starting point of the FNV hash. | |
/// </summary> | |
public const ulong Offset = 14695981039346656037; |
// ==UserScript== | |
// @name Spotify: Linked Labels | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description make Label Copyrights into hyperlinks in Spotify: Browse Music by Label! | |
// @author schuyberg | |
// @match https://open.spotify.com/* | |
// @grant none | |
// @require http://code.jquery.com/jquery-3.2.1.min.js | |
// ==/UserScript== |
/* | |
Parallel processing with ordered output in Go | |
(you can use this pattern by importing https://github.com/MarianoGappa/parseq) | |
This example implementation is useful when the following 3 conditions are true: | |
1) the rate of input is higher than the rate of output on the system (i.e. it queues up) | |
2) the processing of input can be parallelised, and overall throughput increases by doing so | |
3) the order of output of the system needs to respect order of input | |
- if 1 is false, KISS! |
/* | |
This snippet is an example of backpressure implementation in Go. | |
It doesn't run in Go Playground, because it starts an HTTP Server. | |
The example starts an HTTP server and sends multiple requests to it. The server starts denying | |
requests by replying an "X" (i.e. a 502) when its buffered channel reaches capacity. | |
This is not the same as rate-limiting; you might be interested in https://github.com/juju/ratelimit | |
or https://godoc.org/golang.org/x/time/rate. |
package main | |
import ( | |
"errors" | |
"os" | |
"time" | |
"github.com/apex/log" | |
"github.com/apex/log/handlers/text" | |
) |
// Copyright 2011 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// HTTP reverse proxy handler | |
package goengine | |
import ( | |
"io" |
ffmpeg -re -i rtmp://localhost/live/input_stream -acodec libfaac -ab 128k -vcodec libx264 -s 640x360 -b:v 500k -preset medium -vprofile baseline -r 25 -f flv rtmp://localhost/live/medium_500k -acodec libfaac -ab 128k -vcodec libx264 -s 480x272 -b:v 300k -preset medium -vprofile baseline -r 25 -f flv rtmp://localhost/live/medium_300k -acodec libfaac -ab 128k -c:v libx264 -s 320x200 -b:v 150k -preset:v fast -profile:v baseline -level 1.2 -r 25 -f flv rtmp://localhost/live/medium_150k -acodec libfaac -vn -ab 48k -f flv rtmp://localhost/live/audio_only |