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 | |
BASENAME= | |
PRJ_ID= | |
API_KEY= | |
curl $BASENAME?project_id=$PRJ_ID -s \ | |
-H "X-Redmine-API-Key: $API_KEY" | \ | |
groovy -e " |
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
if ('GET' === $_SERVER['REQUEST_METHOD']) | |
{ | |
echo 'success'; | |
exit; | |
} | |
$payload = json_decode($_REQUEST['payload']); | |
# syslog(LOG_INFO, $_REQUEST['payload']); |
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 | |
target_str=$1 | |
git log -G"${target_str}" --format="%H" --no-merges | while read commit; do | |
head=`git log -1 --oneline ${commit}` | |
sabun=`git show ${commit} --format="%b"| grep -G "^\-[^\-]*${target_str}"` | |
if [ "${sabun}" != "" ]; then | |
echo -e "${head}\n" | |
echo -e "${sabun}\n" |
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 ( | |
"database/sql" | |
"github.com/robfig/revel" | |
_ "github.com/ziutek/mymysql/godrv" | |
) | |
var ( | |
db *sql.DB | |
) |
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 java.util.Calendar; | |
public class Week { | |
public static void main (String[] args) { | |
System.out.println(Calendar.SUNDAY); | |
System.out.println(Calendar.MONDAY); | |
System.out.println(Calendar.TUESDAY); | |
System.out.println(Calendar.SATURDAY); | |
} | |
} |
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
package main | |
import ( | |
"log" | |
"time" | |
) | |
// 今日の曜日を返す Weekday() | |
func main() { | |
now := time.Now() |
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
package main | |
import "time" | |
func main() { | |
print(time.March) | |
} |
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
# 古いブランチを 10 個削除するコマンド (git-ls-branches は修正有り) | |
git ls-branches --quiet | tac | head -n 10 | xargs git branch -D |
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
package controllers | |
import play.api._ | |
import http.{Writeable, ContentTypeOf, ContentTypes} | |
import mvc.Codec | |
import play.api.Play.current | |
import org.fusesource.scalate.layout.DefaultLayoutStrategy | |
import collection.JavaConversions._ | |
object Scalate { |
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
<?php | |
var_dump(".0"); | |
var_dump(".1"); | |
var_dump(intval(".0")); | |
var_dump(intval(".1")); | |
var_dump(strval(intval(".0"))); | |
var_dump(strval(intval(".1"))); | |
var_dump(strval(intval(".0")) != ".0"); | |
var_dump(strval(intval(".1")) != ".1"); |