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
|
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
#!/bin/bash | |
cat << EOS >> ~/hoge | |
line: 1 | |
line: 2 | |
line: 3 | |
EOS |
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
#!/bin/bash | |
# このスクリプトが保存されているディレクトリに移動する | |
cd `dirname $0` |
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 installed_command() { | |
which $1 > /dev/null 2>&1 | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java-members" deleted="false" description="" enabled="true" name="test_abnormal">@${testType:newType(org.junit.Test)} | |
public void 異常系_${testName}() throws Exception { | |
${staticImport:importStatic('org.junit.Assert.*')}${cursor}// setup | |
// exercise | |
// verify | |
}</template><template autoinsert="true" context="java-members" deleted="false" description="" enabled="true" name="test_normal">@${testType:newType(org.junit.Test)} | |
public void 正常系_${testName}() throws Exception { | |
${staticImport:importStatic('org.junit.Assert.*')}${cursor}// setup | |
// exercise | |
// verify |
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
#!/bin/sh | |
COUNT=1 | |
MAX_COUNT=256 | |
while [ $COUNT -lt $MAX_COUNT ] | |
do | |
echo "$COUNT" | |
COUNT=`expr $COUNT + 1` | |
done |
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
/** | |
* Ajax 通信処理で失敗した responseText をログ出力する。 | |
* | |
* responseText には次の形式の JSON が設定されている想定。 | |
* | |
* { | |
* "errors" : [ | |
* エラーメッセージ1, | |
* エラーメッセージ2, | |
* エラーメッセージ3 |
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
/** | |
* タグに定義されている class を切り替える。 | |
* | |
* to が定義されていない、もしくはブランクの場合は from の class を取り除く。 | |
* | |
* @param {String} id 切り替える class が定義されているタグの ID 属性 | |
* @param {String} from 切り替え対象の class | |
* @param {String} to 切り替える class | |
* @returns {} | |
*/ |
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
/** | |
* 文字列が Null かブランクであるかを問い合わせる。 | |
* | |
* @param {String} value 検査する文字列 | |
* @returns {Boolean} 条件を満たしている場合 true | |
*/ | |
function isNullOrEmpty(value) { | |
return typeof value === "undefined" || value.length === 0; | |
} |
NewerOlder