Skip to content

Instantly share code, notes, and snippets.

@shimabox
shimabox / phpunit_ajax_sample.php
Last active June 22, 2017 05:44
jsonを返すAPIのテストコード
<?php
/**
* メッセージ(json)を返すAPIと仮定
*
* あくまでもサンプルなので例外処理は入れていません
*/
class Sample
{
/**
* @var array
@shimabox
shimabox / gem_mailcatcher
Created March 5, 2015 21:20
mailcatcherのレシピ
#
# Cookbook Name:: app
# Recipe:: mailcatcher
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
# rubyとgem は既に入っている想定
@shimabox
shimabox / gem_mailcatcher.rb
Last active August 29, 2015 14:14
mailcatcherのレシピ(gem eventmachineをダウングレードして動かす)
# Cookbook Name:: app
# Recipe:: mailcatcher
#
# Copyright 2015, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
# rubyとgem は既に入っている想定
# ruby -v => 2.0.0p598
@shimabox
shimabox / alog.js
Last active December 19, 2015 02:39
/*@cc_on!@*/false だけでIEかどうかの判定ができると聞いて / alertとconsole.logのラッパー的な / 名前も簡易(alert + console.log)
;(function(ns){
if(typeof ns.alog === 'function') return;
ns.alog = function(){
var args = [].slice.call(arguments).concat();
if (/*@cc_on!@*/false) {
return alert(args);
}
@shimabox
shimabox / Sample_PhpDocumentor_Hoge.php
Last active August 17, 2022 00:54
phpDocumentorのちょっとしたサンプル
<?php
/**
* PHPDocumentorのちょっとしたサンプル
* @author shimabox
*/
/**
* require
*/
require_once './Interfaces/IHoge.php';