Skip to content

Instantly share code, notes, and snippets.

View marcolopezs's full-sized avatar

Marco Lopez marcolopezs

  • Marost SAC | DJL Group SAC
  • Perú
View GitHub Profile
@marcolopezs
marcolopezs / metronic
Created June 1, 2024 01:44
Busqueda con expresiones regulares para Metronic
Buscar: <!--layout-partial:([\w\/\-_]+)\.html-->
Reemplazar por: @include('base.$1')
# CAMBIAR EL / POR .
Buscar: (@include\('[^']+?)\/([^']+'\))
Reemplazar por: $1.$2
@marcolopezs
marcolopezs / readme.md
Last active April 10, 2020 17:43
Instalacion de Odoo

INSTALAR UBUNTU

sudo nano /etc/network/interfaces
auto interfaz
iface interfaz inet static
address dirección_ip
netmask máscara
gateway ip_puerta_enlace
sudo /etc/init.d/networking restart
reboot
@marcolopezs
marcolopezs / functions.php
Created March 26, 2020 01:59 — forked from jaredatch/functions.php
WordPress Search Autocomplete using admin-ajax.php
<?php
/**
* Enqueue scripts and styles.
*
* @since 1.0.0
*/
function ja_global_enqueues() {
wp_enqueue_style(
'jquery-auto-complete',
@marcolopezs
marcolopezs / instalacion de odoo en aws.md
Last active April 9, 2020 01:12
Odoo en Amazon AWS EC2

INSTALACION DE DOCKER

$ sudo apt-get update
$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
$ sudo su
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
$ add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt-get update
$ apt-get install docker-ce
@marcolopezs
marcolopezs / lightsail-docker.sh
Created July 24, 2019 15:51 — forked from Jeiwan/lightsail-docker.sh
Auto-Install Docker and Docker Compose on AWS Lightsail
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y docker-engine
sudo curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo groupadd docker
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/**
* Changes the URL used for the Google Sitelink Search Box functionality in WordPress SEO (Premium)
* The returned string must always include {search_term} to indicate where the search term should be used.
*
* @returns string new searchURL
*/
function yoast_change_ssb_search() {
@marcolopezs
marcolopezs / redireccion-http-https
Created October 3, 2018 22:33
Redireccion de HTTP a HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@marcolopezs
marcolopezs / scroll-menu.js
Created November 3, 2017 00:32
Scroll Menu
/*---------------------
SCROLL MENU
----------------------*/
$('a[href*="#"]')
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
@marcolopezs
marcolopezs / paises.csv
Created October 26, 2017 23:46 — forked from brenes/README.md
CSV de paises, con nombre en castellano, ingles, codigo ISO y prefijo telefónico del país
nombre name nom iso2 iso3 phone_code
Afganistán Afghanistan Afghanistan AF AFG 93
Albania Albania Albanie AL ALB 355
Alemania Germany Allemagne DE DEU 49
Algeria Algeria Algérie DZ DZA 213
Andorra Andorra Andorra AD AND 376
Angola Angola Angola AO AGO 244
Anguila Anguilla Anguilla AI AIA 1 264
Antártida Antarctica L'Antarctique AQ ATA 672
Antigua y Barbuda Antigua and Barbuda Antigua et Barbuda AG ATG 1 268
var Vue = require('vue');
var axios = require('axios');
axios.defaults.headers.common['X-CSRF-TOKEN'] = document.querySelector('#token').getAttribute('content');
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
new Vue({
el: '#app',
data: {
servicios: {