Skip to content

Instantly share code, notes, and snippets.

View emamut's full-sized avatar
💭
💎Harder. 🏆Better. ⚡Faster. 💪🏾Stronger

Faber Andrés Vergara Holguín emamut

💭
💎Harder. 🏆Better. ⚡Faster. 💪🏾Stronger
View GitHub Profile
@emamut
emamut / map.js
Last active August 16, 2018 15:14
Get leaflet map center
mapAt.on('dragend', function (e) {
var center = mapAt.getCenter()
console.log('center', center)
});
{
"scripts": {
"build-css": "node-sass-chokidar --include-path ./node_modules src/assets/sass -o src/assets/css",
"watch-css": "npm run build-css && node-sass-chokidar src/assets/sass -o src/assets/css --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build-js": "react-scripts build",
"build": "npm-run-all build-css build-js",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
@emamut
emamut / foo.html
Last active January 24, 2018 22:09
Whatsapp link example
<a href="https://web.whatsapp.com/send?l=es&amp;phone=5215581852761&amp;text=Quiero Informacion del Curso en" class="whatsapp_1 float float-right float-floatingButtonCenter" style="background-color: #25d366;" target="_blank">
<i class="whatsapp_1 fa fa-whatsapp whatsapp "></i>
</a>
@emamut
emamut / reset_mysql_root_password.sh
Last active April 24, 2018 14:12
Reset MySQL 5 root password - Ubuntu
# Stop MySQL
sudo service mysql stop
# Make MySQL service directory.
sudo mkdir /var/run/mysqld
# Give MySQL user permission to write to the service directory.
sudo chown mysql: /var/run/mysqld
# Start MySQL manually, without permission checks or networking.
@emamut
emamut / 1-elementary-os-apps.md
Last active January 19, 2018 19:11 — forked from ankurk91/1-elementary-os-apps.md
elementary OS 0.4.1 Loki

elementaryOS Apps and Configs

Enbale PPA support

sudo apt-get update
sudo apt-get -y install software-properties-common

Install original plank dock

@emamut
emamut / primera-pagina.html
Created January 4, 2018 13:44
Curso Basico HTML
<html>
<head>
<title>Mi primera pagina HTML</title>
<style>
td {
border: 1px solid;
background: red;
width: 70px
}
h1 {
@emamut
emamut / change-the-collation.php
Last active October 13, 2016 01:10 — forked from tskrynnyk/change-the-collation.php
Changing the collation of all tables in a mysql database.
<?php
// Stolen from: http://www.holisticsystems.co.uk/blog/?p=931
$server = 'localhost';
$username = 'user';
$password = 'password';
$database = 'database';
$new_charset = 'utf8';
$new_collation = 'utf8_general_ci';
[
"Uno",
"Dos",
"Tres",
"Cuatro"
]
@emamut
emamut / foo.html
Last active August 19, 2016 20:43
Banner con Especial en Modal
<!doctype html>
<html lang="es-419">
<head>
<title>7 de 10 productos en Ecuador están entre los más caros</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="text/javascript">
$().ready(function(){
@emamut
emamut / fix-wordpress-permissions.sh
Last active December 20, 2016 04:04 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory