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 | |
// | |
// 画面出力時に、テンプレートをUTF-8からSJISに変換する。 | |
// | |
function filterUTF8ToSJIS($buff, &$smarty) { | |
return mb_convert_encoding($buff,"SJIS","UTF-8"); | |
} | |
$smarty= new Smarty(); //Smartyオブジェクト生成 | |
$smarty->register_outputfilter("filterUTF8ToSJIS"); //フィルターの登録 | |
ini_set("default_charset", "Shift_JIS"); //PHPの設定default_charsetにSJISを設定 |
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
内容 | Path | Key | Value | |
---|---|---|---|---|
SoftBankメール保存ディレクトリ | \HKEY_LOCAL_MACHINE\Software\Arcsoft\ArcSoft MMS UA\Config\Folder | CannedTextFile | 「Program Files」を「Storage Card」 | |
SoftBankメール保存ディレクトリ | \HKEY_LOCAL_MACHINE\Software\Arcsoft\ArcSoft MMS UA\Config\Folder | TemplatePath | 「Program Files」を「Storage Card」 | |
SoftBankメール保存ディレクトリ | \HKEY_LOCAL_MACHINE\Software\Arcsoft\ArcSoft MMS UA\Config\Folder | UAContentsPath | 「Program Files」を「Storage Card」 | |
IE初期ページ | \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs | home_0409 | 任意URL | |
IE初期ページ | \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs | home_0411 | 任意URL | |
Outlookメール新規作成時サイズ | \HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\RichEditHostFontSize | - | 9 | |
HSDPAアイコン表示 | \HKEY_LOCAL_MACHINE\Software\OEM\RIL | EnableHSDPAIcon | 1 | |
キャッシュ | \HKEY_LOCAL_MACHINE\System\GDI\GLYPHCACHE | limit | 2097152 | |
キャッシュ | \HKEY_LOCAL_MACHINE\System\StorageManager\FATFS | CacheSize | 256 |
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 | |
spl_autoload_register(function ($className) { | |
include "$className.php"; | |
}); | |
class EntryTest extends PHPUnit_Framework_TestCase { | |
public function testStatus() { | |
$entry = new Entry(); | |
$this->assertEquals(Entry::STATUS_DRAFT, $entry->status); |
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 | |
spl_autoload_register(function ($className) { | |
include "$className.php"; | |
}); | |
class EntrySpec extends PHPUnit_Extensions_Story_TestCase { | |
/** | |
* @scenario | |
*/ |
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 | |
class Entry { | |
const STATUS_DRAFT = 'draft'; | |
const STATUS_PUBLISHED = 'published'; | |
const STATUS_DELETED = 'deleted'; | |
var $status = self::STATUS_DRAFT; | |
var $title; | |
public function publish() { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<keymap version="1" name="Eclipse on Mac" parent="Eclipse"> | |
<action id="$Copy"> | |
<keyboard-shortcut first-keystroke="meta C" /> | |
</action> | |
<action id="$Cut"> | |
<keyboard-shortcut first-keystroke="meta X" /> | |
<keyboard-shortcut first-keystroke="shift DELETE" /> | |
</action> | |
<action id="$Delete"> |
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 | |
filename="slide.pdf" | |
if [ $# -ne 2 ]; then | |
echo "Usage: ./hslide2pdf.sh url maxpage" | |
exit 1 | |
fi | |
if [ ! -d tmp ] ; then | |
mkdir tmp |
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
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'fileutils' | |
# for multi byte string in yaml | |
require 'psych' | |
require 'yaml' | |
require 'time' | |
# for multi byte string |
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
require 'formula' | |
class Phpbrew < Formula | |
head 'https://raw.github.com/c9s/phpbrew/master/phpbrew' | |
homepage 'https://github.com/c9s/phpbrew' | |
def install | |
system "chmod a+x phpbrew" | |
system "mkdir -p #{prefix}/bin" | |
system "cp phpbrew #{prefix}/bin" |
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
[mysqld_multi] | |
mysqld = /usr/local/bin/mysqld_safe # 使用するmysqldバイナリへのフルパス | |
mysqladmin = /usr/local/bin/mysqladmin # mysqladminへのフルパス | |
user = XXXX # 全てのサーバで使えるSHUTDOWN権限のあるユーザとパスワード | |
password = XXXX | |
[mysqld1] | |
server-id = 1 # 連番で良いはず | |
port = 3306 # 使用するポート | |
datadir = /usr/local/var/mysql_multi/1 # データディレクトリ(分けておかないと大変なことになるはず) |
NewerOlder