Skip to content

Instantly share code, notes, and snippets.

Avatar
✍️

daviehh daviehh

✍️
View GitHub Profile
View regex-japanese.txt
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 Jul 17, 2021 — forked from pixelcort/furigana.py
add furigana to kanji-hiragana pair
View furigana.py
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 Jun 30, 2021 — forked from Bios-Marcel/mp3-chapters.md
Exporting Audacity labels to ID3v2+ chapter marks
View mp3-chapters.md
@daviehh
daviehh / .bashrc
Created Jun 16, 2020 — forked from kevinoid/.bashrc
GnuPG pinentry script for terminal or graphical interface based on $PINENTRY_USER_DATA.
View .bashrc
# ~/.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 / profile_sa.jl
Created Jun 4, 2020
profile stat. array
View profile_sa.jl
using StaticArrays
using Profile
using Juno
function g!(r,a,b,c,d)
@. r = a + 5 * b + 3 * c - d
end
View test_1
[ Info: 1st call
10-element Array{Float64,1}:
0.2972879845354616
0.3823959677906078
-0.5976344767282311
-0.01044524463737564
-0.839026854388764
0.31111133849833383
2.2950878238373105
-2.2670863488005306
@daviehh
daviehh / using exa -T
Last active Nov 18, 2019
library path diff
View using exa -T
/Users/david/code/julia_mkl/julia/julia-1.3.0-rc5/lib
├── julia
│ ├── libamd.2.4.6.dylib
│ ├── libamd.2.dylib -> libamd.2.4.6.dylib
│ ├── libamd.dylib -> libamd.2.4.6.dylib
│ ├── libcamd.2.4.6.dylib
│ ├── libcamd.2.dylib -> libcamd.2.4.6.dylib
│ ├── libcamd.dylib -> libcamd.2.4.6.dylib
│ ├── libccalltest.dylib
│ ├── libccolamd.2.9.6.dylib
@daviehh
daviehh / log
Created Oct 15, 2019
julia 1.2.0 macOS build
View log
> git checkout v1.2.0 -B release-1.2 05:55:14 PM
Switched to a new branch 'release-1.2'
05:55:20 PM
> make 05:55:26 PM
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 497 100 497 0 0 2218 0 --:--:-- --:--:-- --:--:-- 2218
100 2005k 100 2005k 0 0 2340k 0 --:--:-- --:--:-- --:--:-- 2340k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
@daviehh
daviehh / fedora-nspawn.markdown
Created Sep 27, 2019 — forked from jdnavarro/fedora-nspawn.markdown
Bootstrap systemd-nspawn Fedora container from an Arch Linux host
View fedora-nspawn.markdown

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 Sep 15, 2019 — 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.
View lima-agnoster.zsh-theme
# 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