Skip to content

Instantly share code, notes, and snippets.

View pborreli's full-sized avatar

Pascal Borreli pborreli

View GitHub Profile
@pborreli
pborreli / Gmail password reset
Created March 10, 2017 01:43 — forked from bjarki/Gmail password reset
Reset gmail password 100 times
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Versions
'
' Version: 1.5
' source: inzi.com
'
' Change Log
'
' v1.0
' Original
@pborreli
pborreli / YourCommand.php
Last active August 23, 2020 09:48
Show progress of a file download inside Symfony 2.3 console #howto
<?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 December 5, 2019 17:59
All you need to generate timelapse video of a github project development activity like : http://www.youtube.com/watch?v=nY1j3O4nWDI&hd=1
brew install gource
brew install ffmpeg
@pborreli
pborreli / listpdf.md
Last active May 8, 2017 13:57
Vintage poster for your office
@pborreli
pborreli / default.vcl
Last active September 8, 2016 16:05
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.
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 March 15, 2016 21:05
Validate your Varnish VCL file using GitLab-CI
image: newsdev/varnish:4.1.0
test:
script:
- /usr/local/sbin/varnishd -C -f default1.vcl

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 December 19, 2015 09:29
How to retrieve your GitHub Pull Request count using Google bigquery

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

$ 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 October 17, 2012 17:05
top 10 commands of one of my vagrant vm
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