Skip to content

Instantly share code, notes, and snippets.

@radarroark
radarroark / next-gen-sqlite.md
Last active January 22, 2026 13:54
The next-gen SQLite won't look like SQLite

SQLite was thought of as a toy for many years until we all realized it was actually nice to use a database as a library, even server-side. And yet...

  1. It's a big dependency, despite what you think. In no universe is 150,000 lines of C code "lightweight".
  2. Like with all SQL databases, you have an impedance mismatch: the way you store data in memory is completely different than the table structure a SQL database forces on you, leading to tons of glue code.
  3. It's mutable, so it can't undo or time travel, and it can't read while a write is happening (even in WAL mode...reads can't happen during checkpointing!).

To solve these problems, I'm building a database called xitdb. It has ports for several languages:

@alper
alper / claude-jj.md
Created June 4, 2025 22:45
CLAUDE-JJ.md

CLAUDE.md – JJ Quick Command List

A minimal cheat‑sheet of the day‑to‑day Jujutsu (jj) commands you (or an agent) really need.

Purpose Command What it does
See changes jj status Show working‑copy commit and staged/unstaged file modifications
Browse history jj log One‑line graph of commits; add -r : --git to include Git hashes
Diff current work jj diff Compare working‑copy commit to its parent (like git diff)
Start a new change jj new Fork a fresh change from @ (no checkout dance)
@codebytes
codebytes / DevMachineSetup.ps1
Last active May 5, 2025 14:22
DevMachineSetup
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@hyuki
hyuki / twitter-markdown.rb
Last active July 21, 2022 10:33
twitter-markdown.rb - convert tweet to markdown.
#!/usr/bin/env ruby
# encoding: utf-8
require 'twitter'
require 'open-uri'
require 'date'
require 'uri'
# $ grep TWITTER_MARKDOWN ~/.bash_profile
# export TWITTER_MARKDOWN_consumer_key=XXXXXXXXXXXXXXXXXXXXXXXXXXX
@WorldDownTown
WorldDownTown / append_google_sheets.sh
Last active December 20, 2022 02:04
Google Sheets の最終行に追記するスクリプト
#!/bin/bash
# Google Sheets の最終行に追記するスクリプト
# 訳あって最終行の位置を特定するために行数を取得している
# OAuth周りは下記がわかりやすい
# https://qiita.com/shin1ogawa/items/49a076f62e5f17f18fe5
CLIENT_ID="Google API ClientID"
CLIENT_SECRET="Google API's client secret"
REFRESH_TOKEN="Google API's refresh token"
@sile
sile / README.md
Last active January 18, 2026 16:22
Optunaを使ってFFmpegのエンコードパラメータを最適化してみる

概要

  • Optunaというハイパーパラメータ最適化ツールを使って、FFmpegでの動画エンコードパラメータの最適化を試してみた結果のメモ
  • 具体的には、決められた制約(後述)下で、画質(SSIM)を最大化するようなパラメータ群を自動で見つけ出すのが目的
  • 結果としては、
    • 画質的には、FFmpegが提供しているプリセットの中で二番目に重いもの(slower)より若干良い程度のパラメータ群が見つかった
    • また、Optunaが見つけたパラメータ群の方がslowerに比べて、CPU負荷が小さかった

方針

# Based on
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9
#--- Uninstall unnecessary applications that come with Windows out of the box ---
# Microsoft
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage
@amit-chahar
amit-chahar / download-script.sh
Last active February 20, 2023 12:57
Scirpt to download files from Google drive using curl (Detailed explanation can be read here: https://stackoverflow.com/a/49444877/4043524)
#!/bin/bash
fileid="FILEIDENTIFIER"
filename="FILENAME"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
@imksoo
imksoo / itamae_environment.md
Created April 5, 2017 06:27
Itamaeで擬似的にEnvironmentを再現する

Itamaeで擬似的にEnvironmentを設ける時の書き方

Itamae実行時にノードアトリビュートを与えて実行する(itamae -y node.yaml recipe.rb or itamae -j node.json recipe.rb)が、 そのノードアトリビュート内部で擬似的にEnvironment変数を設定しておく。

# nodes/hogehoge-web-server.yaml
environment: development
cookbooks:
    - dnsmasq
@alexjebens
alexjebens / ghost-network-adapters-powershell.ps1
Last active January 22, 2023 22:55
Remove Ghost Network Adapters with PowerShell only
$T = @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Win32
{
public static class SetupApi
{
// 1st form using a ClassGUID only, with Enumerator = IntPtr.Zero