Skip to content

Instantly share code, notes, and snippets.

View chrispahm's full-sized avatar
🌻
https://fruchtfolge.agp.uni-bonn.de/

Christoph Pahmeyer chrispahm

🌻
https://fruchtfolge.agp.uni-bonn.de/
View GitHub Profile
@davidwebca
davidwebca / gist:e26186b8f4c6795b19c043fffb6f9861
Last active December 18, 2023 15:29
Detect black screen and split with ffmpeg remux
# Splits video to separate scenes files when full black frames are found in the video
# Inspired by https://gist.github.com/achesco/4dc2ebf13378a0a61fc26c7fe01f539e
# Who got inspired by https://stackoverflow.com/a/38205105
#!/bin/bash
file=""
out="./"
dur=0.05
stripaudio=""
@fhk
fhk / lp_solver_wasm.md
Last active February 5, 2024 15:20
Compiling a linked linear programming solver library

Linear Programming Solver running in the browser?

So I wanted to see if I could get a solver running in the browser.

Why you might ask? Well its pretty typical to need to deploy a back end for a webapp or even to have a specific install on your OS.

This makes things clunky if we wanted to say:

  1. Visualize solutions in realtime using some js libs on the client side
  2. Solve models on the client side of a web app
@mourner
mourner / contours.js
Created September 29, 2017 13:31
Quick example of generating GeoJSON contours from raster with d3
'use strict';
var contours = require('d3-contour').contours;
var PNG = require('pngjs').PNG;
var fs = require('fs');
var png = PNG.sync.read(fs.readFileSync('./rain.png'));
var data = [];
for (var i = 0; i < png.height; i++) {
@achesco
achesco / split-to-scenes.sh
Last active January 14, 2024 19:40
Detect and split video to scenes with ffmpeg
# Splits video to separate scenes files
# Inspired by https://stackoverflow.com/a/38205105
#!/bin/bash
file=""
out="./"
diff=0.4
bitrate="512k"
trim=0
@parmentf
parmentf / GitCommitEmoji.md
Last active March 28, 2024 14:20
Git Commit message Emoji