Skip to content

Instantly share code, notes, and snippets.

View zchee's full-sized avatar
😩
want to Go knowledge...

Koichi Shiraishi zchee

😩
want to Go knowledge...
View GitHub Profile
@zchee
zchee / gist:4f15d98dfcc802af3ad7
Created November 16, 2015 07:37 — forked from poutyface/gist:1223553
QEMU: 仮想ボード ARM Cortex-A9 マルチコアで Linux を動かす
モチベーション
---------------
Androidのエミュレータは中でQEMUを使ってる
中で使われているので、Android開発とは直接関係がないけど、
素のQEMUの使い方を知る。
* QEMUの使い方を覚える
* Linuxをエミュレータ環境で動かしてみる
* ARM のクロス環境に慣れてみる
@zchee
zchee / osx-for-hackers.sh
Created November 29, 2015 19:03 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@zchee
zchee / xhyve-freebsd-tutorial-1.md
Created December 6, 2015 01:31 — forked from tanb/xhyve-freebsd-tutorial-1.md
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@zchee
zchee / xhyve-nextbsd-tutorial.md
Created December 6, 2015 02:35 — forked from tanb/xhyve-nextbsd-tutorial.md
NextBSD running on xhyve.

NextBSD Running on Xhyve.

  _   _           _   ____ ____  ____
 | \ | | _____  _| |_| __ ) ___||  _ \
 |  \| |/ _ \ \/ / __|  _ \___ \| | | |
 | |\  |  __/>  <| |_| |_) |__) | |_| |
 |_| \_|\___/_/\_\\__|____/____/|____/

                                              ```                        `
 s` `.....---.......--.``` -/
@zchee
zchee / main.go
Created December 15, 2015 13:47 — forked from mattn/main.go
GOPATH 内の git リポジトリで全部 git gc するやつ
package main
import (
"log"
"os"
"os/exec"
"path/filepath"
"strings"
)
@zchee
zchee / get-aws-ec2-images.sh
Created December 22, 2015 10:18 — forked from sechiro/get-aws-ec2-images.sh
Amazon公式、Canonical公式と自分のAMIの一覧を出力するスクリプト(出力を300秒キャッシュ)
#!/bin/bash
set -ue
prefix=`basename $0`
timestamp_file=/tmp/$prefix.timestamp
cache_file=/tmp/$prefix.cache
timestamp=`date '+%s'`
cache_time=300
if [ "${1:-''}" = "nocache" ];then
@zchee
zchee / ohruri.py
Created December 26, 2015 17:35 — forked from lindwurm/ohruri.py
Ohruri generate script.
#!/usr/bin/env fontforge -lang=py -script
# -*- coding: utf-8 -*-
import fontforge
from datetime import date
# Open Sans のあるディレクトリのパス
opensans_path = "./Open_Sans"
# Mgen+ のあるディレクトリのパス
@zchee
zchee / main.go
Created December 26, 2015 23:02 — forked from Jxck/main.go
interface of Go blog sample
package main
/*
Go のインタフェース設計
参考
https://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers
http://jordanorelli.tumblr.com/post/32665860244/how-to-use-interfaces-in-go
http://research.swtch.com/interfaces
http://www.airs.com/blog/archives/277
@zchee
zchee / neovim_colorscheme_patcher.rb
Created December 27, 2015 00:50 — forked from metalelf0/neovim_colorscheme_patcher.rb
Neovim colorscheme patcher to add 24bit colors to terminal
#!/usr/bin/env ruby
class VimColorscheme
attr_accessor :file_path
def initialize(file_path)
@file_path = file_path
end
def extract_colors
@zchee
zchee / daemon.go
Created December 30, 2015 05:54 — forked from hironobu-s/daemon.go
Goでデーモンを起動する的な
package main
import (
"flag"
"fmt"
"log"
"os"
"os/exec"
"os/signal"
"syscall"