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
phpize | |
sudo MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS="-arch i386 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -g -Os -pipe" CXXFLAGS="-arch i386 -g -Os -pipe" LDFLAGS="-arch i386 -bind_at_load" ./configure | |
make && make 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
1. download GIT version Control | |
wget http://git-core.googlecode.com/files/git-1.7.9.tar.gz | |
2. extract the tarball file | |
tar -xzvf git-1.7.9.tar.gz | |
3. install compatibility softwares | |
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel | |
4. install GIT, go to extracted tarball folder, and run : |
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 | |
namespace MyFunnyValentine; | |
// Detect if the currently matched route belongs to this module. | |
// The assumption is that the controller name includes the module namespace. | |
class Module | |
{ | |
public function onBootstrap($e) |
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
$translator = new Zend\I18n\Translator\Translator(); | |
$translator->addTranslationFile('phparray', | |
'./module/SanAuthWithDbSaveHandler/language/indonesia.php'); | |
$this->formlabel()->setTranslator($translator); | |
echo $this->formLabel()->getTranslator()->translate( $this->formLabel($form->get('elementname') )); |
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 | |
use Zend\Db\Sql\Select; | |
// basic table | |
$select0 = new Select; | |
$select0->from('foo'); | |
// 'SELECT "foo".* FROM "foo"'; | |
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 | |
copy(__DIR__ . '/music.db.original', __DIR__ . '/music.db'); | |
include 'vendor/autoload.php'; | |
return new Zend\Db\Adapter\Adapter(array( | |
// Sqlite Configuration | |
'driver' => 'Pdo', | |
'dsn' => 'sqlite:' . __DIR__ . '/music.db', |
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
1. create a file under public/ folder named fatalerrorhandler.php | |
<?php | |
//adapt from http://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-error | |
define('E_FATAL', E_ERROR | E_USER_ERROR | E_PARSE | E_CORE_ERROR | | |
E_COMPILE_ERROR | E_RECOVERABLE_ERROR); | |
//Custom error handling vars | |
define('DISPLAY_ERRORS', TRUE); | |
define('ERROR_REPORTING', E_ALL | E_STRICT); |
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
for f in *.sql; do mysql -u root databasename < $f; done; |
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
use Zend\Db\Sql; | |
$sql = new Sql\Sql; | |
$select = $sql->select($table); | |
$select->offset(10); | |
echo $sql->getSqlStringForSqlObject($select); |
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
tar czf changed-files.tar.gz `git diff --name-only HEAD` |