Skip to content

Instantly share code, notes, and snippets.

https://drive.google.com/file/d/1f02OnmYiE0NbMIbiaYjiwVxiw91KaXBX/view?usp=drive_link

Keybase proof

I hereby claim:

  • I am pasinter on github.
  • I am pasinter (https://keybase.io/pasinter) on keybase.
  • I have a public key ASAFjJ3BcF83vyza2XWkbJ4xf2LCq-Py8-XJia_BU8lcOAo

To claim this, I am signing this object:

@pasinter
pasinter / consumer.php
Created June 21, 2018 22:52 — forked from fbrnc/consumer.php
AWS Kinesis Example for PHP (using the AWS SDK for PHP)
<?php
// curl -sS https://getcomposer.org/installer | php
// php composer.phar require aws/aws-sdk-php
// export AWS_ACCESS_KEY_ID=...
// export AWS_SECRET_ACCESS_KEY=...
$streamName = '<INSERT_YOUR_STREAMNAME_HERE>';
$numberOfRecordsPerBatch = 10000;
@pasinter
pasinter / DoctrineDisableSqlLogger
Created May 4, 2015 08:10
Disable Doctrine logger, useful when doing batch processing - reduces memory leaks
$em->getConnection()->getConfiguration()->setSQLLogger(null);
@pasinter
pasinter / gist:5b54809bda02642a956a
Created April 30, 2015 09:26
Check if all array keys are integers
if (ctype_digit(implode('', array_keys($data)))) {
//
}
@pasinter
pasinter / gist:9ddaf06d3cc999f2ee79
Created April 19, 2015 19:26
Magento module - generate modman file
find * -type f -not -iwholename 'modman' -exec echo {} {} >> modman \;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Inflector\Inflector;
use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\MappingException;
use Doctrine\ORM\PersistentCollection;
use Foodity\CoreBundle\Helper\EntityHelper;
@pasinter
pasinter / deploy.rb
Created August 9, 2011 02:50 — forked from stojg/deploy.rb
Silverstripe + Capistrano + Git recipie
# My ./config directory in silverstripe looks like this:
# ./503.php <- a 503 Maintainance page
# ./_ss_environment.php <- the production environment settings
# ./deploy.rb <- is the recipe below
#
# Application settings
set :application, "domain.com"
set :shared_children, %w(assets)