Skip to content

Instantly share code, notes, and snippets.

prologic /
Last active March 16, 2023 04:50
Learn Go in ~5mins
CharlesHolbrow / ffmpeg-hls.html
Created September 13, 2018 22:44
Example of ffmpeg for live hls streaming with hls.js
View ffmpeg-hls.html
<!DOCTYPE html>
<html lang='`en'>
<meta charset='utf-8'/>
<title>Audio only stream example</title>
<script src="//"></script>
video {
width: 640px;
height: 360px;
sysboss /
Created May 21, 2018 15:41
SQL Query Amazon Athena using Python
#!/usr/bin/env python3
# Query AWS Athena using SQL
# Copyright (c) Alexey Baikov <sysboss[at]>
# This snippet is a basic example to query Athen and load the results
# to a variable.
# Requirements:
# > pip3 install boto3 botocore retrying
marick /
Last active June 22, 2022 21:08
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

jmarceli /
Last active October 31, 2019 09:46
React errors explained


You will get one of these:

Uncaught (in promise) TypeError: Cannot read property 'toUpperCase' of undefined(…)

ReactCompositeComponent.js:870 Uncaught TypeError: Cannot read property 'displayName' of undefined

if you try to:


Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

stephensauceda / gulpfile.babel.js
Created June 11, 2015 23:45
ES6 Gulpfile Example
View gulpfile.babel.js
* Steps
* 1. Rename your gulpfile.js to gulpfile.babel.js
* 2. Add babel to your package.json (npm install -D babel)
* 3. Start writing ES6 in your gulpfile!
import gulp from 'gulp'; // ES6 imports!
import sass from 'gulp-sass';
soin08 / gulpfile.js
Last active August 16, 2022 23:34
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
View gulpfile.js
//Based on gulpfile.js from Google Web Starter Kit.
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
justmoon / custom-error.js
Last active March 21, 2023 14:23 — forked from subfuzion/
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor); =;
this.message = message;
this.extra = extra;
require('util').inherits(module.exports, Error);
patriciogonzalezvivo /
Last active March 23, 2023 04:18
GLSL Noise Algorithms

Please consider using instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);