This file contains 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
sudo vi /etc/php/7.1/fpm/pool.d/www.conf | |
comment out last two lines | |
add | |
user = vagrant | |
group = vagrant | |
write/quit | |
sudo service php7.1-fpm restart | |
sudo service nginx restart |
This file contains 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
COMPOSER_CACHE_DIR=/tmp/foo composer update |
This file contains 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
**** create file: sudo vi /etc/logrotate.d/descriptive_name_here | |
**** code example, e.g., this one is symfony: | |
/var/www/current/var/logs/prod.log { | |
su ubuntu www-data | |
create 0664 ubuntu www-data | |
daily | |
missingok | |
rotate 14 | |
compress |
This file contains 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
***new migrations might need seeds in laravel. If you try to run "php artisan migrate --seed", artisan will choke on it. | |
***the solution is to call the seeder from the migration: | |
public function up() | |
{ | |
//schema changes here | |
//now the data migration | |
Artisan::call('db:seed', [ | |
'--class' => MigrationSpecificSeeder::class, | |
]); |
This file contains 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
touch `grep "^ *ModPagespeedFileCachePath" /etc/apache2/mods-enabled/pagespeed.conf | awk ' { print $2; } ' | sed 's/"//g'`/cache.flush | |
or | |
touch `grep "^ *ModPagespeedFileCachePath" /etc/httpd/conf.d/pagespeed.conf | awk ' { print $2; } ' | sed 's/"//g'`/cache.flush |
This file contains 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
#!/usr/bin/env node | |
// Save hook under `project-root/hooks/before_prepare/` | |
// | |
// Don't forget to install xml2js using npm | |
// `$ npm install xml2js` | |
// tested with Cordova 7.0.1 & Ionic 3.7.0 | |
var fs = require('fs'); | |
var xml2js = require('xml2js'); |
This file contains 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
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
PROMPT='%{$fg_bold[blue]%}$USER@%M %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains 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
git update-index --assume-unchanged <file-path> |
This file contains 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
(href=")([A-Za-z0-9_\.\/-]*)(") (no http or https://) | |
(href=")([\:A-Za-z0-9_\.\/-]*)(") (any url string in an href) |
This file contains 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
SELECT table_schema 'database', | |
Round(Sum(data_length + index_length) / 1024 / 1024, 1) | |
FROM information_schema.tables | |
GROUP BY table_schema; |
OlderNewer