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
# ルートユーザのパスワード設定 | |
SET PASSWORD FOR root@localhost=PASSWORD('**password**'); | |
# MySQLに接続できるユーザの表示 | |
USE mysql | |
SELECT host,user,password from user; | |
# パスワード無しのユーザ(匿名ユーザ)の削除 | |
DELETE FROM user WHERE user=""; |
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 | |
// connect | |
$mongo = new MongoClient("localhost:27017"); | |
$db = $mongo->selectDB("test"); | |
$col = $db->createCollection("test"); | |
// insert | |
$db = $mongo->selectDB('test'); |
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 | |
/** | |
* format-to-YYY-MM-DD | |
* | |
* @param string $date format:[January or Jan] 1st 2013 00:00 AM | |
* @return string $formatedDate format:YYYY-MM-DD hh:mm | |
*/ | |
function date_format_std($date) | |
{ | |
$pattern = '/^([a-z]+)\s([a-z0-9]+)\s([0-9]{4})\s([0-2][0-9]:[0-6][0-9])\s(am|pm)/i'; |
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 | |
require_once 'Mail.php'; | |
require_once 'Mail/mime.php'; | |
class SendMail | |
{ | |
private $mimeObj; | |
private $checkAddress = array( | |
'To' => array(), |
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 | |
/** | |
* DBマネージャー(PDO) | |
* | |
*/ | |
class DbManager | |
{ | |
private static $instance; | |
private $dbrepository = array(); |
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 | |
/** | |
* DBコントローラ(PDO) | |
* | |
*/ | |
class DbController | |
{ | |
protected $repository = null; | |
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 | |
/** | |
* Dateマネージャー(DateTime) | |
* | |
*/ | |
class DateManager | |
{ | |
private $datetime = null; | |
private $dateInterval = null; | |
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
wget http://sourceforge.net/projects/paco/files/paco/2.0.9/paco-2.0.9.tar.bz2 | |
tar xvf paco-2.0.9.tar.bz2 | |
cd paco-2.0.9 | |
./configure --disable-gpaco | |
make | |
make install | |
make logme | |
#How to use | |
# install |
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
# fontforgeコマンドをインストールする。 | |
apt-get install fontforge | |
# 生成スクリプトをGitを用いて取得する | |
cd /tmp | |
git clone git://github.com/yascentur/Ricty.git | |
# Inconsolataから、「OpenType file」をダウンロードする。 | |
wget http://levien.com/type/myfonts/Inconsolata.otf | |
mv /tmp/Inconsolata.otf /tmp/Ricty |
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
# build | |
cd path/to/document_root | |
mkdir -p project_dir/lib/vendor | |
cd /lib/vendor/ | |
wget http://www.symfony-project.org/get/symfony-1.4.20.tgz | |
tar zxvf symfony-1.4.20.tgz | |
mv symfony-1.4.20 symfony | |
rm symfony-1.4.20.tgz | |
cd ../../ | |
php lib/vendor/symfony/data/bin/symfony generate:project projectname |
OlderNewer