Skip to content

Instantly share code, notes, and snippets.

Peter Hedenskog soulgalore

Block or report user

Report or block soulgalore

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@martinruenz
martinruenz / ffmpeg-snippets.md
Last active Dec 12, 2019
ffmpeg snippets / cheatsheet
View ffmpeg-snippets.md
@krisselden
krisselden / trace-to-mp4.js
Last active Oct 17, 2019
Make an mp4 out of a Chrome DevTools trace with screenshots.
View trace-to-mp4.js
#!/usr/bin/env node
// Converts a saved Chrome dev tools recording with Screenshots to mp4
const fs = require('fs');
const path = require('path');
const spawn = require('child_process').spawn;
const FPS = 60;
const MICROSEC_PER_FRAME = Math.round(1000000 / FPS);
if (process.argv.length < 3) {
console.log(`node ${path.relative('.', process.argv[1])} [DevToolsProfile]`);
process.exit(1);
@afolarin
afolarin / resource_alloc_docker.md
Last active Oct 13, 2019
Resource Allocation in Docker
View resource_alloc_docker.md

#Container Resource Allocation Options in docker-run

now see: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.

##Dynamic CPU Allocation -c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)

@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active Nov 26, 2019
CriticalCSS Bookmarklet and Devtool Snippet.js
View criticalcss-bookmarklet-devtool-snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@eqhmcow
eqhmcow / hfsc-shape.sh
Last active Jun 20, 2019
HFSC - linux traffic shaping's best kept secret
View hfsc-shape.sh
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
You can’t perform that action at this time.