Skip to content

Instantly share code, notes, and snippets.

View CotesiaFlowers's full-sized avatar

Abigail C. Stringfellow CotesiaFlowers

View GitHub Profile
p='/n/irc';t=$2;n=$3;bind '#|' $p;aux/trampoline tcp!$1!6667<>$p/data1>[1=0]&
cat $p/data|tr -d '\x2\x8\xd\x1f'| print &
{echo USER $user a b :$user;echo NICK $n;echo JOIN $t}>$p/data
while(i=`{read}){if(~ /! $i(1))echo $i|sed 's/^\/! //'>$p/data;if not echo 'PRIVMSG '$t' :'$i>$p/data}
@CotesiaFlowers
CotesiaFlowers / EsobotPuzzleHinduTemple.dyalog
Last active December 29, 2024 17:25
Esobot Puzzle - Hindu Temple
_cmp←{⍺∘.(⍺⍺{⍺(∧.⍺⍺)⍥((⎕UCS¯1⎕C⊢)¨)⍵:⍺,⍵⋄''})⍵}
c←~∘(⊂'')
HinduTemple ← {
⊃,/{
p ←c,(3⊃⍵) >_cmp 4⊃⍵
p2←c,p >_cmp 5⊃⍵
p3←c,(2⊃⍵) <_cmp 3⊃⍵
p4←c,(1⊃⍵) <_cmp p3
c,p4∘.{(⊃⌽⍺)≡⊃⍵:⍺,1↓⍵⋄''}p2
}¨5,⍥⊆/' '(≠⊆⊢)⍵
require 'open-uri'
require 'nokogiri'
url = 'https://en.wikipedia.org/wiki/List_of_tabletop_role-playing_games'
puts Nokogiri::HTML.parse(URI.open(url)).xpath("//table").first.css('tr > td[1]').text
DEL ← { ⍝ DOM element language
Depths ← {(~⍵∊'[],')/+\-⌿'[]'∘.=⍵} ⍝ nesting depths of non-syntax characters
Params ← (⊣,',',⊢)/
Call ← {'a(','N`',⍺,'`,',⍵,')'} ⍝ format with JavaScript calling syntax
(Params Call¨) / ({(1,2≠/⍵)/⍵}⍤Depths ⊂⍤⊢⌸ (1,2≠/Depths)⊂syntax/⊢)⍵
}
⍝ 'div[span["author"],span["message"]]'
⍝ -> a(N`div`,a(N`span`,"author"),a(N`span`,"message"))
#!/bin/sh
# shellcheck disable=SC2034,SC2154
# Uses jq, openssl, dd, awk
DISCORD_URL="discord.com"
DISCORD_API_VERSION="10"
CRLF="$(printf '\r\n_')"