Skip to content

Instantly share code, notes, and snippets.

View daviehh's full-sized avatar
✍️

daviehh daviehh

✍️
View GitHub Profile
@daviehh
daviehh / obsidian-web-clipper.js
Created March 13, 2022 18:17 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@daviehh
daviehh / blas.jl
Created November 30, 2021 00:14 — forked from staticfloat/blas.jl
include("util.jl")
# First, do OpenBLAS64 vs. OpenBLAS32 testing (should be about the same)
BLAS.lbt_forward(OpenBLAS_jll.libopenblas_path; clear=true)
BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path)
config = BLAS.get_config()
@show gemm_test(3000, 64)
@show gemm_test(3000, 32)
@daviehh
daviehh / regex-japanese.txt
Created July 16, 2021 23:53 — forked from terrancesnyder/regex-japanese.txt
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@daviehh
daviehh / furigana.py
Last active July 17, 2021 01:40 — forked from pixelcort/furigana.py
add furigana to kanji-hiragana pair
import re
f_nx = lambda x: x != ""
def rt_pattern(kanji, hira):
return f"<ruby> {kanji} <rt> {hira} </rt></ruby>"
def to_furigana(kanji, hira):
kana_range = "\u3040-\u30ff"
re_kanj = f"([^{kana_range}]*)"
@daviehh
daviehh / mp3-chapters.md
Created June 30, 2021 16:54 — forked from Bios-Marcel/mp3-chapters.md
Exporting Audacity labels to ID3v2+ chapter marks
@daviehh
daviehh / .bashrc
Created June 16, 2020 20:51 — forked from kevinoid/.bashrc
GnuPG pinentry script for terminal or graphical interface based on $PINENTRY_USER_DATA.
# ~/.bashrc: executed by bash(1) for non-login shells.
# If file exists (likely) copy fragment below into existing script:
# If stdin is a terminal
if [ -t 0 ]; then
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1)
export GPG_TTY="$(tty)"
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI.
export PINENTRY_USER_DATA=USE_TTY=1
@daviehh
daviehh / fedora-nspawn.markdown
Created September 27, 2019 23:07 — forked from jdnavarro/fedora-nspawn.markdown
Bootstrap systemd-nspawn Fedora container from an Arch Linux host

Install yum from AUR

$ yaourt -Sy yum

Add bootstrap repos to /etc/yum.d/boot.repo

[fedora]
name=fedora
baseurl=https://archives.fedoraproject.org/pub/fedora/linux/releases/23/Everything/x86_64/os/
enabled=1
@daviehh
daviehh / lima-agnoster.zsh-theme
Created September 15, 2019 13:44 — forked from brunodles/lima-agnoster.zsh-theme
A simple change on agnoster theme. This will add the time of the last command on the right size.
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline