Skip to content

Instantly share code, notes, and snippets.

View pigubaoza's full-sized avatar

Keith Chia pigubaoza

View GitHub Profile
@api-haus
api-haus / cf.mjs
Last active December 17, 2023 05:31
Make perfectly looping cross-fading video. Using FFmpeg with transparency support (on .webm and .mov).
#!/usr/bin/env zx
// Establish program arguments
const input = argv.i;
const output = argv.o;
const fadeDuration = parseInt(argv.f);
const useTransparency = argv.t;
// Quality options
const bitRate = argv.b;
const constantRateFactor = argv.crf;
@coderofsalvation
coderofsalvation / crossfadevideo.sh
Last active December 17, 2023 06:45
ffmpeg commandline crossfade-looped video
#!/bin/bash
[[ ! -n $3 ]] && { echo "Usage: crossfadevideo <input.mp4> <fade in seconds> <output.mp4> [looptimes]"; exit; }
input="$1"
fade="$2"
duration="$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$input")"
duration=$(echo "$duration-($fade)" | bc | sed 's/\..*//g')
[[ ${duration:0:1} == "." ]] && duration="0$duration"
output="$3"
[[ -n $4 ]] && loop=$4 && output="${output}.mkv"
set -x
@Dan6erbond
Dan6erbond / 0PluginLibrary.plugin.js
Last active January 1, 2024 15:17
A collection of useful Better Discord themes and plugins.
/**
* @name ZeresPluginLibrary
* @version 1.2.32
* @invite TyFxKer
* @authorLink https://twitter.com/ZackRauen
* @donate https://paypal.me/ZackRauen
* @patreon https://patreon.com/Zerebos
* @website https://github.com/rauenzi/BDPluginLibrary
* @source https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js
*/
@yunqu
yunqu / build-bazel.md
Last active May 25, 2022 02:43
Building the bazel package for aarch64 on Amazon A1

Building Bazel for aarch64

I am building bazel for aarch64 on Amazon A1 platform. This flow is pretty nice and much easier than the QEMU flow which is prone to QEMU bugs.

Requirement

  • An Amazon A1 platform running Ubuntu 18.04.
skeithc@freedom ~ % ethminer --help
Usage ethminer [OPTIONS]
Options:
Work farming mode:
-F,--farm <url> Put into mining farm mode with the work server at URL (default: http://127.0.0.1:8545)
-FF,-FO, --farm-failover, --stratum-failover <url> Failover getwork/stratum URL (default: disabled)
--farm-retries <n> Number of retries until switch to failover (default: 3)
-S, --stratum <host:port> Put into stratum mode with the stratum server at host:port
-SF, --stratum-failover <host:port> Failover stratum server at host:port
@harshavardhana
harshavardhana / README.md
Last active July 13, 2021 15:40
REX-Ray with Minio

Getting Started

The following command will install the latest version of REX-Ray to /usr/bin/rexray on Linux systems:

$ sudo apt install s3fs
$ curl -sSL https://dl.bintray.com/emccode/rexray/install | sh

Depending on the Linux distribution REX-Ray will be registered as either a SystemD or SystemV service.

Configure

REX-Ray requires a configuration file for storing details used to communicate with storage providers. This can include authentication credentials and driver specific configuration options. After REX-Ray has been installed, copy and paste the contents below to a new file on the host at /etc/rexray/config.yml to configure s3fs storage driver.

@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active July 27, 2024 10:31
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active July 29, 2023 21:28
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active June 29, 2024 09:06
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS