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 | |
namespace src; | |
use InvalidArgumentException; | |
use ReflectionObject; | |
abstract class Enum | |
{ | |
private $scalar; |
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
# This is Git's per-user configuration file. | |
[core] | |
# Please adapt and uncomment the following lines: | |
user = 'fugafuga' | |
email = [email protected] | |
excludesfile = /Users/fugafuga/.gitignore | |
autocrlf = input | |
editor = "/Applications/Emacs.app/Contents/MacOS/Emacs" | |
[user] | |
name = Fugafuga Hogeo |
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
Capybara.app = 'https://at2.admin.fortunemusic.jp' | |
Capybara.app_host = 'https://at2.admin.fortunemusic.jp' | |
Capybara.run_server = false | |
Capybara.register_driver :poltergeist do |app| | |
options = { | |
debug: false, | |
js_errors: false, | |
inspector: true, | |
timeout: 20, |
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
package info.indare.hogehoge.fuga | |
import info.indare.hogehoge.Pugya | |
class Fuga extends Pugya{ | |
def moto(){ | |
println this.getClass().getName() | |
} | |
} |
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 getJsonData(){ | |
$.ajax({ | |
url: "http://localhost/php/gist/temp.php", // リクエストURL | |
dataType: "json", // JSON形式 | |
cache: true, // キャッシュする | |
type: "POST", // POST指定 | |
success: function(data) { // 通信成功時の無名関数 | |
$("#targetElement").children().remove(); | |
$("#targetElement"). |
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 spock.lang.Specification | |
import spock.lang.Unroll | |
/** | |
* Created by IntelliJ IDEA. | |
* User: kyon | |
* Date: 12/06/24 | |
* Time: 14:53 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
class VendingSpec extends Specification { |
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
def phpUnitPath = '/opt/local/bin/' | |
def targetTestClass = '/workspace/cron/test/TestCheckMembers.php' | |
def cmd = phpUnitPath + 'phpunit ' + targetTestClass | |
def p = Runtime.getRuntime().exec(cmd) | |
def r = p.getInputStream().newReader('UTF-8') | |
r.eachLine{ | |
if((~/OK \(/).matcher(it).find()){ | |
Runtime.getRuntime().exec('/usr/local/bin/growlnotify -t phpUnit -m Green --image /Green.png') | |
} |
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
/** | |
* Created with IntelliJ IDEA. | |
* User: m_arino | |
* Date: 12/05/18 | |
* Time: 11:10 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
(0..100).toArray().each { |
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 | |
function newCounter(){ | |
$i = 0; | |
return function() use ($i){ | |
return ++$i; | |
}; | |
} | |
//$c = newCounter(); |
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 | |
require_once 'PHPUnit/Autoload.php'; | |
class testBoolCheck extends PHPUnit_Framework_TestCase { | |
public function testBoolCheck_1(){ | |
$this->assertEquals(is_bool(-1),false); | |
} | |
public function testBoolCheck_2(){ |
NewerOlder