This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pandas import read_excel | |
import json | |
URL = 'https://www.bccr.fi.cr/indicadores-economicos/cabys/Cabys_catalogo_historial_de_cambios.xlsx' | |
# Los nombres de las columnas Excel vs nombres cortos y eventualmente | |
# propiedades del json | |
cols = { | |
'Descripción (categoría 1)': 'c1', | |
'Descripción (categoría 2)': 'c2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_add_order_item_meta', 'bwd_add_vendor_to_order_item_meta', 10, 2); | |
function bwd_add_vendor_to_order_item_meta( $item_id, $cart_item) { | |
$vendor_id = $cart_item[ 'data' ]->post->post_author; | |
// build up address | |
$address1 = get_user_meta( $vendor_id , '_wcv_store_address1', true ); | |
$address2 = get_user_meta( $vendor_id , '_wcv_store_address2', true ); | |
$city = get_user_meta( $vendor_id , '_wcv_store_city', true ); | |
$store_postcode = get_user_meta( $vendor_id , '_wcv_store_postcode', true ); | |
$address = ( $address1 != '') ? $address1 .', ' . $city .', '. $store_postcode :''; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nvm use v0.10.33 | |
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch. | |
# There are six variants that I have built: | |
# - pre-commit: stops commits to master/main/develop branches. | |
# - pre-commit-2: also includes a core.whitespace check. | |
# - pre-commit-3: the core.whitespace check and an EOF-newline-check. | |
# - pre-commit-4: only the core.whitespace check. | |
# - pre-commit-5: elixir formatting check. | |
# - pre-commit-6: prettier formatting check. | |
# Set the desired version like this before proceeding: |