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 / .htaccess
Created October 25, 2017 17:47 — forked from Zodiac1978/.htaccess
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Protect XMLRPC (needed for Apps, Offline-Blogging-Tools, Pingback, etc.)
# If you use that, these tools will not work anymore
(function() {
var preTags = document.getElementsByTagName('pre');
var preWithHeaderInfo = preTags[0];
var preWithContent = preTags[2];
var lines = preWithContent.textContent.split('\n');
// get data about the formatting (changes between different versions of chrome)
var rgx = /^(0{8}:\s+)([0-9a-f]{2}\s+)[0-9a-f]{2}/m;
var match = rgx.exec(lines[0]);
@francosalcedo
francosalcedo / agregar_usuario_a_grupo_existente_mac_os_x.txt
Created November 4, 2017 02:45
Agregar usuario a un grupo existente MAC OS X
sudo dseditgroup -o edit -a 'soyunusuario' -t user soyungrupoexistente
@francosalcedo
francosalcedo / cambiar_contrasena_vps_ovh.txt
Created November 4, 2017 02:48
Cambiar contraseña a un VPS OVH
Cambiar contraseña VPS OVH
1.- Entrar en modo rescate (reniciando vps)
2.- Buscar los accesos temporales en el correo, por si no te deja entrar al vps:: ssh-keygen -R ip-vps
3.- Comprobar el disco donde esta montado el vps :
# fdisk -l
El dispositivo seguido del * es el disco booteable (la partición del vps principal)
(http://docs.ovh.ca/en/guides-ovh-rescue.html#mounting-disk-s )
@francosalcedo
francosalcedo / get_phpini_direcction.txt
Created November 4, 2017 05:46
Obtener dirección de php.ini linux
php -i | grep "Loaded Configuration File"
@francosalcedo
francosalcedo / gist:fea4feb734594e5b0225c301e176ba16
Created November 4, 2017 10:14
Roundcube Webmail Postfix responde unknown user - COMO RESOLVER!
Dirigirse a /etc/postfix/
y editar:
vi /etc/postfix/main.cf
buscar esta linea
mydestination = tudominio.com, localhost, localhost.localdomain
y borrar tudominio.com,
@francosalcedo
francosalcedo / shake.xml
Created November 12, 2017 21:03 — forked from simon-heinen/shake.xml
Simple efecto sacudir (shake) android studio
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:duration="70"
android:fromDegrees="-5"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="5"
android:repeatMode="reverse"
@francosalcedo
francosalcedo / gist:2342215ac6eb0565c04371910702d88f
Created February 10, 2018 07:18
Error laravel command not found :: solucion
Solución:
export PATH="~/.composer/vendor/bin:$PATH"
@francosalcedo
francosalcedo / gist:d845ab68c61dbb405665540c52ca2d9a
Created February 21, 2018 22:32
Add load initial app in shell mac
edit ~/.bash_profile
add laravel via composer example
export PATH="$PATH:~/.composer/vendor/bin"
@francosalcedo
francosalcedo / gist:dc36bc885bfbd8fc42e292c871962ee2
Created March 6, 2018 21:38
Change mariadb root password ubuntu 17.10
UPDATE mysql.user SET authentication_string = PASSWORD('123') WHERE User = 'root' AND Host = 'localhost';