Skip to content

Instantly share code, notes, and snippets.

@Muspi
Muspi / DownloadRemoteFileWithProgressCommand.php
Last active April 18, 2023 07:39
Command for Symfony 3 & 4.Allow to download a remote file to server, and display ProgressBar.
<?php
/**
* Created by PhpStorm.
* User: Muspi
* Date: 29/05/2018
* Time: 16:19
*/
namespace AppBundle\Command;
@Muspi
Muspi / install-wkhtmltopdf.sh
Last active July 26, 2022 14:03 — forked from yajra/install-wkhtmltopdf.sh
Install wkhtmltopdf 0.12.4 (with patched qt)
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
$ sudo dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb
$ sudo apt-get -f install
$ sudo cp /usr/local/bin/wkhtmltoimage /usr/bin
$ sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
@Muspi
Muspi / BaseManager.php
Created March 19, 2017 19:38
Base Entity Manager for Symfony Project
<?php
namespace AppBundle\Manager;
/**
* Base Entity Manager with common methods commonly used
*
* @author benoit
*/
use Doctrine\ORM\EntityManager;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Persistence\ObjectRepository;
@Muspi
Muspi / config
Last active March 10, 2017 22:10
Resolve problem to share same git repo folder between windows and linux
#.git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
autocrlf = false
eol = lf
@Muspi
Muspi / .gitattributes
Last active February 23, 2017 10:32
Resolve EOL problem between while working with git repos on Windows and Linux
#Put this file on the repo root directory
* text=auto eol=lf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.jpeg binary
*.ttf binary
*.eot binary
*.otf binary