Skip to content

Instantly share code, notes, and snippets.

View francosalcedo's full-sized avatar
🏠
Working from home

Franco Salcedo francosalcedo

🏠
Working from home
  • Lima, Perú
View GitHub Profile
@francosalcedo
francosalcedo / gist:fddc51a0abfc3956a1750a080e842e52
Created August 28, 2018 13:58
Node - webpack - Error: watch ENOSPC
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Reference: https://github.com/facebook/jest/issues/3254
@francosalcedo
francosalcedo / DatabaseSeeder.php
Created May 24, 2018 16:42 — forked from bgallagh3r/DatabaseSeeder.php
Disable Foreign Key Constraints when Seeding DB with Artisan Migrate/DB Seed This prevents SQL from throwing errors when you try to do DB::table()->truncate() as TRUNCATE is disallowed when FK constraints are in place.
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
@francosalcedo
francosalcedo / gist:26c32f683acaaad24804b4e773443fae
Created April 19, 2018 04:47
Laravel in shared hosting apache htaccess
In root directory (public_html/.htaccess)
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
In public/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
@francosalcedo
francosalcedo / gist:6916d535c69ceb9680a88eb7905545d5
Created April 18, 2018 19:32
El Modelo de Desarrollo Testing y Producción
https://www.linuxito.com/programacion/237-el-modelo-de-desarrollo-testing-y-produccion
@francosalcedo
francosalcedo / gist:a84dfea6afed967b59df03686203da6c
Created April 18, 2018 17:55
error ENOSPC in laravel-mix npm run watch
Solution: Increasing the amount of inotify watchers
run this command :
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
-----
@francosalcedo
francosalcedo / gist:53f2ced2e62fa564fac41d18733a09c4
Created April 18, 2018 14:24
Domain shared ip ISPCONFIG problem
- In new webiste select -> * <- to share the same ip
- select ip to use ip
:Danger: select unique ip for some sites provoque problems.
:DNS ZONE: same logic
@francosalcedo
francosalcedo / Install-Mcrypt.md
Created April 16, 2018 02:37 — forked from idleberg/Install-Mcrypt.md
Install Mcrypt on macOS

Setup php-mycrypt on macOS (and versions of Mac OS X)

These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.

Install

Install Mcrypt using Homebrew

# PHP 7
@francosalcedo
francosalcedo / gist:6955ef47040e5d710829b360bad95221
Last active April 16, 2018 02:03
PHP all versions on CENTOS 7 - REMI REPO configure .SO file for httpd
-- Install remi repository:
(Need epel repository :: yum install epel-release)
cd /tmp
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -ivh remi-release-7.rpm
-- Install php
select
p.idproducto,
p.nombreproducto,
p.idproveedor,
p.idcategoría,
p.unidadesenexistencia,
pr.nombrecontacto,
pr.cargocontacto,
ca.nombrecategoría
@francosalcedo
francosalcedo / gist:26273f7e51348b8ee829383f6f55f48f
Created April 11, 2018 21:17
Add php 7 to Ispconfig 3 - CENTOS 7.4
cd /tmp
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -ivh remi-release-7.rpm
You can install PHP7.0 in no-conflict mode. This means that your FPM service will be php70-php-fpm, your php.ini will be different, and your cli will be php70
Code:
yum install php70-php-bcmath php70-php-cli php70-php-common php70-php-fpm php70-php-gd php70-php-intl php70-php-json php70-php-mbstring php70-php-mcrypt php70-php-mysqlnd php70-php-opcache php70-php-pdo php70-php-pear php70-php-pecl-uploadprogress php70-php-pecl-zip php70-php-soap php70-php-xml php70-php-xmlrpc -
Edit /etc/opt/remi/php70/php-fpm.d/www.conf