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 { DatabaseSync } from "node:sqlite"; | |
export class Fetcher { | |
private database: DatabaseSync; | |
constructor() { | |
this.database = new DatabaseSync('cache.db', { open: true }); | |
this.database.exec(` | |
CREATE TABLE IF NOT EXISTS cache ( | |
uri TEXT PRIMARY KEY, |
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
// ==UserScript== | |
// @name Classical Syriac Wikipedia to Hebrew | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-04-08 | |
// @description Convert Classical Syriac text to Hebrew script on Wikipedia | |
// @author [email protected] | |
// @match https://arc.wikipedia.org/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=wikipedia.org | |
// @grant none | |
// ==/UserScript== |
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 moment from "https://deno.land/x/[email protected]/mod.ts"; | |
import { parse } from "https://deno.land/[email protected]/flags/mod.ts"; | |
export const DELIMITER = "隔"; | |
interface DailyCommits { | |
start: moment.Moment; | |
end: moment.Moment; | |
commits: number; | |
messages: string[]; |
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
const randomize = (min: number, max: number) => | |
Math.floor(Math.random() * (max - min + 1)) + min; | |
export const mapMulti = (val1: number, val2?: number) => { | |
let iterator: () => unknown[]; | |
if (typeof val2 === "undefined") { | |
const arr = Array.from({ length: val1 }); | |
iterator = () => arr; | |
} else { | |
iterator = () => Array.from({ length: randomize(val1, val2) }); |
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
// npm install fast-glob | |
// wget https://github.com/ETCBC/peshitta/archive/refs/tags/v0.5.zip && unzip v0.5.zip | |
const fg = require("fast-glob"); | |
const path = require("path"); | |
const fs = require("fs"); | |
const SyriacMap = { | |
ܐ: /* Aleph */ "א", | |
ܒ: /* Beth */ "ב", |
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
# Install packages | |
sudo pacman -S interception-tools interception-caps2esc --noconfirm | |
# Enabled udevmon service | |
sudo systemctl enable --now udevmon | |
# Restart when udevmon.yaml changes | |
sudo systemctl restart udevmon.service |
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/node | |
// @ts-check | |
import { execSync } from "child_process"; | |
function getScreens() { | |
const screen_pattern = "([0-9]+)x([0-9]+)\\+([0-9]+)\\+([0-9]+)"; | |
const screen_regexp = new RegExp(screen_pattern, "gm"); | |
const screen_lines = execSync( | |
`xrandr --current | grep -oP "${screen_pattern}"`, | |
{ |
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
<div class="container"> | |
<div class="parent"> | |
<div class="child">1</div> | |
<div class="child">2</div> | |
<div class="child">3</div> | |
</div> | |
</div> | |
<div class="container" dir="rtl"> | |
<div class="parent"> |
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
ZSH_THEME="bira" | |
DISABLE_AUTO_UPDATE="true" | |
source <(antibody init) | |
antibody bundle robbyrussell/oh-my-zsh kind:dummy | |
export ZSH=$(antibody path robbyrussell/oh-my-zsh) | |
antibody bundle robbyrussell/oh-my-zsh | |
antibody bundle robbyrussell/oh-my-zsh path:plugins/git | |
antibody bundle robbyrussell/oh-my-zsh path:plugins/pip |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array> | |
<string>proto</string> | |
</array> | |
<key>keyEquivalent</key> | |
<string>^~P</string> |
NewerOlder