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
anibalardid / test1.sh
Last active January 16, 2019 01:46
[Prueba 1] prueba numero 1 de snipper #test #bash
View test1.sh
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
anibalardid / docker-cheat-sheet.md
Created January 16, 2019 02:15
[Docker Cheat Sheet] #docker
View docker-cheat-sheet.md

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
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');
session_start();
setcookie('PHPSESSID','any id' , any time);
@anibalardid
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
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í:
<?php
// Ejecutar el filtro solo para front-end
if(!is_admin())
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
anibalardid / selector.php
Last active July 16, 2019 12:01
[carga condicional plugins wp] codigo mio viejo #WordPress #Plugins
View selector.php
<?php
// My post: https://es.wordpress.org/support/topic/tutorial-como-deshabilitar-algunos-plugins-de-algunas-paginas-especificas/
/*
Plugin Name: Plugin Selector
Plugin URI: https://ardid.com.ar
Description: Removes plugins in selected pages
Author: Anibal Ardid
Version: 1.0
Author URI: https://ardid.com.ar
*/
@anibalardid
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
https://www.quora.com/How-do-you-create-a-link-direct-to-WooCommerce-checkout-for-1-specific-product
example:
https://www.yourdomainhere.com/cart/?add-to-cart=2573&variation_id=2417&attribute_pa_nou=zfree-trial-2
@anibalardid
anibalardid / test-cacher.io.txt
Created March 6, 2019 16:38
descripcion en cacher.io
View test-cacher.io.txt
probando ingresar nuevo snippet
@anibalardid
anibalardid / test-lepton.txt
Created March 6, 2019 16:39
[prueba desde lepton] descripcion en lepton #testtag
View test-lepton.txt
probando lepton