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
(ns luaxer.core | |
(:require | |
[cheshire.core :as json] | |
[clojure.string :as string])) | |
(defn- lexer-error [message pos] | |
(throw (ex-info (str "Lexer Error: " message) {:position pos}))) | |
(defn- lexer [source] | |
(let [source (string/trim source) |
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
#!/usr/bin/env bash | |
if [[ "$#" -ne 2 && "$#" -ne 3 ]]; then | |
echo "Usage: $0 <class> <file> [line]" | |
echo " <class>: The window class for ghostty/Neovim" | |
echo " <file>: The file to open" | |
echo " [line]: Optional. The line number to open the file at" | |
exit 1 | |
fi |
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 * as cheerio from "cheerio"; | |
const url = "https://kdkjudo.org/%E6%8A%80/%E6%9F%94%E9%81%93-%E6%8A%80%E5%90%8D%E7%A7%B0%E4%B8%80%E8%A6%A7/"; | |
const main = async () => { | |
const resp = await fetch(url); | |
const html = await resp.text(); | |
const $ = cheerio.load(html); |
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
package camera | |
import "core:fmt" | |
import "core:math" | |
import rl "vendor:raylib" | |
PixelCamera :: struct { | |
screen_width: i32, | |
screen_height: i32, | |
virtual_screen_width: i32, |
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
--[[ | |
Go-like errors for Lua | |
Copyright (c) 2023 Christopher Kaster | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
#!/usr/bin/env python3 | |
# Currently this is used for Detective Conan if you want to use this for another show just edit the "fillers" | |
# variable below | |
import re | |
import os | |
import sys | |
# copied from https://www.animefillerlist.com/shows/detective-conan |
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
# In some scenarios for instance when using Python as a plugin language you can't just pip install something, instead | |
# you need to put the dependencies in a vendor directory instead which however usually means that you have to adjust paths | |
# sometimes even in the dependency which is a pain, wouldn't it be nice to just "import DEPENDENCY" like if you just had | |
# installed it via pip install? | |
# To do this, put into your entry point (for instance the primary __init__.py the following piece of code RIGHT | |
# at the start: | |
import os | |
import sys |
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
<!-- | |
# Anki Dictionary Switcher | |
https://gist.github.com/atomicptr/3c7bf0bb21cbe9cbbf1ee40574800c7f | |
Switch between multiple dictionaries (added by Yomichan for instance) instead of seeing all of them at once. | |
Keep in mind you need to edit your HTML structure to look like what we have here: | |
--> |
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 React, { CSSProperties, ReactNode, RefObject, useEffect, useRef } from "react"; | |
import AutoSizer from "react-virtualized-auto-sizer"; | |
import { ListChildComponentProps, VariableSizeList } from "react-window"; | |
interface VirtualizedListProps { | |
count: number; | |
subtractFromHeight?: number; | |
defaultRowHeight?: number; | |
renderItems: (rowRef: RefObject<HTMLDivElement>, index: number, style?: CSSProperties) => ReactNode; | |
} |
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 fs = require("fs"); | |
const fsp = require("fs").promises; | |
const https = require("https"); | |
const path = require("path"); | |
const yaml = require("js-yaml"); | |
const mapEn = require("../.map/names.json"); | |
const dataEn = require("../public/data.json"); | |
const language = "fr"; |
NewerOlder