Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Karl Dubost karlcow

🏠
Working from home
Block or report user

Report or block karlcow

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
View testcase-reducer.css
* {
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
overflow: hidden;
width: 100%;
}
@karlcow
karlcow / fastclick.md
Last active May 20, 2019
Documenting fastclick finding on webcompat.com
View fastclick.md
View selector-mad.css
.Intro-content .sqs-col-12>.sqs-block:not(.float):not(.sqs-float-left):not(.sqs-float-right):not(.sqs-block-gallery):not(.sqs-block-image):not(.sqs-block-video):not(.sqs-block-map):not(.sqs-block-calendar):not(.sqs-block-menu):not(.sqs-block-tourdates):not(.sqs-block-summary-v2):not(.sqs-block-archive):not(.sqs-block-instagram),
.Main:not(.Main--events-list):not(.Main--events-item):not(.Main--blog-list) .Main-content .sqs-layout .sqs-col-12>.sqs-block:not(.float):not(.sqs-float-left):not(.sqs-float-right):not(.sqs-block-gallery):not(.sqs-block-image):not(.sqs-block-video):not(.sqs-block-map):not(.sqs-block-calendar):not(.sqs-block-menu):not(.sqs-block-tourdates):not(.sqs-block-summary-v2):not(.sqs-block-archive):not(.sqs-block-instagram),
.tweak-blog-list-style-stacked .BlogList--posts-full .sqs-layout .sqs-col-12>.sqs-block:not(.float):not(.sqs-float-left):not(.sqs-float-right):not(.sqs-block-gallery):not(.sqs-block-image):not(.sqs-block-video):not(.sqs-block-map):not(.sqs-block-calendar):not(.sqs-block-menu
View gif.worker.js
(function(b) {
function a(b, d) {
if ({}.hasOwnProperty.call(a.cache, b)) return a.cache[b];
var e = a.resolve(b);
if (!e) throw new Error('Failed to resolve module ' + b);
var c = {
id: b,
require: a,
filename: b,
exports: {},
View resize-filter.py
from PIL import Image
import time
FILTER_LIST = [('nearest', Image.NEAREST),
('bilinear', Image.BILINEAR),
('bicubic', Image.BICUBIC),
('lanczos', Image.LANCZOS),
('antialias', Image.ANTIALIAS)]
FILE = '/Users/karl/Documents/2016/10/12/thumbnail-test/original.png'
SIZE = (500, 500)
@karlcow
karlcow / fimstrip.py
Created Jun 20, 2018 — forked from nvbn/fimstrip.py
fimstrip.py
View fimstrip.py
from collections import Counter
import requests
from pycaption.srt import SRTReader
import lxml.html
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
lang = 'en-US'
path = ''
@karlcow
karlcow / modal.css
Last active May 30, 2018
joi's cite button
View modal.css
this is it.
The HTML is pre-generated.
The cite button just change the display to not hidden so the div appears.
View needsdiagnosis-monitor.py
#!/usr/bin/env python3
# encoding: utf-8
"""
Monitor the needsdiagnosis milestones.
Created by Karl Dubost - 2018-02-18
"""
import datetime
import json
View build-tools.md

Build Tools For Webcompat

webcompat is an opensource project. It relies on the effort of Mozilla webcompat team and contributions from volunteers across the world. Microsoft Edge team and Google Chrome team are also participating time to time.

There are different areas were you can create an impact on developing tools including:

View something.py
>>> from lxml.html.diff import htmldiff, html_annotate
>>> frag1 = """<li class="foo" id="barbitruc">"""
>>> frag2 = """<li id="barbitruc" class="foo">"""
>>> print htmldiff(frag1, frag2)
<li id="barbitruc" class="foo">
>>> htmldiff(frag1, frag2)
u'<li id="barbitruc" class="foo">'
>>> '<ins>' in htmldiff(frag1, frag2)
False
>>> '<del>' in htmldiff(frag1, frag2)
You can’t perform that action at this time.