Skip to content

Instantly share code, notes, and snippets.

View home.js
let as = document.getElementsByTagName('a')
let now = Date.now();
for (let item of as) {
let href = item.getAttribute('href');
let last = localStorage.getItem(href);
let days_ago = (now - last)/1000/60/60/24;
let h = 190;
// if (days_ago > 20) { h = 90; }
let s = days_ago > 1 ? 20 : 20 + 60 * (1 - days_ago);
View french.pgn
[Event "Rated Blitz game"]
[Site "https://lichess.org/rWcdlWB6"]
[Date "2020.05.13"]
[Round "-"]
[White "makokha"]
[Black "Freddy13"]
[Result "1-0"]
[UTCDate "2020.05.13"]
[UTCTime "21:00:17"]
[WhiteElo "1861"]
View 01-prettiest.raku
#!/usr/bin/env raku
my @void = <area base br col command embed hr img input keygen link meta param source track wbr>;
grammar H {
rule TOP { <block> }
rule block {
| '<' <tag> '>' <block>* '</' $<tag> '>'
| '<' $<void>=[ @void '/'? ] '>'
| <text>
View swindle.pgn
[Site "Lovett Library"]
[Date "2020.02.12"]
[Result "1-0"]
[White "Brian Duggan"]
[Black "Justin"]
1. d4 Nf6 2. Nf3 d6 3. Bf4 e6 4. Nbd2 b6
5. e3 Nh5 6. Bg3 Be7 7. Bd3 Nxg3 8. hxg3 h6
9. Qe2 Bb7 10. c4 Nd7 11. e4 O-O 12. O-O-O c5
13. d5 a6 14. Nh4 Bxh4 15. Rxh4 Ne5 16. Bb1 b5
View swindle.pgn
[Event "Fischer - Spassky World Championship Match"]
[Site "Reykjavik ISL"]
[Date "1972.07.11"]
[EventDate "?"]
[Round "1"]
[Result "1-0"]
[White "Boris Spassky"]
[Black "Robert James Fischer"]
[ECO "E56"]
[WhiteElo "?"]
View swindle.pgn
[Site "Lovett Library"]
[Date "2020.02.12"]
[Result "1-0"]
[White "Brian Duggan"]
[Black "Justin"]
1. d4 Nf6 2. Nf3 d6 3. Bf4 e6 4. Nbd2 b6
5. e3 Nh5 6. Bg3 Be7 7. Bd3 Nxg3 8. hxg3 h6
9. Qe2 Bb7 10. c4 Nd7 11. e4 O-O 12. O-O-O c5
13. d5 a6 14. Nh4 Bxh4 15. Rxh4 Ne5 16. Bb1 b5
View carlsen-scandi.pgn
[Event "Chess Olympiad"]
[Site "Tromso NOR"]
[Date "2014.08.08"]
[EventDate "2014.08.02"]
[Round "6.3"]
[Result "0-1"]
[White "Fabiano Caruana"]
[Black "Magnus Carlsen"]
[ECO "B01"]
[WhiteElo "2801"]
View smother.pgn
[Event "Rated Bullet game"]
[Site "https://lichess.org/lMfUWjwH"]
[Date "2019.01.18"]
[Round "-"]
[White "akxonil"]
[Black "makokha"]
[Result "0-1"]
[UTCDate "2019.01.18"]
[UTCTime "00:52:58"]
[WhiteElo "1568"]
View ICal.pm6
grammar ical {
rule TOP {
<vcalendar>
}
rule vcalendar {
<section>
\n?
}
# section does not end with a NL
rule section {