Skip to content

Instantly share code, notes, and snippets.

View hayamiz's full-sized avatar

Yuto Hayamizu hayamiz

View GitHub Profile
@hayamiz
hayamiz / shibuya-el-position-paper.md
Created August 18, 2012 09:59 — forked from ainame/shibuya-el-position-paper.md
hayamizのshibuya.elのポジションペーパーです。
@hayamiz
hayamiz / nakatoji.zsh
Created August 19, 2012 11:01 — forked from pi8027/nakatoji.zsh
中綴じ用の面付けをするスクリプト
#!/bin/zsh
[ -z $1 ] && exit -1
nakatoji_sequence(){
last=$(expr 4 \* $1)
for i in {1..$1} ; do
echo -n "$(expr $last - $i \* 2 + 2),$(expr $i \* 2 - 1),"
echo -n "$(expr $i \* 2),$(expr 1 + $last - $i \* 2),"
done | sed "s/,$//g"
}
file=$(echo $1 | sed "s/\.pdf$//g")
@hayamiz
hayamiz / A5-seihon.rb
Created August 20, 2012 14:00
A4の紙に4ページを短編綴じで印刷してホチキス止めすると,袋綴じ状になるよう面付けするスクリプト。ホチキス止めした後に小口をカッターで切るとA5冊子として完成する。
#!/usr/bin/env ruby
require 'optparse'
def parse_args(argv)
opt = Hash.new
parser = OptionParser.new
parser.banner = "#{$0} [options] INPUT_PDF_FILE"

p.25

  • Signed/Unsignedのオーバーフローって何?

p.25

UnsignedとSignedでオーバーフローが発生した時に、Undef Value

Undef Value ではなく Poison Value

P.27 表4.5

  • load の行の構文のカラムのindexの前後の記号が誤植
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include <sndfile.h>
#include <math.h>
#include <complex.h>
#include <fftw3.h>
#include <assert.h>
// N = 2^12
@hayamiz
hayamiz / punch.el
Last active December 21, 2015 05:19
論文を書くときに句読点を全角カンマ、全角ピリオドに統一するためのマイナーモード punch-mode とりあえず決め打ちで変換 、→, 。→.
;;; punch.el --- punctuation switcher
;; Copyright (C) 2013 Yuto HAYAMIZU
;; Author: Yuto HAYAMIZU <y.hayamizu@gmail.com>
;; Keywords: input method
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@hayamiz
hayamiz / longrun-command-notify.sh
Last active December 21, 2015 09:19
実行時間が長いコマンドが終わったら、zshが勝手にGrowl通知してくる ref: http://qiita.com/hayamiz/items/d64730b61b7918fbb970
autoload -U add-zsh-hook 2>/dev/null || return
#
# Notification of local host command
# ----------------------------------
#
# Automatic notification via growlnotify / notify-send
#
#
# Notification of remote host command
@hayamiz
hayamiz / file0.txt
Created August 23, 2013 01:17
`make`で澄ました表示をする方法・騒がしくする方法 ref: http://qiita.com/hayamiz/items/f4b12882d6f6e6f13c74
CC hoge.o
CCLD hoge
(defun wakatime-call (command)
"Call WakaTime COMMAND."
(start-process-shell-command "wakatime" "*WakaTime messages*" command))
//usr/bin/env go run $0 $@ ; exit
package main
import (
"fmt"
)
func main() {
var sum = 0