Skip to content

Instantly share code, notes, and snippets.

View rhumlover's full-sized avatar

Thomas LE JEUNE rhumlover

  • San Francisco, California
View GitHub Profile
@rhumlover
rhumlover / vast3_error_codes.md
Created June 10, 2013 09:05
VAST 3 error codes

VAST Error Codes Table

From VAST 3.0 Spec (PDF)

Code Description
100 XML parsing error.
101 VAST schema validation error.
102 VAST version of response not supported.
200 Trafficking error. Video player received an Ad type that it was not expecting and/or cannot display.
@rhumlover
rhumlover / update_git_index.sh
Created November 11, 2015 02:04
When your git is stubborn and stuck with files that don't disappear (even with reset --hard), so you can't change branch: update git indexes so git knows those files didn't change
git ls-files -m | xargs -I {} git update-index --assume-unchanged {}
@rhumlover
rhumlover / lightest-video-base64.txt
Last active September 17, 2017 13:07
10 frames 8x8px black video, base64 encoded: the lightest video ever.
data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthAAGBRgj237AAAC6m1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAqAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAqAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAXcAAAAPpVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAADFZpZGVvSGFuZGxlcgAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiu4FAEQBFGMAAAGyTGF2YzUyLjIwLjEGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAA+kAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGF1ZHRhAAAAWW1ldGEAAAAAAAAAImhkbHIAAAAAAAAAAG1kaX
@rhumlover
rhumlover / review.md
Last active December 5, 2016 23:36
Javascript Templates Comparison: Hogan, dust, doT, underscore

JavaScript Templates Engines

A quick comparison/ benchmark between Hogan, Dust, doT and underscore

Presentation and Readability

Hogan.js

Developed by Twitter (same team as Bootstrap), use exactly the same syntax as Mustache, but more performant and more stuff available server side.

My name is {{ name }}

@rhumlover
rhumlover / countries_with_vat.txt
Created March 15, 2016 14:58
Countries with a VAT system
1 Austria AT
2 Belgium BE
3 Brazil BR
4 Bulgaria BG
5 Croatia HR
6 Cyprus CY
7 Czech Republic CZ
8 Denmark DK
9 Estonia EE
10 Finland FI
# Disable and enable event on scroll begin and scroll end.
# @see http://www.thecssninja.com/javascript/pointer-events-60fps
root = document.documentElement
timer = null
window.addEventListener 'scroll', ->
clearTimeout timer
# Pointer events has not already been disabled.
if not root.style.pointerEvents
root.style.pointerEvents = 'none'
ifconfig | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}'
function levenshtein(a, b) {
if(a.length === 0) return b.length;
if(b.length === 0) return a.length;
var matrix = [];
// increment along the first column of each row
var i;
for(i = 0; i <= b.length; i++){
matrix[i] = [i];
@rhumlover
rhumlover / gruntfile.js
Created October 21, 2013 16:45
"open" task can specify another target browser instead of the default one
grunt.initConfig({
open: {
server: {
path: "http://localhost:<%= connect.options.port %>",
app: "Google Chrome Canary"
}
}
})
@rhumlover
rhumlover / add_ssh_id_dsa.md
Last active December 25, 2015 20:09
Issue: git ask for password while gitconfig is correctly set Solution: add your private ssh key

Issue

git ask for password while gitconfig is correctly set

Test

$ ssh-add -L
The agent has no identities.

Solution

add your private ssh key