Skip to content

Instantly share code, notes, and snippets.

Avatar

Pascal Borreli pborreli

  • Les-Tilleuls.coop
  • Oujda, Morocco
  • Twitter @pborreli
View GitHub Profile
@pborreli
pborreli / bigquery
Last active Aug 29, 2015
Anyone know how I can run some analytics on GitHub repos? Looking to count # of PR’s merged/closed by me this month
View bigquery
SELECT
COUNT(payload_pull_request_number) as counter, payload_pull_request_merged as merged
FROM [githubarchive:github.timeline]
WHERE type="PullRequestEvent"
AND actor = 'parkr'
AND payload_action = 'closed'
AND repository_name = 'jekyll'
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2014-04-01 00:00:00')
GROUP BY merged;
View gist:47d3b3abf3a78251ea14
### Keybase proof
I hereby claim:
* I am pborreli on github.
* I am pborreli (https://keybase.io/pborreli) on keybase.
* I have a public key whose fingerprint is E171 699B D7D7 E75C 9784 4930 7DB5 FAEA 91EE 3C75
To claim this, I am signing this object:
View typos.txt
lingustique -> linguistique
vraiement -> vraiment
suffisament -> suffisamment
video -> vidéo
s'accomoder -> s'accommoder
connnu -> connu
le client envoit une requête -> le client envoie une requête
négoicer -> négocier
la lui envoit -> la lui envoie
fontionne -> fonctionne
View frontendConfiguration.class.php
<?php
/**
The modifications to this class caches in APC all the file system scans that symfony does to find plugins paths, configurations files, modules, etc.
**/
class frontendConfiguration extends sfApplicationConfiguration
{
@pborreli
pborreli / Configuration.class.php
Created Apr 28, 2010
adding ":" to all labels and "*" to all required fields inside symfony 1.3+ forms
View Configuration.class.php
<?php
class privateConfiguration extends sfApplicationConfiguration
{
public function configure()
{
$this->dispatcher->connect('form.post_configure', array($this, 'listenToFormPostConfigure'));
}
/**
@pborreli
pborreli / import
Created May 10, 2010
Dealing with mass import in doctrine/pdo using pcntl_fork
View import
<?php
class importTask extends sfTask
{
protected function execute($arguments = array(), $options = array())
{
$xml = simplexml_load_file('file');
$users = array();
foreach ($xml->users as $user)
{
@pborreli
pborreli / *Configuration.class.php
Created Sep 1, 2010
removing admin gen css files at app/project level
View *Configuration.class.php
<?php
class privateConfiguration extends sfApplicationConfiguration {
public function configure() {
$this->dispatcher->connect('view.configure_format', array($this, 'listenToViewConfigureFormatEvent'));
}
@pborreli
pborreli / Configuration.class.php
Created Sep 13, 2010
how to replace a specific widget by another for all generated forms in symfony
View Configuration.class.php
<?php
class xxxConfiguration extends sfXxxConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
@pborreli
pborreli / Configuration.class.php
Created Sep 14, 2010
how to remove "with_empty" checkbox for all generated formFilters in symfony 1.4
View Configuration.class.php
<?php
class xxxConfiguration extends sfXxxConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
@pborreli
pborreli / ProjectConfiguration.class.php
Created Sep 16, 2010
disable drop-db task in symfony console
View ProjectConfiguration.class.php
<?php
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->dispatcher->connect('command.filter_options', array($this, 'filterCommandOptions'));
}
/**