Skip to content

Instantly share code, notes, and snippets.

View setup-tramp.el
(require 'tramp)
(eval-after-load 'tramp
'(progn
(setenv "SHELL" "/bin/sh") ; tramp expects something on shell...
(setenv "TMPDIR" "/tmp") ; tramp hates long directory name...
(setq vc-handled-backends '()))) ; tramp freezes...
@tsahara
tsahara / Dockerfile-nghttp2
Last active Aug 29, 2015
Dockerfile for nghttp2 (without ALPN)
View Dockerfile-nghttp2
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libevent-dev libjansson-dev libjemalloc-dev
RUN apt-get install -y curl make gcc git g++
WORKDIR /root
RUN curl -L https://github.com/tatsuhiro-t/nghttp2/releases/download/v0.4.0/nghttp2-0.4.0.tar.bz2 | tar jxf -
WORKDIR /root/nghttp2-0.4.0
RUN autoreconf -i
@tsahara
tsahara / Dockerfile-nghttp2-alpn
Last active Apr 20, 2018
Dockerfile for nghttp2 with ALPN support
View Dockerfile-nghttp2-alpn
FROM ubuntu
RUN apt-get update
RUN apt-get install -y autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libxml2-dev libjansson-dev libjemalloc-dev libev-dev
RUN apt-get install -y make gcc git g++
RUN apt-get install -y curl
#
# OpenSSL 1.0.2a
#
View gist:10440991
mrbgem をひとつだけ削ってビルドした mruby が、起動直後に GC.start した後に malloc(3) で確保しているバイト数
bytes diff
mruby-bin-mirb 276481 0
mruby-bin-mruby 276481 0
mruby-toplevel-ext 275703 -778
mruby-time 274895 -1586
mruby-proc-ext 274326 -2155
mruby-string-ext 272463 -4018
mruby-random 270315 -6166
View gist:10440339
mrbgem をひとつだけ追加してビルドした mruby が、起動直後に GC.start した後に malloc(3) で確保しているバイト数
# gem bytes increase
mruby-bin-mirb 146038 0
mruby-bin-mruby 146038 0
mruby-range-ext 146045 7
mruby-sprintf 146053 15
mruby-numeric-ext 146256 218
mruby-object-ext 146258 220
mruby-print 146679 641
View vagrant-openbsd.md

明示的にサポートしている capability は

  • change_host_name
  • configure_networks
  • halt
  • mount_nfs_folder

linux に(のみ)あるのは

  • insert_public_key : 動いた方がいいんだろうな。
@tsahara
tsahara / vagrant-sakura.md
Last active Dec 20, 2015
vagrant-sakura 開発メモ
View vagrant-sakura.md

リリース

  • lib/vagrant-sakura/version.rb を書き換える

  • CHANGELOG.md を更新する

  • git commit -a

  • rake release で rubygems.org に上がる

  • gem としてのテスト

    #!/bin/sh
    rake build
    
@tsahara
tsahara / a.c
Last active Dec 17, 2015
bit representation of ieee 754 floating point numbers
View a.c
#include <stdio.h>
int
main(int argc, char **argv)
{
float f;
unsigned int i, mask;
f = 1.5;
i = *(unsigned int *)(void *)&f;
for (mask = 1 << 31; mask > 0; mask >>= 1) {