Skip to content

Instantly share code, notes, and snippets.

View tatsuya6502's full-sized avatar

Tatsuya Kawano tatsuya6502

  • Shanghai, China
  • 09:55 (UTC +08:00)
View GitHub Profile
@7shi
7shi / cross1.mk
Created June 26, 2011 22:01
クロスコンパイラを一気に作る
TARGET1 = alpha-elf arc-elf arm-elf avr-elf h8300-elf i386-elf m32r-elf \
m68k-elf pdp11-aout powerpc-elf sh-elf sparc-elf v850-elf xtensa-elf
TARGET2 = mips-elf mips64-elf
TARGET3 = hppa-linux ia64-elf x86_64-linux
TARGET4 = m6811-elf
TARGET5 = strongarm-elf xscale-elf
TARGETS = $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5)
BLDROOT = /build
GMAKE = make
GTAR = tar
anonymous
anonymous / enable-iscsi
Created January 31, 2013 15:58
I wanted to be able to export iscsi volumes from SmartOS and not worry about them changing GUIDs on reboot. The first file goes in /opt/custom/bin and the second in /opt/custom/smf
#!/bin/sh
set -o xtrace
. /lib/svc/share/smf_include.sh
cd /
PATH=/usr/sbin:/usr/bin:/opt/custom/bin:/opt/custom/sbin; export PATH
case "$1" in
@jj1bdx
jj1bdx / Erlang-wx-OSX-ja.md
Last active December 16, 2015 13:19
[ja] Mac OS XのErlang R15B03-1でwxを動かすための方法
@mattconnolly
mattconnolly / gist:6097313
Created July 28, 2013 03:58
Adding a zfs dataset to a SmartOS zone. Seems there's no vmadm api for this, but you can do it with zonecfg:
# vmadm halt <uuid>
# zonecfg -z <uuid>
zonecfg:uuid> add dataset
zonecfg:uuid:dataset> set name=<zfs/path>
zonecfg:uuid:dataset> end
zonecfg:uuid> commit
zonecfg:uuid> exit
# zfs set mountpoint=legacy <zfs/path>
# vmadm boot <uuid>
@andrzejsliwa
andrzejsliwa / output
Created September 12, 2013 07:52
Erlang tracing (nested and flat)
~/erlang_learning $ erl
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]
Eshell V5.9.3.1 (abort with ^G)
(erlang_learning@127.0.0.1)1> trace(recursive).
ok
(erlang_learning@127.0.0.1)2> recursive:fac(10).
call: <0.42.0> recursive:fac(10), level: 0
call: <0.42.0> recursive:fac(9), level: 1
call: <0.42.0> recursive:fac(8), level: 2
@slfritchie
slfritchie / presentation.md
Created March 18, 2014 09:22
Erlang tracing, for the Riak source code reading series, 2014-03-18, Tokyo, Japan

Erlang Tracing: more than you wanted to know

Rough Outline

  • What can be traced?
  • How can trace events be specified?
  • "match specifications": twisty passages, all alike
  • WTF, can I just use DTrace and drink my coffee/beer/whisky in peace?
  • Trace delivery mechanisms: pick one of two
@14427
14427 / hkt.rs
Last active February 7, 2024 10:18
Higher-kinded type trait
use std::rc::Rc;
trait HKT<U> {
type C; // Current type
type T; // Type with C swapped with U
}
macro_rules! derive_hkt {
($t:ident) => {
impl<T, U> HKT<U> for $t<T> {
@marszall87
marszall87 / docker-compose-install.sh
Created September 25, 2015 13:14
Simple script for installing latest Docker Compose on CoreOS >= 717.0.0
#!/bin/bash
mkdir -p /opt/bin
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
;;; -*- coding:utf-8; mode:lisp -*-
(in-package :cl-user)
(defpackage cl-dudga
(:use :cl :lparallel))
(in-package :cl-dudga)
;;; Setting for lparallel
(defparameter *kernel* (make-kernel 4))
@ykst
ykst / lua-nginx-cheatsheet.md
Last active February 7, 2024 15:17
逆引きlua-nginx-module