Skip to content

Instantly share code, notes, and snippets.

View sebgeelen's full-sized avatar

Sébastien Geelen sebgeelen

View GitHub Profile
// ==UserScript==
// @name manneke pis!!
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the canvas!
// @author oralekin, LittleEndu, Camscade, Jeted
// @match https://hot-potato.reddit.com/embed*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
// ==/UserScript==
// ==UserScript==
// @name manneke pis!!
// @namespace http://tampermonkey.net/
// @version 0.4
// @description try to take over the canvas!
// @author oralekin, LittleEndu, Camscade
// @match https://hot-potato.reddit.com/embed*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
// ==/UserScript==
@sebgeelen
sebgeelen / discover.js
Created July 31, 2020 08:03
Discover key in js object
let cache = new Set();
let discoverIn = function(obj, keyToFind, previousPath = "") {
if(obj === null || typeof obj !== "object") {
return;
}
if (cache.has(obj)) return;
cache.add(obj);
@sebgeelen
sebgeelen / spine_attachment.dart
Created September 20, 2016 09:47
Add attachment dynamicaly into spine : Canvas + WebGL
/// create an empty BitmapData of the desired Label size
_spinLabelData = new BitmapData(120, 60, true, 0x00000000);
/// create a Label of the same bounding size with the correct style and text
_spinLabel = new Label(_spinLabelData.width, _spinLabelData.height)
..text = spinTranslation
..style = getDefaultStyle()
..align = Align.center
..x = _spinLabelData.width/2
@sebgeelen
sebgeelen / ffmpeg-cmds
Last active August 29, 2015 14:09
ffmpeg command help sheet
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# basic video conversion
ffmpeg -i input.flv output.webm
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# get frame count (realy simple : show in stdout)
ffmpeg -i "a.flv" -f null /dev/null
@sebgeelen
sebgeelen / load-video-encode
Last active August 29, 2015 14:09
Load a video file content and base64 encode it into a videoElement src
//---
//-------------------------------------------------------------------------------------------------
// Create the very first VideoElement in the dom
// It would later be used to know the width and
// height of the cloned videoData objects
Future<VideoData> load(String url, {
bool mp4: true, bool ogg: true, bool webm: true}) {