Skip to content

Instantly share code, notes, and snippets.

View anibalardid's full-sized avatar
Working from home

Anibal anibalardid

Working from home
View GitHub Profile
anibalardid /
Last active January 16, 2019 01:46
[Prueba 1] prueba numero 1 de snipper #test #bash
How to install Linux AppImage
Make the AppImage executable:
$ chmod a+x ~/Downloads/cacher-2.3.6-x86_64.AppImage
Run the AppImage:
$ cd ~/Downloads
$ ./cacher-2.3.6-x86_64.AppImage
anibalardid /
Created January 16, 2019 02:15
[Docker Cheat Sheet] #docker

Docker Cheat Sheet

Why Docker

"With Docker, developers can build any app in any language using any toolchain. “Dockerized” apps are completely portable and can run anywhere - colleagues’ OS X and Windows laptops, QA servers running Ubuntu in the cloud, and production data center VMs running Red Hat.

Developers can get going quickly by starting with one of the 13,000+ apps available on Docker Hub. Docker manages and tracks changes and dependencies, making it easier for sysadmins to understand how the apps that developers build work. And with Docker Hub, developers can automate their build pipeline and share artifacts with collaborators through public or private repositories.

Docker helps developers build and ship higher-quality applications, faster." -- What is Docker

anibalardid / Session-duration.php
Created January 26, 2019 20:19
Change session expiration
View Session-duration.php
ini_set('session.cookie_lifetime', 60 * 60 * 24 * 7); // 7 day cookie lifetime
ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 7);
ini_set('session.save_path', '/home/yoursite/sessions');
setcookie('PHPSESSID','any id' , any time);
anibalardid / notification-bar-set-cookie.html
Last active February 26, 2019 02:31
[notificaciones jquery con uso de cookies] para mostrar notificaciones x usuario y poder cerrarlas #js #jquery
View notification-bar-set-cookie.html
anibalardid / conditionals-plugins-wp.txt
Last active December 22, 2020 22:00
[carga condicional de plugins en wp] texto y codigo de ayudawp #WordPress #Plugins
View conditionals-plugins-wp.txt
Vamos al lío. Empezamos con la estructura básica de nuestro MU-Plugin, que será de este estilo, muy sencillo, con la llamada del filtro option_active_plugins a nuestra función ayudawp_option_active_plugins donde modificaremos el array de plugins activos ($plugin_list), quedando tal que así:
// Ejecutar el filtro solo para front-end
add_filter( 'option_active_plugins', 'ayudawp_option_active_plugins', 1);
function ayudawp_option_active_plugins ( $plugin_list ){
//Aqui irán las condiciones
//Y aquí devolvemos a WordPress el listado de plugins que queremos cargar
anibalardid / selector.php
Last active July 16, 2019 12:01
[carga condicional plugins wp] codigo mio viejo #WordPress #Plugins
View selector.php
// My post:
Plugin Name: Plugin Selector
Plugin URI:
Description: Removes plugins in selected pages
Author: Anibal Ardid
Version: 1.0
Author URI:
anibalardid / woocommerce-urls-custom.txt
Created February 28, 2019 14:23
[direct url woocommerce custom] enlaces directos de woocommerce como para agregar productos al carrito #woocommerce #WordPress
View woocommerce-urls-custom.txt
anibalardid /
Created March 6, 2019 16:38
descripcion en
probando ingresar nuevo snippet
anibalardid / test-lepton.txt
Created March 6, 2019 16:39
[prueba desde lepton] descripcion en lepton #testtag
View test-lepton.txt
probando lepton