Skip to content

Instantly share code, notes, and snippets.

View liuggio's full-sized avatar

Giulio De Donato liuggio

  • Radical Company
  • London
View GitHub Profile
@liuggio
liuggio / SwapKeys.md
Last active December 26, 2015 12:29
SwapKeys joke

Swap Keys the funny joke

we are a great team @gianpiero2012 @toretto460 @danieledangeli @claudio-dalicandro

The game consists of inverting 2 keyboard keys both physically and in terms of key-map of your team mate.

It doesn't require root access.

Install

@liuggio
liuggio / .gitignore_global
Last active December 26, 2015 07:19
git init
.idea
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
@liuggio
liuggio / generator.php
Last active December 24, 2015 08:29
problem with generator during eval
<?php
// with $this->serializer = $this->getMock('Symfony\Component\Serializer\SerializerInterface');
// the $code content into the eval($code) into phpunit/phpunit-mock-objects/PHPUnit/Framework/MockObject/Generator.php
class Mock_SerializerInterface_ec3da84e implements PHPUnit_Framework_MockObject_MockObject, JMS\Serializer\SerializerInterface
{
private static $__phpunit_staticInvocationMocker;
private $__phpunit_invocationMocker;
public function __clone()
{
@liuggio
liuggio / All Your Pull request.md
Last active September 14, 2020 10:05
Your Pull Request timeline

In order to obtain all your Open source Pull-Request history:

  1. Go to Google bigquery and execute the following query replacing liuggio with your GitHub login

  2. execute query

SELECT repository_url, repository_owner, repository_name, count(*) as numberOfPR
FROM [githubarchive:github.timeline]
WHERE payload_pull_request_head_repo_owner_login = "liuggio"
<?php
$factory = new FactoryObject();
$this->changeSetEventManager = new EventManager();
$this->changeSet = new ChangeSet($this->changeSetEventManager);
$extractor = new IdentityExtractorFactory();
$extractor->add('Spicci\Github\Entity\Milestone', '\Spicci\Github\IdIdentityExtractor');
$this->identityMap = new IdentityMap($extractor);
@liuggio
liuggio / speakmes.sh
Created February 14, 2013 17:56
after long bash processing this speak the message
function speakmsg {
MESSAGE="OK";
ERROR_="Fail";
LANG="english";
if [ $1 -ne 0 ]; then MESSAGE=$ERROR;fi;
echo $MESSAGE |espeak -p 10 -s 70 -v $LANG;
}
#usage
phpunit; #or your favourite long command
@liuggio
liuggio / CachedRepository.php
Created January 29, 2013 15:48
Cached repository
<?php
namespace Tvision\Bundle\BookingCoreBundle\Repository;
/**
*
* usage
* Class MyRepository extends CachedRepository
* $query->setMaxResults(1);
* $this->setCache($query, __METHOD__);
@liuggio
liuggio / software-team-manifesto.md
Last active December 9, 2015 22:39
In the chaos of the implict, the tvision team creates this document with few concepts in order to unify the coding and some basic knowledge. If you are a developer and you are in the 2013 I think that you are already proficient with this notions. Please help me to improve this document forking the gist.
@liuggio
liuggio / gist:4044571
Created November 9, 2012 08:54
gem list
gem install --version 2.13.4 capistrano
gem install --version 2.1.16 capifony
gem install --version 0.2.0 capistrano-notifier
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activesupport (3.2.8)
builder (3.0.4)
@liuggio
liuggio / oneliner.sh
Created August 31, 2012 09:22
one liner PROUDLYGIDEA
# a simple user can execute a 'service php5-fpm reload'
# modify
userx ALL=(root) NOPASSWD: /usr/sbin/service php5-fpm reload, /usr/bin/setfacl
#to your /etc/sudoers be careful leave the last line empty
#apache2
userx ALL=(root) NOPASSWD: /usr/sbin/service apache2 restart, /usr/sbin/service apache2 start, /usr/sbin/service apache2 stop, /usr/bin/setfacl
#akc-grep