Skip to content

Instantly share code, notes, and snippets.

@pank7
pank7 / pkuaa-jp-lishi-candidate-info-2015-liyi.md
Created October 7, 2015 14:15
参选2015年北京大学日本校友会理事 李一
  • 姓名*: 李 一
  • 性别*: 男
  • 出生年份: 1984
  • 北大入学/入职年份*: 2006
  • 北大所属院系*: 信息科学技术学院
  • 北大攻读学位/教职: 计算机科学理学硕士学位毕业
  • 来日年份*: 2011
  • 在日常住地区*: 江东区 有明/涩谷区 惠比寿
  • 工作性质/经历: 互联网软件工程师
  • 兴趣爱好: 篮球,音乐,漫画,咖啡
@pank7
pank7 / .tmux.conf
Created August 25, 2015 06:39
My tmux configuration
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
#setting the delay between prefix and command
# START:delay
@pank7
pank7 / pank7-magic.zsh-theme
Created January 13, 2015 01:24
My oh-my-zsh theme
# pank7-magic.zsh-theme modified from af-magic.zsh-theme
#
# Author: pank7
# Author: Andy Fleming
# URL: http://andyfleming.com/
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
#
# Created on: June 19, 2012
# Last modified on: June 20, 2012
@pank7
pank7 / .tmux.conf
Last active August 29, 2015 14:13
My tmux configuration file
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
#setting the delay between prefix and command
# START:delay
@pank7
pank7 / README.md
Last active August 29, 2015 14:08 — forked from codebullies/README.md

To use the scheme epgm:// or pgm:// you must configure libzmq 3.x (HEAD) using the --with-pgm.

./configure --with-pgm
./make
./make install

Remember to set you LD_LIBRARY_PATH to the location of the libzmq installation parameter For bash:

export LD_LIBRARY_PATH=/usr/local/lib

@pank7
pank7 / stringcalculator.hs
Created September 7, 2014 15:28
String calculator for TDD training by Joseph Yoder
module Hoge where
import Text.Printf
import Data.List.Split
import Test.HUnit
string_calc :: String -> Integer
string_calc expr = sum $ map read $ filter (\x -> x /= "") $ splitOn "," expr
@pank7
pank7 / cell_phone_billing.erl
Last active August 29, 2015 14:06
Cell phone billing TDD training exercise by Joseph Yoder
-module(cell_phone_billing).
-export([calculate_bill/2, calculate_bill/3]).
ceiling(X) ->
T = erlang:trunc(X),
case (X - T) of
Neg when Neg < 0 -> T;
Pos when Pos > 0 -> T + 1;
_ -> T
@pank7
pank7 / stringcalculator.erl
Created September 5, 2014 01:42
String calculator for TDD training by Joseph Yoder
% compile with:
% erlc -DTEST stringcalculator.erl
% run test with:
% erl -noshell -run stringcalculator test
-module(stringcalculator).
-export([add/1]).
add(Expr) when is_binary(Expr) ->
@pank7
pank7 / StringCalculator.py
Created September 5, 2014 01:41
StringCalculator for TDD training by Joseph Yoder
#!/usr/bin/env pypy
import sys
from itertools import imap as map
from itertools import ifilter as filter
import unittest
def add(expr):
return sum(map(int, filter(lambda x: x != '', expr.split(','))))