-
名前(任意)
- 岩永 賢明
-
Twitter or Facebookのアカウント or HN等
-
@kiris
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
# Description: | |
# notify create channel on Slack in #new_channels | |
# | |
# Notes: | |
# required [email protected]+ | |
# | |
# Author: | |
# kiris | |
module.exports = (robot) -> |
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
function peco-make-targets () { | |
BUFFER=$(grep -o '^[^#[:space:]].*:' Makefile | sed 's/\([^:]*\):/make \1/' | peco --query "$LBUFFER") | |
CURSOR=$#BUFFER | |
zle clear-screen | |
} | |
zle -N peco-make-targets | |
## usage | |
# bindkey '^x^m' peco-make-targets |
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
function parent-directory() { | |
cd '..' | |
zle send-break | |
} | |
zle -N parent-directory | |
bindkey '^^' parent-directory |
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
function collect(array, fn, scope) { | |
var results = [], | |
r, | |
i = 0, | |
index = 0, | |
len = array.length; | |
for (; i < len; i++) { | |
r = fn.call(scope, array[i], i, array); | |
if (r !== null) { |
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
trait FindTaskContext { | |
def order:String | |
def page:Int | |
def limit:Int | |
} | |
class TaskController { | |
def findTask(code:String, name:String, order:String, limit:Int, page:Int): List[Task] = { | |
// 実際はDBの接続先情報とかも必要なのでもっと複雑になると思う | |
object Context extends FindTaskContext { |
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
object Mahjong { | |
type Hands = Seq[(Int, Int)] | |
type State = (List[Mentsu], Option[Int], Option[Mati]) | |
abstract class Mentsu | |
case class Zyuntsu(n: Int) extends Mentsu | |
case class Kotsu(n: Int) extends Mentsu | |
abstract class Mati | |
case class ZyuntsuMati(n1: Int, n2:Int) extends Mati |
今回はexecveの中を流れを追ってみる。
- @mmitou がexecve観察用のSystemtapスクリプトを書いてきてくれた(https://gist.github.com/3433352)
- 「SystemTap」とは簡単なスクリプトを書くことで、稼働中のLinuxカーネルに対して実行情報を取得するためのツール。
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
import lombok.experimental.ExtensionMethod; | |
@ExtensionMethod({ Extensions1.class, Extensions2.class }) | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("test".addedMethod()); // => test added method 2 | |
} | |
} | |
class Extensions1 { |
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
import lombok.experimental.ExtensionMethod; | |
@ExtensionMethod({ Extensions1.class, Extensions2.class }) | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("test".addedMethod()); // => "test added method 1" | |
} | |
} | |
class Extensions1 { | |
public static String addedMethod(String value) { |
NewerOlder