Skip to content

Instantly share code, notes, and snippets.

View knu's full-sized avatar

Akinori Musha knu

  • Tokyo, Japan
  • 15:24 (UTC +09:00)
  • X @knu
View GitHub Profile
@pojntfx
pojntfx / main.sh
Last active March 19, 2024 03:03
Bluesky/AT Protocol: cURL API Interaction Cheatsheet
#!/bin/bash
# This script resolves a DID, retrieves an API key, fetches a user's feed,
# and posts a "Hello, world" message to the user's feed.
# Resolve DID for handle
HANDLE='felicitas.pojtinger.com'
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
export DID=$(curl -G \
--data-urlencode "handle=$HANDLE" \
@jjb
jjb / file.md
Last active May 9, 2024 06:26
Using Jemalloc 5 with Ruby.md

For years, people have been using jemalloc with ruby. There were various benchmarks and discussions. Legend had it that Jemalloc 5 didn't work as well as Jemalloc 3.

Then, one day, hope appeared on the horizon. @wjordan offered a config for Jemalloc 5.

Ubuntu/Debian

FROM ruby:3.1.2-bullseye
RUN apt-get update ; \
@k-tsj
k-tsj / update-ruby-trunk-changes-notes.sh
Last active December 31, 2018 04:10
update-ruby-trunk-changes-notes.sh
#!/bin/sh
# Usage:
# update-ruby-trunk-changes-notes.sh YYYY-MM-DD
export LANG=en_US.UTF-8
REPOSDIR=/var/working/ruby-trunk-changes-notes
TMPDIR=/tmp/ruby-trunk-changes
URL_PREFIX='https://ruby-trunk-changes.hatenablog.com/archive/'