Skip to content

Instantly share code, notes, and snippets.

View djanatyn's full-sized avatar

Jonathan Strickland djanatyn

View GitHub Profile
@djanatyn
djanatyn / Huffman.hs
Last active September 28, 2022 02:40
huffman coding haskell
-- |
-- Haskell implementation of huffman coding lossless compression.
--
-- - <https://engineering.purdue.edu/ece264/17au/hw/HW13?alt=huffman>
module Huffman (Tree (..)) where
import Data.List (group, sort)
-- | Huffman coding tree.
data Tree a where
@djanatyn
djanatyn / example-url.txt
Created September 13, 2022 18:56
lodestone datacenter + home world filters
https://na.finalfantasyxiv.com/lodestone/character/?q=&worldname=Exodus&classjob=&race_tribe=&blog_lang=ja&blog_lang=en&blog_lang=de&blog_lang=fr&order=
@djanatyn
djanatyn / upcoming_events.json
Last active September 13, 2022 18:10
draft format for netplay-bracket-finder
[
{
"slug": "tournament/training-mode-tuesdays-94-lite-edition/event/ladder-melee-east-coast",
"tournament_name": "Training Mode Tuesdays #94 - Lite Edition",
"event_name": "Ladder Melee East Coast",
"image": "https://images.start.gg/images/tournament/479014/image-3d83552d1790de196c38c2f7a1910062.png?ehk=xNQG8Z%2Fdwwp50RK%2FmZl0Rcun0y%2B4ZU%2F9jHwkZ9ik1ks%3D&ehkOptimized=JoOJsELJ%2FXKtVSDroDdCLJ4q%2FhhnOq%2BkWe5Y72sPXZ8%3D",
"entrants": 11,
"start_time": 1663095600
},
{

Simple example posting a comment to a github issue:

#+name: fend-comment
#+begin_example markdown
# hello world
this is a github comment, you can enter any markdown
#+end_example

#+begin_src sh :dir ~/repos/nixpkgs :results output :var body=fend-comment
gh pr comment -R nixos/nixpkgs 124876 -b "$body"
❯ lldb -p 1318777
(lldb) process attach --pid 1318777
Process 1318777 stopped
* thread #1, name = '.dolphin-emu-wr', stop reason = signal SIGSTOP
frame #0: 0x00007f5a8b1b35d9 libc.so.6`__poll + 73
libc.so.6`__poll:
-> 0x7f5a8b1b35d9 <+73>: cmpq $-0x1000, %rax ; imm = 0xF000
0x7f5a8b1b35df <+79>: ja 0x7f5a8b1b3618 ; <+136>
0x7f5a8b1b35e1 <+81>: movl %r8d, %edi
0x7f5a8b1b35e4 <+84>: movl %eax, 0xc(%rsp)
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.12.0/css/tachyons.min.css"/>
<style>
article { padding: 20px; }
</style>
</head>
<body>
<!-- https://tachyons.io/components/collections/albums/index.html -->
@djanatyn
djanatyn / mreader-exploration.md
Created July 2, 2022 15:18
trying out melee subaction unpacker
@djanatyn
djanatyn / approaches-to-haskell-and-nix.md
Created June 16, 2022 21:33
different ways i use haskell and nix
@djanatyn
djanatyn / tweet-smashgg.js
Created June 15, 2022 22:19
idk what start.gg is bookmarklet
javascript:(() => {
var url = document.querySelector('div.sgg3NWWV:nth-child(3) > a:nth-child(1)').href.replace(/(www\.)*start(\.*)gg/g , 'smash$2gg');
window.open(url, '_blank');
})();
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ViewPatterns #-}
module TicTacToe where
import Control.Monad (forever, join)
import Data.List (intersperse, nub, transpose)