This file contains hidden or 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
# 以下で表示タイミングの配列を取得可能 | |
# 元ファイル:$orig | |
delay_times=`identify -verbose $orig | grep Delay | awk '{print $2}' | cut -d'x' -f1` | |
This file contains hidden or 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
diff --git a/data/gh-pages.hs b/data/gh-pages.hs | |
index ed05733..6bf60cb 100644 | |
--- a/data/gh-pages.hs | |
+++ b/data/gh-pages.hs | |
@@ -44,6 +44,13 @@ main = hakyllWith config $ do | |
-- Read templates | |
match "templates/*" $ compile templateCompiler | |
+ -- Render RSS feed | |
+ match "rss.xml" $ route idRoute |
This file contains hidden or 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
#!/bin/zsh | |
func(){ | |
echo 2 | |
local pre_func_definition | |
local pre_count | |
local new_count | |
local new_func_definition | |
pre_func_definition=$(which func) | |
pre_count=$(echo $pre_func_definition | awk 'NR==2, NR==2 {print $2}') |
This file contains hidden or 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
case $1 in | |
hogehoge) | |
hogehoge | |
;; | |
fugafuga) | |
fugafuga | |
;; | |
*) | |
echo hogehoge fugafuga | |
exit 1 |
This file contains hidden or 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 yes_no { | |
msg=$1 | |
while : | |
do | |
echo -n "${msg} y/N: " | |
read ans | |
case $ans in | |
[yY]) return 0 ;; | |
[nN]) return 1 ;; | |
esac |
This file contains hidden or 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
usage() | |
{ | |
echo $0 hoge | |
} | |
if [ -z $1 ]; then | |
usage | |
exit | |
else | |
expr $1 + 1 >/dev/null 2>&1 |
This file contains hidden or 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
% mocha *.js [~/work/test] | |
.. | |
✖ 1 of 2 tests failed: | |
1) hoge fuga: | |
AssertionError: expected 1 to equal 2 | |
以下エラーメッセージ |
This file contains hidden or 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
run=$(ps aux | grep '[h]oge') | |
if [ -z "$run" ]; then | |
do something | |
fi |
This file contains hidden or 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
sinon = require("sinon") | |
should = require("should") | |
a = {} | |
a.test = () -> | |
[1, 2] | |
describe "calc", -> | |
describe ".add", -> | |
it "should return sum of 2 arguments", -> | |
result = 1 + 2 |
This file contains hidden or 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
#!/bin/bash | |
COMMAND=`basename $0` | |
usage(){ | |
echo "Usage: $COMMAND FILE" | |
echo "With no FILE, read standard input." | |
} | |
error(){ | |
local ERROR_MESSAGE=$@ |