Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lemieux on github.
  • I am lemieux (https://keybase.io/lemieux) on keybase.
  • I have a public key ASBle7dTLV_YWXr-q84u1j7XotcwGmMg0W5-5fVDEajiIAo

To claim this, I am signing this object:

@lemieux
lemieux / color-conversion-algorithms.js
Created November 3, 2016 20:32 — forked from mjackson/color-conversion-algorithms.js
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@lemieux
lemieux / s3update.py
Created September 22, 2015 14:47 — forked from nateware/s3update.py
Check local files vs what's on S3, and upload any that have changed.
#!/usr/bin/env python
# Compare a file on S3 to see if we have the latest version
# If not, upload it and invalidate CloudFront
import fnmatch
import os
import boto
import pprint
import re
@lemieux
lemieux / colors.xml
Created August 14, 2015 16:00
Interface customization for SupportKit in Android
<color name="SupportKit_accent">#9200aa</color>
<color name="SupportKit_accentDark">#76008a</color>
<color name="SupportKit_accentLight">#be7cca</color>
<color name="SupportKit_backgroundInput">#ffffff</color>
<color name="SupportKit_btnSendHollow">#c0c0c0</color>
<color name="SupportKit_btnSendHollowBorder">#303030</color>
<color name="SupportKit_header">#989898</color>
# Public: Show the adder.
#
# Returns nothing.
show: =>
r = this.selectedSkeleton.ranges[0]
normedRange = Range.sniff(r).normalize(this.annotator.element[0])
range = normedRange.toRange()
clientRectangle = range.getBoundingClientRect()
define([
'map',
'fabric'
], function(Map, Fabric){
...
var map = new Map({
main: main,
canvas: new Fabric.Canvas('map_canvas', {
hoverCursor: 'pointer',
@lemieux
lemieux / diacritics.js
Created September 3, 2013 14:00
Remove diacritic characters in DataTable
var defaultDiacriticsRemovalMap, removeDiacritics;
defaultDiacriticsRemovalMap = [{
'base': 'A',
'letters': /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g
}, {
'base': 'AA',
'letters': /[\uA732]/g
}, {
'base': 'AE',
@lemieux
lemieux / hn-css.css
Created April 6, 2013 16:43
HN Cleaner CSS I use it with Stylebot on Chrome and I use Javascript Injector : Nicholas Workshop to inject the web font in the page.
body {
margin: 0;
background-image: url(http://subtlepatterns.com/patterns/cloth_alike.png);
font-family: Lato;
font-size: 13px;
line-height: 20px;
color: #333333;
}
body > center > table {