Skip to content

Instantly share code, notes, and snippets.

View samsonasik's full-sized avatar
🔥
I am doing very fast fix 🚀, sponsor me 💖 https://github.com/sponsors/samsonasik

Abdul Malik Ikhsan samsonasik

🔥
I am doing very fast fix 🚀, sponsor me 💖 https://github.com/sponsors/samsonasik
View GitHub Profile
@samsonasik
samsonasik / gist:4983238020c71a1a2ae5
Created October 2, 2014 13:56
reset zf2 validator
$inputFilter = $form->getInputFilter();
//re-set validator
$inputFilter->remove('username');
// re-add
$inputFilter->add(array(
'name' => 'username',
'required' => true,
'validators' => array(
array(
<?php
/**
* @author Marco Pivetta <ocramius@gmail.com>
*/
use Zend\ServiceManager\ServiceManager;
use Zend\Mvc\Service\ServiceManagerConfig;
use DoctrineORMModuleTest\Framework\TestCase;
use ContentTest\Util\ServiceManagerFactory;
use Zend\Loader\StandardAutoloader;
@samsonasik
samsonasik / slidelist.txt
Created November 30, 2014 22:09
symfonycon 2014 slides
SymfonyCon slides :
- http://www.slideshare.net/YevhenShyshkin/developing-business-application-with-oro-platform
- http://fr.slideshare.net/jpauli/mysqlnd
- http://www.slideshare.net/ricardclau/big-data-great-now-what-symfonycon-2014
- https://speakerdeck.com/michellesanver/life-after-assetic-state-of-the-art-symfony-2-frontend-dev
- http://moquet.net/talks/symfonycon-2014/
- http://www.slideshare.net/barelon/making-symofny-shine-with-varnish-symfonycon-madrid-2014
- http://www.slideshare.net/pgodel/symfonycon-madrid-2014-rock-solid-deployment-of-symfony-apps
- http://slides.seld.be/?file=2014-11-27+Five+Weird+Tricks+to+Become+a+Better+Developer.html#1
- http://qafoo.com/resources/presentations/symfonycon_madrid_2014/feature_flags_with_symfony.html
@samsonasik
samsonasik / uuid.md
Last active August 29, 2015 14:12
uuid in postgresql

use uuid in postgresql : run command :

CREATE EXTENSION "uuid-ossp";

test :

select uuid_generate_v4()
@samsonasik
samsonasik / gist:3f676b0446079fb3d7ab
Last active August 29, 2015 14:13
wordpress references
- http://www.snilesh.com/different-single-post-template-per-category-wordpress/
- https://wordpress.org/support/topic/making-category-selection-radio-buttons
- https://wordpress.org/support/topic/change-checkbox-to-radio-button
- https://wordpress.org/support/topic/remove-description-field-in-admin-edit-category-page
- https://managewp.com/wordpress-permalinks-guide
- http://codex.wordpress.org/Function_Reference/wp_get_themes
- http://designorbital.com/snippets/add-custom-field-to-category/
- http://wordpress.stackexchange.com/questions/48262/how-to-get-category-id-from-post-id
plugins :
@samsonasik
samsonasik / project structure
Created February 16, 2015 17:27
sample documented code
```
AppName
config
module
Product
src
view
README.md
Admin
src
@samsonasik
samsonasik / DownloadButtonLink.php
Created February 16, 2015 17:28
sample documented code
<?php
/**
* @author Manuel Stosic <manuel.stosic@krankikom.de>
*/
namespace Zf2demo\Hydrator;
use Zend\Stdlib\Hydrator\ClassMethods;
/**
<?php
// Use the Abstract query, which has nearly all needed Methods as the Query.
$this->queryMock = $this->getMockBuilder('\Doctrine\ORM\AbstractQuery')
->setMethods(array('setParameter', 'getResult'))
->disableOriginalConstructor()
->getMockForAbstractClass();
<?php
namespace Mocks;
use Doctrine\DBAL\Driver\Statement;
/**
* Doctrine DBAL Statement implementing \Iterator.
*
* This class has been created because of a bug in PHPUnit Mock Objects.