Skip to content

Instantly share code, notes, and snippets.

🌍
<3

Mathieu KIM ROBIN MathRobin

🌍
<3
  • /dev/null
Block or report user

Report or block MathRobin

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
@tobytailor
tobytailor / get_barcode_from_image.js
Created Jun 1, 2010
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
View get_barcode_from_image.js
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
@haschek
haschek / .jshintrc
Created May 4, 2012
JSHint Configuration, Strict Edition
View .jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@steeve85
steeve85 / weesms.py
Created Apr 12, 2015
Send and receive SMS Text Messages in Weechat
View weesms.py
# -*- coding:utf-8 -*-
from __future__ import unicode_literals
import weechat, csv, re, gammu, time, unicodedata
"""
README
======
2015-04-12: v0.1 - Initial/draft/beta version
@dhoko
dhoko / countWatcher.js
Created Sep 22, 2015
[Bookmarklet] Debug AngularJS
View countWatcher.js
// Version without jQuery
javascript:(function () { var root = angular.element(document.getElementsByTagName('body')); var watchers = []; var f = function (element) { angular.forEach(['$scope', '$isolateScope'], function (scopeProperty) { if (element.data() && element.data().hasOwnProperty(scopeProperty)) { angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) { watchers.push(watcher); }); } }); angular.forEach(element.children(), function (childElement) { f(angular.element(childElement)); }); }; f(root); var watchersWithoutDuplicates = []; angular.forEach(watchers, function(item) { if(watchersWithoutDuplicates.indexOf(item) < 0) { watchersWithoutDuplicates.push(item); } }); console.log(watchersWithoutDuplicates.length); })();
// Version with jQuery
javascript:(function () { var root = $(document.getElementsByTagName('body')); var watchers = []; var f = function (element) { if (element.data().hasOwnProperty('$scope')) { angular.forEach(element.data().$scope.$$watchers, function (watche
@wilhelm-murdoch
wilhelm-murdoch / JSONCountries.json
Created Dec 6, 2010
Here is a JSON object which contains a list of all countries and their associated abbreviations. Thought others might find this useful.
View JSONCountries.json
[
{"US":"United States"},
{"CA":"Canada"},
{"AF":"Afghanistan"},
{"AL":"Albania"},
{"DZ":"Algeria"},
{"DS":"American Samoa"},
{"AD":"Andorra"},
{"AO":"Angola"},
{"AI":"Anguilla"},
@derickbailey
derickbailey / 1.js
Last active Jan 4, 2016
switch to registry
View 1.js
var employee = someEmployee;
var action = "view";
switch (action) {
case "view":
showEmployee(someEmployee);
break;
case "edit":
editEmployee(someEmployee);
@getify
getify / gist:876d0431352cd68d44a3
Last active Aug 29, 2015
Some issues with "JS Loaders" list of "advanced comparisons" (http://mathrobin.github.io/js_loaders/)
View gist:876d0431352cd68d44a3
  • Load CSS
  • Load CSS without blocking
  • Load CSS in parallel

These 3 seem like unfair comparisons. A "JS Loader" loads JavaScript, that's it. The fact that some also do other things not related to loading JavaScript is not relevant.

Put another way, if you're going to list those 3, why not list these as well:

  • Load Images
  • Load HTML
You can’t perform that action at this time.