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
return { | |
{ | |
"stevearc/conform.nvim", | |
opts = { | |
formatters_by_ft = { | |
["_"] = { "caddy_fmt" }, | |
}, | |
formatters = { | |
caddy_fmt = { |
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
#! /usr/bin/env bash | |
# if you have gh and jq installed | |
gh api \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
/repos/OWNER/REPO/topics \ | |
| jq -r '.names[]' |
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
/* | |
* ------------------------------------------------------------ | |
* "THE COFFEEWARE LICENSE" (Revision 03): | |
* <author> wrote this code. As long as you retain this | |
* notice, you can do whatever you want with this stuff. If we | |
* meet someday, and you think this stuff is worth it, you can | |
* buy me a coffee in return. | |
* ------------------------------------------------------------ | |
*/ |
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
curl -s 'https://api.waifu.im/search?is_nsfw=false&included_tags=waifu' \ | |
| jq '.images.[].url' | |
# Tags: | |
# waifu | |
# maid | |
# marin-kitagawa | |
# mori-calliope | |
# raiden-shogun | |
# selfies |
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
curl -s https://api.waifu.pics/sfw/waifu \ | |
| jq '.url' \ | |
| xargs wget -nv 2>&1 \ | |
| perl -npe 's/.*"([^"]+)".*/$1/' \ | |
| xargs wezterm imgcat |
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
# Removes all lines containing `string` from input.txt and prints the result to STDIN | |
sed '/string/d' input.txt | |
# Overwrites the file with the modification | |
sed '/string/d' input.txt > input.txt | |
# Overrite inplace (Doens't work wth GNU sed, only MacOS & BSD sed) | |
sed -i '' '/string/d' input.txt | |
# GNU sed version | |
sed -i '/string/d' input.txt |
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
from graphviz import Digraph | |
import argparse | |
class TreeNode: | |
def __init__(self): | |
self.children = {} | |
self.indexes = [] | |
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
curl https://a.4cdn.org/[board]/thread/[thread].json \ | |
| jq ' | |
.posts[] | |
| if .tim != null then [.tim, .ext] else empty end | |
| map(tostring) | |
| "https://i.4cdn.org/[board]/" + .[0] + .[1]' | |
# Replace [board] and [thread] with board name and thread id respectively | |
# Output: | |
# "https://i.4cdn.org/w/1716958855504120.png" |
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
function 4get -a THREADURL -a OUTPUTDIR --description 'Get all the pictures in a 4chan thread' | |
if string-empty $THREADURL | |
echo "Must provide a thread URL" | |
return | |
end | |
if string-empty $OUTPUTDIR | |
set OUTPUTDIR "." | |
end | |
mkdir -p $OUTPUTDIR |
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
import localFont from 'next/font/local' | |
// path -> "src/app/" | |
const lineSeedSans = localFont({ | |
src: [ | |
{ | |
path: './LINESeedSans_W_Bd.woff2', | |
weight: '700', | |
style: 'bold', | |
}, |