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
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 / developers-resources-list.md
Created January 16, 2019 02:16
[Developers Links and Resources] List of resource to Developers #resources
@anibalardid
anibalardid / Session-duration.php
Created January 26, 2019 20:19
Change session expiration
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
@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
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
probando ingresar nuevo snippet
@anibalardid
anibalardid / test-lepton.txt
Created March 6, 2019 16:39
[prueba desde lepton] descripcion en lepton #testtag
probando lepton
@anibalardid
anibalardid / test-github.txt
Created March 6, 2019 16:43
descripcion en github directamente
probando nuevo desde github
va
@anibalardid
anibalardid / test-gisto.txt
Last active March 6, 2019 16:43
prueba en Gisto
probando nuevo en gisto
@anibalardid
anibalardid / functions.php
Created March 6, 2019 20:21
integración de woocommerce con paid membership pro #wordpress #woocommerce
add_action('template_redirect','pmpro_woocommerce_redirect_checkout');
function pmpro_woocommerce_redirect_checkout(){
$id = get_option('pmpro_checkout_page_id');
global $post;
if($post->ID == $id && !empty($_REQUEST['level'])){
global $wpdb;
$product_id = $wpdb->get_var($wpdb->prepare("SELECT pm.post_id FROM {$wpdb->postmeta} as pm LEFT JOIN {$wpdb->posts} as p ON p.ID=pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %d AND p.post_status='publish'",'_membership_product_level',$_REQUEST['level']));
if(!empty($product_id)){
$checkout_url = WC()->cart->get_checkout_url();
if ( sizeof( WC()->cart->get_cart() ) > 0 ) {