Skip to content

Instantly share code, notes, and snippets.

@iori-yja
iori-yja / bootstrap.sh
Created January 1, 2012 06:38
cabal0.10.2 bootstrap for ghc7.2 on Linux
#!/bin/sh
# A script to bootstrap cabal-install.
# It works by downloading and installing the Cabal, zlib and
# HTTP packages. It then installs cabal-install itself.
# It expects to be run inside the cabal-install directory.
# install settings, you can override these by setting environment vars
PREFIX=${PREFIX:-${HOME}/.cabal}
@iori-yja
iori-yja / .zshrc
Created January 7, 2012 19:57
zsh configuration
# Created by newuser for 4.3.10
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt hist_ignore_dups # ignore duplication command history list
setopt share_history # share command history data
bindkey -v
setopt auto_cd
setopt auto_pushd
setopt list_packed
@iori-yja
iori-yja / installing-ghc7.2-linux.md
Created January 8, 2012 16:58 — forked from beastaugh/installing-ghc7.2-osx10.7.md
Easy install way of ghc7.2 and cabal on linux.

Installing GHC 7.2 on Linux

This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install tool (the two basic things you'll need to do Haskell development) up and running on a new Linux install.

The instructions given here worked for me, but YMMV. My environment is Debian GNU/Linux, sid(unstable).

@iori-yja
iori-yja / irq_handler.s
Created January 11, 2012 07:53
IRQ handler for LPC23xx ARM microcontroller
.section .text, "ax"
.arm
IRQ_Handler:
SUB LR, LR, #4 @ Adjust LR_irq and push it
STMFD SP!, {LR}
MRS LR, SPSR @ Save SPSR need to be saved for nested interrupt
STMFD SP!, {R0-R3,IP,LR} @ Push scratch/used registers and SPSR
LDR R0, =LPC_BASE_VIC @ Get the ISR address pointed by VIC_VectAddr
LDR R0, [R0, #VIC_Address]
@iori-yja
iori-yja / mnemonic.sh
Created January 15, 2012 10:43
Get mnemonics from instruction table.
cat temp|awk '{print $1}'|sed -e 's/(.*)//g'|sed -e s/表//g |sed -e 's/A4.*//' |sed -e s/v4//g |sed -e s/Copyright// |sed -e s/ARM//g |sed -e s/命令//g| sed '/^ *$/d' | tr '\n' ' '>temp
@iori-yja
iori-yja / arm.vim
Created January 15, 2012 10:53
ARM Assembly syntax hilighting. put on $vim/syntax/
" Vim syntax file
" >Language: MCS-51 intel Mnemonics (armA)
" >Maintainer: Thomas Langewouters <thomas.langewouters@skynet.be>
" Inherit his script: iori yja
" Language: ARMv5-v7 Mnemonics.
" Last Change:
" Vim URL: http://www.vim.org/lang.html
" arm Home: ---
" arm Version: 2.00
#!/bin/zsh
datetime=`date "+%y-%m-%d_%H:%M:%S"`
basedir=~/coinssnap/$datetime
mkdir $basedir
for p in acacia burnet cosmos ; do
for i in {1..50} ; do
ssh -o ConnectTimeout=1 $p`printf %02d $i` "coinssnap_sub $basedir 10" &
@iori-yja
iori-yja / xmonad.hs
Created May 21, 2012 15:46
xmonad.hs
{- xmonad.hs
- Author: Jelle van der Waa ( jelly12gen ) and iori-yja
-}
-- Import stuff
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import XMonad.Util.EZConfig(additionalKeysP,additionalKeys)
import System.Exit
メロスは激怒した。必ず、かの邪智暴虐のRISCを除かなければならぬと決意した。
メロスには論理回路がわからぬ。メロスは理論数学の村人である。mapを作り、集合論と遊んで暮してきた。
けれども直交性に対しては、人一倍に敏感であった。
きょう未明メロスは村を出発し、野を越え山越え、十里はなれた此のDECの市にやって来た。
メロスにはMIPSも、SPARCも無い。Alphaも無い。十一の、内気なPDPと二人暮しだ。
このPDPは、村の或る律気な一Unixを、近々、OSとして迎える事になっていた。
インストールも間近かなのである。メロスは、それゆえ、PDP-11のフロントパネルやらプログラムのカードやらを買いに、
はるばる市にやって来たのだ。
先ず、その品々を買い集め、それから都のプログラムリストをぐだぐだ眺めた。
bind-key z run pane-maximize