Skip to content

Instantly share code, notes, and snippets.

View samplenull's full-sized avatar
🏠
Working from home

Denis Kazimirov samplenull

🏠
Working from home
View GitHub Profile
@samplenull
samplenull / generate.md
Created April 10, 2019 18:00
Generate fixture to entity with Alice Generate Bundle with specific Id

First set in src/Trappar/AliceGeneratorBundle/Resources/config/services.yml

trappar_alice_generator.metadata.chain_driver ... public: true

Then you can execute for specifi ID's like this:

generate:fixtures --entities="[ 'App\Entity\EntityName', ['id', ['2', '3'] ] ]" -o"fixtures/entity.yml"

@samplenull
samplenull / gist:37e5933d6bb57e86ee2e
Created August 13, 2014 14:04
SourceTree log 13.08.2014
13.08.14 14:19:43,128 HyperSwitch[751]: LoadScreenOperation finished while activating, win:<OCWindow id:22155 owner:SourceTree(95962) cgtitle:uts24-sf (Git) space:3>, visible: 0, executing: 0
13.08.14 14:19:43,129 HyperSwitch[751]: LoadScreenOperation finished while activating, win:<OCWindow id:22151 owner:SourceTree(95962) cgtitle:capifony-deploy (Git) space:3>, visible: 0, executing: 0
13.08.14 14:58:31,442 com.apple.launchd.peruser.503[291]: (com.torusknot.SourceTreeNotMAS.32416[95962]) Exited: Terminated: 15
13.08.14 14:58:37,270 gkbisd[284]: Unable to collect cdhash for /Applications/SourceTree.app (error code 100024)
13.08.14 14:58:37,383 SourceTree[7911]: registerCustomValueTransformers on main thread
13.08.14 14:58:38,149 SourceTree[7911]: BUG in libdispatch client: kevent[EVFILT_WRITE] delete: "No such file or directory" - 0x2
13.08.14 15:09:30,882 HyperSwitch[751]: LoadScreenOperation finished while activating, win:<OCWindow id:24014 owner:SourceTree(7911) cgtitle:capifony-deploy (Git) space:3>, vis
@samplenull
samplenull / gist:d8a566124ae76f7695ab
Created July 8, 2014 18:54
Jenkins Extensible Choice Branch select
def gettags = "git ls-remote git@bitbucket.org:mycomp/myrepo.git".execute()
def tags = []
def t1 = []
gettags.text.eachLine {tags.add(it)}
for(i in tags) {
def branch = i.split()[1].replaceAll('\\^\\{\\}', '').replaceAll('refs/heads/', '')
if (branch != 'HEAD'){
t1.add(branch)
}
}
@samplenull
samplenull / gist:8974313
Created February 13, 2014 12:33
regex for doctrine annotations in intelij IDEA
todo:
Search: @(Annotation|AnsiQuoteStrategy|AssociationOverride|AssociationOverrides|AttributeOverride|AttributeOverrides|ChangeTrackingPolicy|ClassMetadata|ClassMetadataFactory|ClassMetadataInfo|Column|ColumnResult|CustomIdGenerator|DefaultEntityListenerResolver|DefaultNamingStrategy|DefaultQuoteStrategy|DiscriminatorColumn|DiscriminatorMap|ElementCollection|Entity|EntityListenerResolver|EntityListeners|EntityResult|FieldResult|GeneratedValue|HasLifecycleCallbacks|Id|Index|InheritanceType|JoinColumn|JoinColumns|JoinTable|ManyToMany|ManyToOne|MappedSuperclass|MappingException|NamedNativeQueries|NamedNativeQuery|NamedQueries|NamedQuery|NamingStrategy|OneToMany|OneToOne|OrderBy|PostLoad|PostPersist|PostRemove|PostUpdate|PreFlush|PrePersist|PreRemove|PreUpdate|QuoteStrategy|SequenceGenerator|SqlResultSetMapping|SqlResultSetMappings|Table|UnderscoreNamingStrategy|UniqueConstraint|Version)
Replace: @ORM\\\\\$1
@samplenull
samplenull / Magento cron lister
Last active December 23, 2015 08:49 — forked from werdan/Magento cron lister
Magento cron lister
<?php
// shell/listAllCron.php
require_once 'abstract.php';
class Mage_Shell_CronLister extends Mage_Shell_Abstract
{
public function run()
{f
$cronJobs = Mage::app()->getConfig()->getNode('crontab/jobs');