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
<?php | |
class CallCount | |
{ | |
public $call_counts = array(); | |
function counts($method) { | |
if(!isset($this->call_counts[$method])) { | |
$this->call_counts[$method] = 0; | |
} |
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
describe("DOM操作", function() { | |
beforeEach(function() { | |
testDiv = document.createElement('div'); | |
testDiv.innerHTML = '<div id="test-node">test</div>'; | |
document.body.appendChild(testDiv); |
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
<?php | |
/* | |
* SimpleTestのmockサンプル | |
* SimpleTest version 1.0.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
sendfile off; |
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
new_window = page.driver.browser.window_handles.last | |
page.within_window new_window do | |
# code | |
end |
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 seika { | |
local URL="$(git remote -v | head -n 1 | sed -e 's|.*git@\(.*\):\(.*\)\.git.*|https://\1/\2|g')"; git log --pretty="%s \n $URL/commit/%H" --author="$(git config --get user.name)" --since=1.days | sed 's/\\n/\ | |
/g' | |
} |
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
git branch | sed 's/^*/ /g' | while read LINE; do echo ${LINE}; git show -s --pretty="%s %an" ${LINE}; echo ''; done; unset LINE |
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
REPO="$(git remote -v | grep 'fetch' | sed 's/origin.*://g' | sed 's/.git (fetch)//g')"; git log --pretty="%s \n https://github.com/$REPO/commit/%H" --author="Shohei Yamasaki" --since=1.days | sed 's/\\n/\ | |
/g'; unset REPO |
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
smbclient //example.com/shared -c "cd /var/www; put /tmp/hoge.txt hoge.txt" -U username 'passwd' |
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
git push origin $(git branch | grep -e '^*' | sed "s/^*//g") |