Skip to content

Instantly share code, notes, and snippets.

View exoego's full-sized avatar
๐Ÿ 
Working from home

TATSUNO โ€œTazโ€ Yasuhiro exoego

๐Ÿ 
Working from home
View GitHub Profile
@exoego
exoego / testing-podman-applehv.md
Created August 5, 2024 10:33 — forked from jfrantzius/testing-podman-applehv.md
Testing Podman applehv with Docker Compose + Testcontainers

Background on applehv vs. qemu

Podman with QEMU virtualization on Mac comes with a big performance-penalty for bind-mounts, see containers/podman#16994 .

As of 25.1.24, virtualization with Apple Hypervisor is available with the Podman Desktop pre-release 1.7.3

This Gist is supposed to keep track of how to install it and test it with Docker Compose and Testcontainers.

Known problems of 4.9.0

Beware that as of 26.1.24, containers/podman#21288 means that a reboot of the host (e.g. laptop) will invalidate the applehv machine, and the only known workaround is to delete and recreate it! The fix is already merged into main, but hasn't made it into 4.9.0

@exoego
exoego / github-longer-status-list.css
Created August 18, 2023 13:55
GitHub Longer status list
@-moz-document regexp("https://github\\.com/.+/pull/.+") {
.merge-status-list {
max-height: 600px !important;
}
.merge-status-list .merge-status-item {
padding: 4px 2px !important;
}
}
@exoego
exoego / README.txt
Created August 17, 2023 03:09
Karabiner-elements long press (long hold) example
1. Put this file `~/.config/karabiner/assets/complex_modifications` and edit
2. Open Karabiner-Elements settings
3. Open "Complex Modifications"
4. Click "Add rule"
5. Enable "Demo > Control + R long press"
6. Test it (Hold `Control + R`)
@exoego
exoego / cli.sh
Created April 13, 2023 01:23
GitHub CLI to filter PRs
#!/bin/bash
# Equivalent to "author:exoego is:merged created:>2022-02-28" in Web UI
gh search prs --limit=1000 --author=exoego --created=">2022-02-28" --merged -- -user:exoego -user:scala-steward-org
@exoego
exoego / ignore-lambda-version-with-jest-cdk-snapshot.ts
Created March 23, 2023 07:40
How to ignore AWS::Lambda::Version with jest-cdk-snapshot
import * as cdk from "aws-cdk-lib";
export function getSubsetResourceTypes(stack: cdk.Stack): string[] {
const subResources = stack.node.children.map((child) => child.node.defaultChild as unknown as cdk.CfnResource | undefined);
return subResources.map((sub) => sub?.cfnResourceType).filter((t) => t !== undefined) as string[];
}
expect(lambdaStack).toMatchCdkSnapshot({
ignoreAssets: true,
subsetResourceTypes: getSubsetResourceTypes(stack.lambda).filter((t) => t !== "AWS::Lambda::Version"),
@exoego
exoego / ruby-version-crawler.sh
Last active March 16, 2022 02:49
Fetch .ruby-version in company repo
#!/bin/zsh
OWNER=my-company
gh search repos \
--owner=$OWNER \
--language=ruby \
--visibility=private \
--archived=false \
--json="name,defaultBranch" \
@exoego
exoego / action.yaml
Created November 25, 2021 06:57
GitHub Actions to update Rust aws-sdk crates
name: Update AWS SDK crates daily
on:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
Go 19 hrs 30 mins โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 67.0%
Kotlin 2 hrs 56 mins โ–ˆโ–ˆโ–โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 10.1%
TOML 2 hrs 11 mins โ–ˆโ–Œโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 7.5%
YAML 1 hr 2 mins โ–‹โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 3.6%
Markdown 56 mins โ–‹โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 3.3%
@exoego
exoego / I'm an early ๐Ÿค
Last active April 22, 2025 00:52
I'm an early
๐ŸŒž Morning 456 commits โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 29.6%
๐ŸŒ† Daytime 554 commits โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 36.0%
๐ŸŒƒ Evening 502 commits โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Šโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 32.6%
๐ŸŒ™ Night 29 commits โ–โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 1.9%
@exoego
exoego / FooTest.scala
Last active September 5, 2017 01:21
ScalaJS ใง js.Object ใชใ‚ฏใƒฉใ‚นใฎใ‚คใƒณใ‚นใ‚ฟใƒณใ‚นใ‚’็”Ÿๆˆใ—ใฆใ€ใใฎLongๅž‹ใฎใƒ•ใ‚ฃใƒผใƒซใƒ‰ใ‚’ๅ‚็…งใ™ใ‚‹ใจUndefinedBehaviorError
import org.scalatest.{ FunSpec, Matchers }
import scala.scalajs.js
@js.native
trait Foo extends js.Object {
val sizeBytes: Long = js.native
}
object Foo {
def apply(sizeByte: js.UndefOr[Long] = js.undefined): Foo = {