Skip to content

Instantly share code, notes, and snippets.

View ksato9700's full-sized avatar

Ken Sato ksato9700

View GitHub Profile
@ksato9700
ksato9700 / systolic_array.go
Created May 19, 2012 14:17
Systolic array simulator implementation in Go
package main
import "fmt"
const SIZE = 3
//
// CalcCell
//
type CalcCell struct {
ain, bin, aout, bout, cout chan int
@ksato9700
ksato9700 / client.coffee
Created September 16, 2012 03:16
mocha iterative test case example
class Client
constructor: (name, ready)->
setTimeout =>
@name = name
ready()
, 1000
exports.Client = Client
@ksato9700
ksato9700 / gist:6876505
Created October 7, 2013 23:03
Ubuntu release upgrade
$ sudo apt-get install update-manager-core
$ sudo do-release-upgrade -d
@ksato9700
ksato9700 / file0.txt
Created October 20, 2013 01:01
homebrew-caskを使ってKobitoをインストール ref: http://qiita.com/ksato9700/items/cf9430a9a04cab1a5be6
$ brew tap phinze/homebrew-cask
$ brew install brew-cask
$ brew cask install kobito
@ksato9700
ksato9700 / 0_reuse_code.js
Created March 23, 2014 21:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
index=$1
HOST=127.0.0.1
PR_PORT=$(expr 7000 + $index)
MY_PORT=$(expr 4000 + $index)
if [ $index -gt 1 ]
then
PEERS="-peers "
for i in $(seq 2 $index)
do
@ksato9700
ksato9700 / gist:11131309
Created April 21, 2014 03:15
Setting to ignore lid switch of note pc
/etc/systemd/logind.conf
HandleLidSwitch=ignore
@ksato9700
ksato9700 / gist:8abc093ebf3a2cdc15c2
Created October 22, 2014 00:25
Install Xcode command line tool on command line
$ xcode-select --install
@ksato9700
ksato9700 / emacs.rb
Last active January 13, 2016 06:25
emacs 24.4 homebrew formula with japanese option
require "formula"
class Emacs < Formula
homepage "https://www.gnu.org/software/emacs/"
stable do
url "http://ftpmirror.gnu.org/emacs/emacs-24.4.tar.xz"
mirror "https://ftp.gnu.org/pub/gnu/emacs/emacs-24.4.tar.xz"
sha256 "47e391170db4ca0a3c724530c7050655f6d573a711956b4cd84693c194a9d4fd"
@ksato9700
ksato9700 / gist:6c2141fc662906a03531
Last active August 29, 2015 14:19
boot2docker proxy setting
boot2docker ssh
sudo sh -c "cat <<EOF > /var/lib/boot2docker/profile"
export HTTP_PROXY=<proxy>
export HTTPS_PROXY=<proxy>
export NO_PROXY=/var/run/docker.sock
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP