Skip to content

Instantly share code, notes, and snippets.

View cargabsj175's full-sized avatar

Carlos Sánchez cargabsj175

View GitHub Profile
add_action( 'woocommerce_after_shop_loop_item_title', 'cj_show_dimensions', 9 );
function cj_show_dimensions() {
global $product;
$dimensions = $product->get_dimensions();
if ( ! empty( $dimensions ) ) {
echo '<p style="font-family: CaviarDreams; color: #b3b3b3; text-transform: uppercase; font-weight: bold;" class="dimensions">' . $dimensions . '</p>';
}
}
add_shortcode( 'show_dimensions', 'cj_show_dimensions' );
/**
* Attributes shortcode callback.
* Original by: https://stackoverflow.com/users/383847/helgatheviking
*/
/**
* Usage: This would be used in 1 of 2 ways.
* First, to display specific attributes use:
* [display_attributes attributes="color|material"]
* Second, to display all attributes use:
const getBsfOfParalelo = (ticker, quantity, discount = 0) => {
ticker = ticker.toUpperCase();
return fetch("https://s3.amazonaws.com/dolartoday/data.json")
.then(res => res.json())
.catch((err) => { throw new Error('Data cannot be reached. Check the URL.') })
.then(val => {
let price = val[ticker].dolartoday;
@cargabsj175
cargabsj175 / dolar-today.pl
Created January 31, 2018 03:07 — forked from Dalboz/damedolar.py
one liner para ver el precio del dólar paralelo :(
perl -MLWP::Simple -MJSON -e '$ref = JSON->new->utf8(0)->decode(get("https://s3.amazonaws.com/dolartoday/data.json")); print $ref->{'USD'}{'transferencia'}. "\n";'
@cargabsj175
cargabsj175 / cirilyc2latin.sh
Created December 29, 2015 02:17
Transliteration
#!/bin/bash
# Carlos Sanchez <cargabsj175 (at) gmail.com>
# Proyecto VegnuX 2007-2011
# cirilyc to latin 0.1 GPL v3
# cirilyc alphabet (russian)
c0="А"
c1="а"
c2="Б"
c3="б"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>OK TOR: bitcoin faucets</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 1.23.1" />
</head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Mis monederos:</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 1.24.1" />
</head>
@cargabsj175
cargabsj175 / faucets.html
Last active September 28, 2016 19:21
xapo & faucetBOX
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>
<div>
<h2 align="center"> Pago directo a monederos </h2>
<table align="center" border="1">
<tbody><tr>
<th>Faucet</th>
<th>Depósitos</th>
@cargabsj175
cargabsj175 / video_ssh.sh
Last active August 29, 2015 14:27
A Remote video via ssh script
#! /bin/bash
#
# View your remote webcam via ssh...
#
VFILE=dump_$(date +%Y%m%d_%H%M)
ssh root@192.168.0.101 \
ffmpeg -b 100K \
-an \
-f video4linux2 \
{
"accessibility.invert": false,
"accessibility.screenreader": false,
"alarm.enabled": false,
"app-transition.enabled": true,
"app.cards_view.screenshots.enabled": true,
"app-suspending.enabled": false,
"app-themecolor.enabled": true,
"app.launch_path.blacklist": [],
"app.reportCrashes": "ask",