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
Jenkins × PHP環境構築の巻 | |
■目的 | |
PHP環境に対応したJenkins設定を行い、 | |
コミットされる度にサーバ上でのPHPUnitの実行 及び | |
カバレッジレポート出力を"全自動"で行えるようにすること。 | |
1) PHP Pear系のインストール | |
sudo pear channel-discover pear.phing.info | |
sudo pear channel-discover pear.pdepend.org |
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
#!/usr/bin/ruby | |
# アクセスログ解析用 mapper | |
accessLog = Hash.new | |
tmpLink = Array.new | |
tmpReferer = Array.new | |
#アクセスログを分割してReducerに渡す形式にする | |
ARGF.each do |log| |
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
#!/usr/bin/ruby | |
access = Hash.new | |
pre_referer = nil | |
pre_link = nil | |
count = 1 | |
ARGF.each do |log| | |
log.chomp! |
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
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
public class Test { | |
public static void main(String[] args) { | |
RemoteWebDriver driver = new FirefoxDriver(); | |
driver.get("http://www.asial.co.jp"); |
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
SELECT * FROM slow_log WHERE start_time >= '2100-12-22 17:36:00' LIMIT 20 \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
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
import org.openqa.selenium.firefox.FirefoxProfile; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
public class Test { | |
public static void main(String[] args) { | |
//UAの設定を行う | |
FirefoxProfile profile = new FirefoxProfile(); |
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
use Net::OpenSSH; | |
my $host = "hostname"; | |
# ログイン認証 | |
my $ssh = Net::OpenSSH->new( | |
$host, | |
( | |
user => 'username', | |
password => 'pass', |
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
SELECT @i:=@i+1 as rownum,`USER_ID` FROM (select @i:=0) as dummy,`USER_TBL` |
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
use Net::OpenSSH; | |
use strict; | |
use warnings; | |
my $host = "hostname"; | |
# ログイン認証 | |
my $ssh = Net::OpenSSH->new( | |
$host, | |
( |
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/sh | |
USER="masayuki" | |
HOST="192.168.10.10" | |
PASS="pass" | |
expect -c " | |
set timeout 10 | |
spawn ssh $USER@$HOST | |
expect \"Are you sure you want to continue connecting (yes/no)?\" { |
OlderNewer