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 / Gmail password reset
Created Mar 10, 2017 — forked from bjarki/Gmail password reset
Reset gmail password 100 times
View Gmail password reset
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Versions
'
' Version: 1.5
' source: inzi.com
'
' Change Log
'
' v1.0
' Original
@pborreli
pborreli / YourCommand.php
Last active Aug 23, 2020
Show progress of a file download inside Symfony 2.3 console #howto
View YourCommand.php
<?php
protected function execute(InputInterface $input, OutputInterface $output)
{
$progress = $this->getHelperSet()->get('progress');
$ctx = stream_context_create(array(), array('notification' => function ($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) use ($output, $progress) {
switch ($notification_code) {
case STREAM_NOTIFY_FILE_SIZE_IS:
$progress->start($output, $bytes_max);
break;
@pborreli
pborreli / 01_requirements.sh
Last active Dec 5, 2019
All you need to generate timelapse video of a github project development activity like : http://www.youtube.com/watch?v=nY1j3O4nWDI&hd=1
View 01_requirements.sh
brew install gource
brew install ffmpeg
@pborreli
pborreli / default.vcl
Last active Sep 8, 2016
If you are using Varnish and ESI with a Symfony application and need to profile not only the master request but with ESI requests included, don't announce your ESI support, Symfony will fallback to internal sub requests.
View default.vcl
sub vcl_recv {
if (req.http.X-Blackfire-Query && client.ip ~ profile) {
//set req.backend_hint = backend1; // if you want to disable loadbalancer to profile (aka only 1 backend needs blackfire extension
return (pass);
} else {
// Add a Surrogate-Capability header to announce ESI support.
set req.http.Surrogate-Capability = "abc=ESI/1.0";
}
}
@pborreli
pborreli / .gitlab-ci.yml
Last active Mar 15, 2016
Validate your Varnish VCL file using GitLab-CI
View .gitlab-ci.yml
image: newsdev/varnish:4.1.0
test:
script:
- /usr/local/sbin/varnishd -C -f default1.vcl
View gist:5934461

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@pborreli
pborreli / Instruction.md
Last active Dec 19, 2015
How to retrieve your GitHub Pull Request count using Google bigquery
View Instruction.md

Go to Google bigquery and execute the following query replacing XXX with your GitHub login

View strpos.php
$ gtime php substrstrlen.php
0.43 user
0.01 system
0:00.56 elapsed
0.43 user
0.01 system
0:00.50 elapsed
0.42 user
@pborreli
pborreli / gist:3906751
Created Oct 17, 2012
top 10 commands of one of my vagrant vm
View gist:3906751
cut -f1 -d" " ~/.bash_history | sort | uniq -c | sort -nr | head -n 10
142 bin/behat
61 php
27 cd
25 sudo
22 ls
15 ps
14 export
12 Xvfb
9 pear