Skip to content

Instantly share code, notes, and snippets.

@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active February 28, 2024 10:39
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@kawaz
kawaz / cfn.cue
Last active August 1, 2021 14:08
[CUE](https://cuelang.org/) の練習で CloudFormation のテンプレート定義を適当に書き下してみた。
package cfn
Template:: close({
AWSTemplateFormatVersion?: "2010-09-09"
Transform?: string | [...string]
Description?: string
Metadata?: [string]: Value
Parameters?: [string]: Parameter
Mappings?: [string]: [string]: [string]: _
Conditions?: [string]: Condition
@hermanbanken
hermanbanken / Dockerfile
Last active April 22, 2024 10:53
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
# coding: utf-8
# -*- mode: ruby -*-
Haconiwa.define do |config|
config.name = "haconiwa-h2o"
h2o_conf = unless ENV['STEP2']
"/etc/h2o/h2o.conf"
else
"/etc/h2o/h2o-step2.conf"
end
@nobonobo
nobonobo / docker-tags.sh
Last active September 29, 2016 06:09
dockerリポジトリのtag一覧を引くツール
#!/bin/sh
user=$(dirname $1 | sed 's|\.|library|')
name=$(basename $1)
curl -sL https://registry.hub.docker.com/v2/repositories/$user/$name/tags | jq -r '.results[].name'

前置き

elixir が結局速いのかそうでもないのか検証してみたいから、誰か isucon4 qual のアプリを elixir で。

— そのっつ (SEO Naotoshi) (@sonots) 2015, 9月 5
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

とかてきとうなことをつぶやいていたら、なんと @ma2ge さんが実装してくれました!

@sonots まずは動くところまで作ってみました。手元のマシンですが ruby との比較結果だけ README に載せています。benchmarker は通ったのですがバグなどあるかもしれません。 https://t.co/6WaI4LAbME

— taka (@ma2ge) 2015, 9月 7
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@voluntas
voluntas / yunagido.rst
Last active December 24, 2018 07:43
夕凪堂コトハジメ
@bcantrill
bcantrill / unmarshal.d
Created April 25, 2015 02:43
DTrace on Go running in an LX branded zone on Triton
#pragma D option flowindent
pid$1::encoding*json.Unmarshal:entry
{
self->in = vtimestamp;
}
pid$1::encoding*:entry,
pid$1::encoding*:return
/self->in/
mysql> show processlist;
+----+------+-----------+-------+---------+------+-------------------------+-----------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+------+-----------+-------+---------+------+-------------------------+-----------------------------+
| 2 | root | localhost | mysql | Query | 0 | starting | show processlist |
| 3 | root | localhost | NULL | Query | 13 | Waiting for table flush | FLUSH TABLES WITH READ LOCK |
| 4 | root | localhost | mysql | Query | 4 | Waiting for table flush | SELECT * FROM user |
+----+------+-----------+-------+---------+------+-------------------------+-----------------------------+
3 rows in set (0.00 sec)
@kamipo
kamipo / gist:61ee662ee0b1127f0989
Last active August 28, 2018 01:51
MySQL Unicode Collation Behavior

MySQL Unicode character set has following collations mainly:

  • xxx_bin: compare all characters by these code point as weight.
  • xxx_general_ci: compare almost characters by these code point as weight.
  • xxx_unicode_ci: compare all characters by these collating weight.

ref. http://dev.mysql.com/doc/refman/5.6/en/charset-unicode-sets.html

When xxx is utf8, can treat only BMP characters.