Skip to content

Instantly share code, notes, and snippets.

View vpalmisano's full-sized avatar

Vittorio Palmisano vpalmisano

View GitHub Profile
@Ghostbird
Ghostbird / _obsolete.md
Last active November 5, 2024 17:03
Build FFMPEG with NVIDIA hardware accelleration libraries on Debian 12. Includes non-free libnpp!

Obsolete

It is no longer necessary to use this script to have hardware acceleration in ffmpeg on Debian. The default Debian ffmpeg and dependencies now support this out of the box.

See: #gistcomment-5095112

@goyuix
goyuix / HDR-to-SDR.txt
Created July 16, 2021 23:22
How to use FFMPEG to convert HDR video to SDR (standard dynamic range) while (mostly) retaining the same depth and intensity of colors, without washed-out colors, as the original HDR10+ video.
ffmpeg -i video-input.mp4 -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p -c:v libx265 -crf 22 -preset medium -tune fastdecode video-output.mp4
import {MediaKind, RtpCodecParameters, RtpParameters} from "mediasoup/lib/RtpParameters";
import {DtlsFingerprint, DtlsParameters, IceCandidate, IceParameters} from "mediasoup/lib/WebRtcTransport";
export interface ISdpConsumer {
id: string;
kind: MediaKind;
rtpParameters: RtpParameters;
removed: boolean;
}
@tavinus
tavinus / cloudsend.sh
Last active September 12, 2024 12:57
Send files to Nextcloud/Owncloud shared folder using curl
#!/usr/bin/env bash
############################################################
# MIGRATED TO REPOSITORY
# https://github.com/tavinus/cloudsend.sh
#
# This gist will NOT be updated anymore
############################################################
############################################################
#!/bin/bash
export MAKEFLAGS="-j 3"
set -e
VERSION="1.16.0"
LIBNICE_VERSION="0.1.16" # libnice (v>=0.1.14) needed for webrtcbin
LIBSRTP_VERSION="2.2.0" # libsrtp (v>=2.2.0) required for srtp plugin
WEBRTCAUDIO_VERSION="0.3.1" # webrtc-audio-processing required for webrtcdsp
[ -n "$1" ] && VERSION=$1
@cheethoe
cheethoe / gist:49d9c1d0003e44423e54a060e0b3fbf1
Last active April 14, 2022 21:01
Rook v0.8.0 device/osd removal
# This will use osd.5 as an example
# ceph commands are expected to be run in the rook-toolbox
1) disk fails
2) remove disk from node
3) mark out osd. `ceph osd out osd.5`
4) remove from crush map. `ceph osd crush remove osd.5`
5) delete caps. `ceph auth del osd.5`
6) remove osd. `ceph osd rm osd.5`
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-id-5`
8) delete osd data dir on node `rm -rf /var/lib/rook/osd5`
# Connectiong by SSH from Android Termux to Desktop and vice-versa.md
# Copyright (c) 2019 Evandro Coan
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hpa-downscale-limiter
namespace: kube-system
spec:
schedule: "*/3 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
@zupzup
zupzup / main.go
Last active May 16, 2024 16:48
ElasticSearch to Prometheus Exporter in Go
package main
import (
"context"
"github.com/go-chi/chi"
"github.com/go-chi/render"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"gopkg.in/olivere/elastic.v6"
@jedi4ever
jedi4ever / gist:d095656ae0f0eca4a83ebb2b331da367
Last active August 23, 2024 06:20
Chromium build with proprietary codecs