Skip to content

Instantly share code, notes, and snippets.

Mathieu 'p01' Henri p01

Block or report user

Report or block p01

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
@p01
p01 / example.js
Created Jun 2, 2011 — forked from stdclass/example.js
Make RGB Colors Lighter / Darker
View example.js
/*
* Make RGB-Colors lighter / darker
*/
var color = function(c,n,i,d){for(i=3;i--;c[i]=d<0?0:d>255?255:d|0)d=c[i]+n;return c}
/**
* @param array RGB Colors
* @param number Amount
*/
@p01
p01 / LICENSE.txt
Created Jul 30, 2011 — forked from 140bytes/LICENSE.txt
isPrimeNumber in 41 bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / LICENSE.txt
Created Aug 5, 2011 — forked from 140bytes/LICENSE.txt
Levenshtein Distance
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / LICENSE.txt
Last active Jun 26, 2019 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / LICENSE.txt
Created Oct 3, 2011 — forked from Prinzhorn/LICENSE.txt
American Soundex in 146 bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / LICENSE.txt
Created Oct 6, 2011 — forked from 140bytes/LICENSE.txt
Mandelbrot fractal with zoom & panning in 133 bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / LICENSE.txt
Created Oct 13, 2011 — forked from 140bytes/LICENSE.txt
Music SoftSynth
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / prodScreenshot.user.js
Created Aug 24, 2012
pouet.net.user.js - prodScreenshot.user.js
View prodScreenshot.user.js
// ==UserScript==
// @name prodScreenshot
// @description Add the corresponding thumbnail inside each link to a prod.
// @include http://pouet.net/*
// @exclude http://pouet.net/
// @exclude http://pouet.net/index.php*
// @include http://www.pouet.net/*
// @exclude http://www.pouet.net/
// @exclude http://www.pouet.net/index.php*
// ==/UserScript==
@p01
p01 / quack.js
Created Jan 12, 2014
Conditional breakpoint after X iterations of a loop
View quack.js
// Example of conditional breakpoint ( in code ) after X iterations
for(var i=0, __iterations_left_before_break=50; (--__iterations_left_before_break||debugger),i<1e5;i++)
{
// body of the loop
}
/*
To do the same in devtool, you can put a breakpoint on the first statement of the loop,
right-click on the breakpoint > Edit condition.
@p01
p01 / viewer_snippet.js
Last active Aug 29, 2015
PDF.js profile slow pages
View viewer_snippet.js
/*
* Copy this gist into a snippet of the Sources panel of the DevTool and run it to profile slow pages
* Alternatively the PDFView.PROFILE_THRESHOLD can be set in `ms`
*/
// threshold in ms to keep/discard CPU profile
PDFView.PROFILE_THRESHOLD = 500;
PDFView.renderHighestPriority = function pdfViewRenderHighestPriority_patched(currentlyVisiblePages) {
if (PDFView.idleTimeout) {
You can’t perform that action at this time.