This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests; | |
use Illuminate\Contracts\Console\Kernel; | |
/** | |
* Original source: https://gist.github.com/mberizzo/013f49d89b96049c5e8c73284efdb071 | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen 443; | |
server_name www.mywebsite.com; | |
return 301 $scheme://mywebsite.com$request_uri; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# exclude everything except directory themes/mytheme | |
/* | |
!README.md | |
!.editorconfig | |
!.gitignore | |
!artisan | |
!composer.json | |
!server.php | |
!.htaccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://freegeoip.net/csv/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avconv -i video.webm -s 640x480 output.webm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i output.webm -r 10 -cpu-used 5 -c:v libx264 -crf 20 -c:a aac -strict experimental -loglevel error output.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i video.mkv -acodec libmp3lame audio.mp3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// When i have to upload multiple files in a shared hosting: | |
// 1. Compress your project and upload to your shared server | |
// 2. Visit url via shell (ex: "curl http://domain.com/unzip.php &") or any navigator | |
// Alternative step 2 (sometimes php throw timeout error): | |
// 1. Create a cronjob that visit unzip.php file (just one time) | |
error_reporting(E_ALL ^ E_STRICT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErrorException: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 954 | |
It's because of a lack of memory. You need to set up a swap file so that composer can do it's thing: | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=512k | |
mkswap /swapfile | |
swapon /swapfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can import "file.sql" file using the standard input like this: | |
* mysql -u <user> -p <dbname> < file.sql | |
Import mysql database in laradock. Note: database "my-database-name" should be exists (empty) | |
docker-compose exec -T mysql mysql -uroot -proot my-database-name < /home/matias/Downloads/my-database-name.sql | |
Import all mysql databases | |
mysql -u root -p < all_databases.sql | |
You can export all mysql databases to "all_databases.sql" |
NewerOlder