This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Copyright (C) 2007,2008,2009,2010 Hiroki Yagita. | |
;; ポリシー ---------------------------------------------------------- | |
;; - meadow は捨てました | |
;; - xemacs は捨てました | |
;; - なるべくどこでも動くようにしたい | |
;; - 初期化スクリプトは ~/.emacs.d/init.el にしています | |
;; - ~/.emacs.d/ の下に分離スクリプトやデータを置くことがあります(それ以外の場所に置かない) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CircularBuffer.h - circular buffer library for Arduino. | |
Copyright (c) 2009 Hiroki Yagita. | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
'Software'), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.zshrc | |
# completion --------------------------------------------------- | |
dir=~/.oh-my-zsh/custom/plugins/zsh-completions/src | |
if [ -e $dir ]; then | |
fpath=($dir $fpath) | |
plugins+=(zsh-completions) | |
autoload -U compinit && compinit | |
fi | |
zstyle ':completion:*' list-colors 'di=34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defencoding utf-8 | |
escape ^z^z | |
termcapinfo * hs@ | |
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://www.ibm.com/developerworks/jp/linux/library/l-ubuntu-inotify/index.html */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/inotify.h> | |
#define EVENT_SIZE ( sizeof (struct inotify_event) ) | |
#define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct SuffixArray | |
{ | |
unsigned ip; /* index point */ | |
char *suffix; | |
}; | |
static int compare(const void *l, const void *r) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bsearch" # http://0xcc.net/ruby-bsearch/index.html.en | |
class SuffixArray | |
attr_accessor :word # original string(String) | |
attr_accessor :sary # suffix array(Array) | |
def initialize word | |
@word = word | |
@sary = Array.new(@word.size) {|i| i } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj-m := mykmod.o | |
KDIR := /lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
default: | |
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/workqueue.h> | |
static void mykmod_work_handler(struct work_struct *w); | |
static struct workqueue_struct *wq = 0; | |
static DECLARE_DELAYED_WORK(mykmod_work, mykmod_work_handler); | |
static unsigned long onesec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/timer.h> | |
#include <linux/jiffies.h> | |
static void mykmod_timer_handler(unsigned long data); | |
static unsigned long onesec; | |
DEFINE_TIMER(mytimer, mykmod_timer_handler, 0, 0); |
OlderNewer