Skip to content

Instantly share code, notes, and snippets.

@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active April 25, 2024 15:30
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

@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 && \
@achillean
achillean / ssh-fingerprints.csv
Created February 17, 2015 20:11
Top 1,000 Duplicate SSH Fingerprints on the Internet
dc:14:de:8e:d7:c1:15:43:23:82:25:81:d2:59:e8:c0 245272
32:f9:38:a2:39:d0:c5:f5:ba:bd:b7:75:2b:00:f6:ab 197846
d0:db:8a:cb:74:c8:37:e4:9e:71:fc:7a:eb:d6:40:81 152046
34:47:0f:e9:1a:c2:eb:56:eb:cc:58:59:3a:02:80:b6 140777
df:17:d6:57:7a:37:00:7a:87:5e:4e:ed:2f:a3:d5:dd 91904
81:96:a6:8c:3a:75:f3:be:84:5e:cc:99:a7:ab:3e:d9 80499
7c:a8:25:21:13:a2:eb:00:a6:c1:76:ca:6b:48:6e:bf 78172
1c:1e:29:43:d2:0c:c1:75:40:05:30:03:d4:02:d7:9b 71851
8b:75:88:08:41:78:11:5b:49:68:11:42:64:12:6d:49 70786
c2:77:c8:c5:72:17:e2:5b:4f:a2:4e:e3:04:0c:35:c9 68654
@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
@voluntas
voluntas / yunagido.rst
Last active December 24, 2018 07:43
夕凪堂コトハジメ
@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.

digraph autoconf_automake {
graph [ fontname = "Helvetica" fontsize = 12 ]
node [ fontname = "Helvetica" fontsize = 12 shape = "box"
style=filled fillcolor=palegreen
]
edge [ fontname = "Helvetica" fontsize = 12 ]
aclocal_m4 [label="aclocal.m4"]
config_h_in [label="config.h.in"]
config_h [label="config.h"]

前置き

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>
@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/
# 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