This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste into dev console | |
[...document.querySelectorAll(".a-list-item, .huc-v2-item-msg")].map(x => { | |
const lims = x.innerText.match(/from £([0-9.]+) to £([0-9.]+)/)?.slice(1,3); | |
if (!!lims) { | |
const p = lims[1] - lims[0]; | |
const y = 100*p/lims[0]; | |
return [p, `£${p.toFixed(2)} (${y.toFixed(1)} %): ${x.innerText}`]; | |
} | |
}).filter(x => !!x).sort((a,b) => b[0] - a[0]).forEach(([_,v]) => console.log(v)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install arch https://wiki.archlinux.org/title/Chrome_OS_devices/Crostini | |
lxc config set arch security.nesting true | |
Within arch, configure downloads | |
mkdir ~/Downloads && sudo mount -o bind /mnt/chromeos/MyFiles/Downloads ~/Downloads | |
Install nix (just use the standard multi-user nix installer) | |
Install lxd | |
Add user to group lxd | |
sudo systemctl enable lxd.service | |
logout cycle for arch | |
lxd init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Convert CMS2021 Schedule to Local Time | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Convert CMS2021 schedule to local time | |
// @author David Baynard | |
// @match https://cms21.io/agenda/ | |
// @icon https://www.google.com/s2/favicons?domain=cms21.io | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const applyAsync = (f, pool) => (x, i) => | |
Promise.resolve(x) | |
.then((v) => new Promise((r) => pool.push({ i, v, r }))) | |
.then(f); | |
const worker = (getTimeout) => (it, i) => { | |
const { done, value } = it.next(); | |
if (done) return; | |
const { v, r } = value; | |
setTimeout( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def to_csv: | |
( [.[] | keys | .[]] | unique ) as $keys | |
| ( $keys | @csv ) | |
, ( .[] | |
| . as $row | |
| reduce ($keys | .[]) as $key ([]; [.[], ($row | .["\($key)"])]) | |
| @csv | |
); | |
def uniform_array_to_csv: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Toggle double playback rate | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Sets video playback rate to (3 - current rate) | |
// @author You | |
// @match *://*/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// @run-at context-menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> for i in 'age' 'apache_datasketches' 'cstore_fdw' 'jsonb_deep_sum' 'override' 'overrideDerivation' 'periods' 'pg_auto_failover' 'pg_bigm' 'pg_cron' 'pg_ed25519' 'pg_hint_plan' 'pg_hll' 'pg_ivm' 'pg_net' 'pg_partman' 'pg_rational' 'pg_relusage' 'pg_repack' 'pg_safeupdate' 'pg_similarity' 'pg_topn' 'pgaudit' 'pgjwt' 'pgroonga' 'pgrouting' 'pgsql-http' 'pgtap' 'pgvector' 'pipelinedb' 'plpgsql_check' 'plr' 'plv8' 'postgis' 'promscale_extension' 'recurseForDerivations' 'repmgr' 'rum' 'smlar' 'tds_fdw' 'temporal_tables' 'timescaledb' 'timescaledb-apache' 'timescaledb_toolkit' 'tsearch_extras' 'wal2json'; do | |
nix build -L "n#postgresql15Packages.${i}" && print -l -- "\nBuilt ${i} (15)\n" | |
nix build -L "n#postgresql16Packages.${i}" && print -l -- "\nBuilt ${i} (16)\n" | |
done | |
error: | |
… in the condition of the assert statement | |
at /nix/store/i6hq63805y784dml4j8pgkrz3lryxzld-source/lib/customisation.nix:222:17: | |
221| in commonAttrs // { |
OlderNewer