Skip to content

Instantly share code, notes, and snippets.

View lgarron's full-sized avatar
💭
😼

Lucas Garron lgarron

💭
😼
View GitHub Profile
@lgarron
lgarron / script.js
Last active August 15, 2023 14:47
WCA Live WPA/BPA
globalThis.addedElems ??= [];
for (const elem of globalThis.addedElems) {
elem.remove();
}
globalThis.addedElems = [];
function registerElem(elem) {
elem.className = "MuiTableCell-root MuiTableCell-body MuiTableCell-alignRight MuiTableCell-sizeSmall css-wrjkbz";
globalThis.addedElems.push(elem);
return elem;
}
@lgarron
lgarron / domain-name.html
Created December 22, 2020 00:03
<domain-name>
<!DOCTYPE html>
<html>
<script type="module">
class DomainNameElement extends HTMLElement {
connectedCallback() {
this.textContent = (new URL(location.href)).hostname
}
}
customElements.define('domain-name', DomainNameElement);
</script>
@lgarron
lgarron / index.md
Created February 4, 2019 22:58
Example Solves

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

#!/usr/bin/env bash
# Setup script for a checkout of the Chromium HSTS preload list.
# Source -> medium.com/p/8c8896f5cef3 and gist.github.com/hemanth/7611535
echo "---- Creating folder and initializing a git repository. ----"
mkdir chromium-hsts && cd chromium-hsts
git init
echo "---- Adding chromium remote and initializing sparse checkout of /net/http. ----"
git remote add origin https://chromium.googlesource.com/chromium/src
-----BEGIN CERTIFICATE REQUEST-----
MIIC9DCCAdwCAQAwbjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDzANBgNVBAoMBkJhZFNTTDEhMB8GA1UE
AwwYeG4tLW4xYWFlN2Y3by5iYWRzc2wuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAwgTs+IzuBMKz2FDVcFjMkxjrXKhoSbAitfmVnrErLHY+bMBL
YExM6rK0wA+AtrD5csmGAvlcQV0TK39xxEu86ZQuUDemZxxhjPZBQsVG0xaHJ590
6wqdEVImIXNshEx5VeTRa+gGPUgVUq2zKNuq/27/YJVKd2s58STRMbbdTcDE/FO5
bUKttXz+rvUV0jNI5yJxx8IUemwo6jdK3+pstXK0flqiFtxpsVdE2woSq97DD0d0
XEEi4Zr5G5PmrSIGKS6xukkcDCeeo/uL90ByAKySCNmMV4RTgQXL5v5rVJhAJ4XH
ELtzcO9pGEEHRVV8+WQ/PSzDqXzrkxpMhtHKhQIDAQABoEEwPwYJKoZIhvcNAQkO
⠁⠃⠂⠆⠄⠤⠠⠰⠐⠘⠈⠉
Inspired by https://github.com/typings/typings
@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
-----BEGIN CERTIFICATE REQUEST-----
MIIC1zCCAb8CAQAwUDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
FTATBgNVBAcMDFdhbG51dCBDcmVlazEVMBMGA1UECgwMTHVjYXMgR2Fycm9uMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwgTs+IzuBMKz2FDVcFjMkxjr
XKhoSbAitfmVnrErLHY+bMBLYExM6rK0wA+AtrD5csmGAvlcQV0TK39xxEu86ZQu
UDemZxxhjPZBQsVG0xaHJ5906wqdEVImIXNshEx5VeTRa+gGPUgVUq2zKNuq/27/
YJVKd2s58STRMbbdTcDE/FO5bUKttXz+rvUV0jNI5yJxx8IUemwo6jdK3+pstXK0
flqiFtxpsVdE2woSq97DD0d0XEEi4Zr5G5PmrSIGKS6xukkcDCeeo/uL90ByAKyS
CNmMV4RTgQXL5v5rVJhAJ4XHELtzcO9pGEEHRVV8+WQ/PSzDqXzrkxpMhtHKhQ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