Skip to content

Instantly share code, notes, and snippets.

View lgarron's full-sized avatar
💭
😼

Lucas Garron lgarron

💭
😼
View GitHub Profile
@lgarron
lgarron / crbug-expand-blockers.js
Created April 11, 2016 22:59
crbug-expand-blockers.js
javascript:document.styleSheets[0].insertRule(".rel_issues a { white-space: normal !important;", 1);[].slice.call(document.querySelector(".rel_issues").querySelectorAll("a")).map(a => a.textContent += " %E2%80%93 " + a.title)
@lgarron
lgarron / dabblet.css
Created January 16, 2012 07:15
Barber Pole
/**
* Barber Pole
*/
.barber_pole::before {
content: "\a0";
float: left;
width: 140%;
@lgarron
lgarron / dabblet.css
Created December 7, 2016 19:47
hstspreload spinner
html, body {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.spinner {
width: 2em;
height: 2em;
border-radius: 1.25em;
@lgarron
lgarron / dabblet.css
Last active December 8, 2016 19:59
Untitled
html, body {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-family: Tahoma, sans-serif;
font-weight: bold;
}
.all {
In[121]:= p = NextPrime[RandomInteger[{2^2047, 2^2048}]]
Out[121]= \
2472858022210415099164045402553368874951528885035736322800760410002954\
4038243222193098931418739578329762267040841916783150979034128645102130\
0253513299160810798121444406865510009715543992322555089967015541632378\
0710135209985817236443936777772937122422269799403563157416882656645382\
0161318776579572843028782784167357793642890306031876148210563553196737\
6550335038180588177627102411796625979142817323054655605301722206159897\
4290495880080776782541535829627114438988359115159634994645719944873859\
@lgarron
lgarron / replace.fish
Last active April 5, 2017 04:24
Replace using `ag` and `sed` in fish
# brew install gsed
for file in (ag -i -l "PageInfoPopupView" .)
echo $file
gsed --in-place="" "s/PageInfoPopupView/PageInfoBubbleView/g" $file
end
⠁⠃⠂⠆⠄⠤⠠⠰⠐⠘⠈⠉
Inspired by https://github.com/typings/typings
@lgarron
lgarron / crbug-bookmarklet.js
Last active July 6, 2017 02:26
Copy a pretty URL version of a Chromium issue (e.g. https://crbug.com/414843).
/*
Convert to a bookmarklet using: https://chriszarate.github.io/bookmarkleter/
When you're on a Chromium issue page, this bookmarklet copies the short URL to clipboard. Also offers a markup version, a snippets version, and the pure ID.
Example: https://crbug.com/445359 instead of https://bugs.chromium.org/p/chromium/issues/detail?id=445359&can=1&q=owner%3Ame%20OR%20reporter%3Ame%20OR%20cc%3Ame%20OR%20commentby%3Ame&sort=-modified&colspec=ID%20Pri%20M%20Status%20Owner%20Summary%20OS%20Modified
*/
// https://github.com/lgarron/clipboard.js
var clipboard = {};
clipboard.copy = (function() {
@lgarron
lgarron / Algorithms.md
Last active June 14, 2018 01:01
Algorithm Representation

In the example below, a "group" is a sequence of moves surrounded in parentheses.

Design goal

A representation of algorithms in JSON that also maps to native data structures and classes in most programming languages.

Desirable properties:

  1. Easy to represent in a programming language with lists and "classes" (objects with pre-defined patterns of properties).
  2. The data structures are straightforward to flatten to/from JSON.

JS Cubing

if [ ! -d "alg" ]; then
   git clone https://github.com/cubing/alg.js       alg
fi
if [ ! -d "kpuzzle" ]; then
   git clone https://github.com/cubing/kpuzzle.js   kpuzzle
fi
if [ ! -d "twisty" ]; then

git clone https://github.com/cubing/twisty.js twisty