This file contains hidden or 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 Lichess time trouble countdown helper | |
| // @namespace https://lichess.org/ | |
| // @version 0.1 | |
| // @description Liches time trouble countdown util | |
| // @author You | |
| // @match https://lichess.org/* | |
| // @icon https://www.google.com/s2/favicons?domain=lichess.org | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or 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
| import b from "benny" | |
| import cloneDeep from "clone-deep" | |
| const testData = new Array(3000).fill(null).map((val, i) => ({ | |
| if: i, | |
| currDate: Math.round(Math.random() * 1e10), | |
| name: Math.round(Math.random() * 1e10).toString(16), | |
| someString: Math.round(Math.random() * 1e10).toString(16), | |
| foo: "foo", | |
| bar: "bar", |
This file contains hidden or 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
| # Adds Gnome/Cosmic shortcuts for: | |
| # - switching between workspaces with Super+<number> | |
| # - moving apps to workspaces with Super+Shift+<number> | |
| gsettings set org.gnome.mutter dynamic-workspaces false | |
| gsettings set org.gnome.desktop.wm.preferences num-workspaces 10 | |
| gsettings set org.gnome.shell.keybindings switch-to-application-1 [] | |
| gsettings set org.gnome.shell.keybindings switch-to-application-2 [] | |
| gsettings set org.gnome.shell.keybindings switch-to-application-3 [] | |
| gsettings set org.gnome.shell.keybindings switch-to-application-4 [] | |
| gsettings set org.gnome.shell.keybindings switch-to-application-5 [] |
This file contains hidden or 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
| /* Add this to file .themes/<theme name>/gnome-shell/gnome-shell.css */ | |
| .cosmic-dock #dock { | |
| border: 1px solid #0e1114; | |
| border-radius: 11px !important; | |
| background-color: #1d2128; | |
| } | |
| .cosmic-dock .app-well-app:hover .overview-icon, | |
| .cosmic-dock .app-well-app:focus .overview-icon, |
This file contains hidden or 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
| import v8 from "v8" | |
| import vm from "vm" | |
| import b from "benny" | |
| v8.setFlagsFromString("--expose-gc") | |
| const gc = vm.runInNewContext("gc") | |
| const niceBytes = (bytes) => { | |
| bytes = Number(bytes) |
This file contains hidden or 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
| class Swimmable { | |
| swim() { | |
| console.log("Swam 1 meter") | |
| } | |
| } | |
| class Quackable { | |
| quack() { | |
| console.log("Quack!") | |
| } |
This file contains hidden or 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
| class Swimmable { | |
| constructor() { | |
| this.speed = 1 | |
| } | |
| swim() { | |
| console.log(`Swam ${this.speed} meter(s)`) | |
| } | |
| } |
This file contains hidden or 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 Swimmable = () => ({ | |
| swim() { | |
| console.log("Swam 1 meter") | |
| }, | |
| }) | |
| const Quackable = () => ({ | |
| quack() { | |
| console.log("Quack!") | |
| }, |
This file contains hidden or 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 Swimmable = () => ({ | |
| speed: 1, | |
| swim() { | |
| console.log(`Swam ${this.speed} meter(s)`) | |
| }, | |
| }) | |
| const Quackable = () => ({ | |
| speed: 1, | |
| quack() { |
This file contains hidden or 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
| run({ | |
| part1: { | |
| tests: [ | |
| { | |
| input: `forward 5 | |
| down 5 | |
| forward 8 | |
| up 3 | |
| down 8 | |
| forward 2`, |