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 | |
protected function _initDoctrine() | |
{ | |
$options = $this->getOptions(); | |
$doctrinePath = $options['includePaths']['library']; | |
require_once $doctrinePath . '/Doctrine/Common/ClassLoader.php'; | |
$autoloader = Zend_Loader_Autoloader::getInstance(); | |
$doctrineAutoloader = array(new \Doctrine\Common\ClassLoader(), 'loadClass'); |
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
#!/Applications/XAMPP/xamppfiles/bin/php | |
<?php | |
include('doctrine.php'); |
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 | |
class My_Auth_Adapter_Doctrine2 implements Zend_Auth_Adapter_Interface | |
{ | |
/** | |
* Doctrine Entity Manager | |
* | |
* @var \Doctrine\ORM\EntityManager | |
*/ | |
protected $_em = null; |
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 | |
class Fetcher | |
{ | |
private $_torIp = '127.0.0.1'; | |
private $_torProxyPort = '8118'; | |
protected function _request($url) |
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
$ git flow init | |
$ git flow feature start login | |
$ git flow feature finish login | |
$ git flow release start v0.1.0 |
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
$ git remote add origin [email protected]:accountname/project.git | |
$ git push origin master |
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
SELECT field, COUNT(field) AS total FROM table GROUP BY field HAVING (COUNT(field) > 1) | |
DELETE t1 FROM table t1, table t2 WHERE t1.field = t2.field AND t1.id > t2.id | |
ALTER IGNORE TABLE table ADD UNIQUE INDEX(table) | |
DELETE t1 FROM table as t1, table as t2 WHERE t1.x = t2.x AND t1.y = t2.y AND t1.id > t2.id |
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
cd /tmp | |
pecl download memcache | |
tar xzf memcache-2.2.6.tar | |
cd memcache-2.2.6 | |
phpize | |
MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=php-config | |
make | |
sudo make install |
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
# Creating dir for translation files | |
mkdir -p /path/to/myapp/conf/locale | |
cd /path/to/myapp | |
# Creating language file by scanning app directory for text marked for translation. | |
# It will appear in /path/to/conf/locale/en/LC_MESSAGES/django.po | |
# Run command for each needed language | |
PYTHONPATH=/path/to/googleappengine/lib/django/ | |
/path/to/googleappengine/lib/django/django/bin/make-messages.py -l en |
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
set :application, "application_name" | |
default_run_options[:pty] = true | |
set :scm, :git | |
set :repository, "[email protected]:memphys/application_name.git" | |
# setting ssh port and option to use ssh-keys stored on local machine | |
set :ssh_options, {:forward_agent => true, :port => 8822} |
OlderNewer