Skip to content

Instantly share code, notes, and snippets.

@qwjyh
qwjyh / specapi.html
Last active November 23, 2024 07:27
Makie SpecApi with Pluto notebook
<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width"><meta charset="utf-8">
<meta name="pluto-insertion-spot-meta">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white"><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#2a2928"><meta name="color-scheme" content="light dark"><link rel="icon" type="image/png" sizes="16x16" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.20.3/frontend-dist/favicon-16x16.347d2855.png" integrity="sha384-3qsGeVLdddzV9oIkj3PhXXQX2CZCjOD/CiyrPQOX6InOWw3HAHClrsQhPfX9uRAj" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="32x32" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.20.3/frontend-dist/favicon-32x32.8789add4.png" integrity="sha384-cOe5vSoBIgKNgkUL27p9RpsGVY0uBg9PejLccDy+fR8ZD1Iv5dF1MGHjIZAIZwm6" crossorigin="anonymous"><link rel="icon" type="image/png" sizes="96x96" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.20.3/frontend-dist/favicon-96x96.48689391.png" integrity="sh
@qwjyh
qwjyh / README.adoc
Last active April 11, 2024 15:58
Aggregate browser histories(single file script)

Browser History Merger

What is this

Simple script to integrate web browser histories into a single history. The script extracts history from original database file of web browser history, and append it to a "root" database file(sqlite). You can sync the "root" database file among devices to combine histories of browsers on different devices.

Installation

This program depends only on standard libraries of python.

@qwjyh
qwjyh / notebook.jl
Last active April 5, 2024 21:15
Sample Browser History Browser with Julia
### A Pluto.jl notebook ###
# v0.19.40
#> [frontmatter]
#> title = "Playing with Browser History Database"
#> date = "2024-04-06"
#> description = "Inspecting browser history sqlite db with Julia"
#>
#> [[frontmatter.author]]
#> name = "qwjyh"
@qwjyh
qwjyh / mi.jl
Created July 13, 2023 15:14
logo for my instance
using CairoMakie
uzura = Makie.to_font(path_to_font_ttf)
fig = Figure(; resolution = (480, 480), backgroundcolor = (:lightcyan, 0.2))
ax = Axis(
fig[1, 1];
xticksvisible = false, yticksvisible = false, xticklabelsvisible = false, yticklabelsvisible = false,
spinewidth = 0, xgridvisible = false, ygridvisible = false,
limits = (-1, 1, -1, 1),
backgroundcolor = (:lightcyan, 0.5)
@qwjyh
qwjyh / install_aviutl.ps1
Last active September 27, 2022 08:51
AviUtlと基本的なプラグイン(拡張編集/入出力)のインストールを行うスクリプト
# AviUtlと基本的なプラグイン(拡張編集/入出力)のインストールを行うスクリプト
Write-Output "AviUtlと基本的なプラグイン(拡張編集/入出力)のインストールを行います."
Read-Host "スタートメニューへの追加を行う場合は管理者権限で実行してください.(Enterで先に進む/Ctrl+Cで作業を中止する)"
# check requirements
if(!(Get-Command 7z -ErrorAction SilentlyContinue)) {
Write-Output "7zip does not exists!"
Write-Output "Please install 7zip."
exit 1
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="Security">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="System">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="Dell">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="Intel-GFX-Info/Application">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="Intel-GFX-Info/System">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="IntelAudioServiceLog">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
<Select Path="Internet Explorer">*[System[(Level=1 or Level=2 or Level=3)]]</Select>
% print (string list) list
let-block ctx +print-strmatrix smatrix =
% (string list) list -> block-boxes
let-rec smatrix-to-bb ctx smatrix =
% string list -> string
let-rec slist-to-s slist =
match slist with
| [] -> ` `
| x :: xs -> (x ^ #` | `# ) ^ (slist-to-s xs)
in
@qwjyh
qwjyh / mathemph.satyh
Created June 29, 2022 09:50
color in math
let-math \mathemph x =
let color-emph = Color.of-css `#7759b4` in
math-color color-emph x
in
@qwjyh
qwjyh / matrix_ptr.jl
Created June 29, 2022 09:48
get int** in julia
function ptrarray2d(src::Array{Int64, 2})
dst = Array{Ptr{Int64}}(undef, size(src, 1))
for i in 1:size(src, 2)
dst[i] = pointer(src[i,:])
end
dst
end
# g function for wsl/windows git
function g
if string match -rq '/mnt/*' $PWD
git.exe $argv
else
git $argv
end
end