Skip to content

Instantly share code, notes, and snippets.

View AndresReyesDev's full-sized avatar
🥣
Cooking the Internet Soup since 1999…

Andrés Reyes Galgani AndresReyesDev

🥣
Cooking the Internet Soup since 1999…
View GitHub Profile
@AndresReyesDev
AndresReyesDev / Transantiago public endpoints.md
Created July 15, 2017 05:45 — forked from radutzan/Transantiago public endpoints.md
APIs REST públicas con data del Transantiago. Respuestas en JSON.

Importante

Transantiago implementó estas APIs para uso interno, por lo que no hay ninguna garantía sobre su funcionalidad, mantenimiento o futura existencia. Úsalas bajo tu propio riesgo. (Probablemente no es aconsejable que las uses para nada crítico.)

Paraderos alrededor de un punto

http://www.transantiago.cl/restservice/rest/getpuntoparada?lat=-33.6089714&lon=-70.5742975&bip=1

Estimación de parada

http://www.transantiago.cl/predictor/prediccion?codsimt=PA420&codser=504 (código de servicio es opcional, pero el parámetro debe estar presente aunque esté vacío)

Lista de servicios

@AndresReyesDev
AndresReyesDev / get-order-detail-by-order-id.php
Created December 26, 2017 16:25 — forked from web-hat/get-order-detail-by-order-id.php
Works with WooCommerce 3.x or above
<?php
if (!function_exists('getOrderDetailById')) {
//to get full order details
function getOrderDetailById($id, $fields = null, $filter = array()) {
if (is_wp_error($id))
return $id;
@AndresReyesDev
AndresReyesDev / delete-all-woocommerce-products.php
Created January 11, 2018 02:00 — forked from mikaelz/delete-all-woocommerce-products.php
Remove all WooCommerce products from database via SQL
<?php
require dirname(__FILE__).'/wp-blog-header.php';
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')");
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'");
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)");
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')");
@AndresReyesDev
AndresReyesDev / chromeflagstweaks.md
Created May 22, 2018 05:29 — forked from Madis0/chromeflagstweaks.md
Useful Chrome chrome://flags tweaks

Useful Chrome chrome://flags tweaks (Also for Firefox)

A list of tweaks in Chrome (Chromium) that enable hidden or upcoming features and are not editable from the main settings page.

Since I don't follow the tweaks by bugs, I am not always sure, what version of Chromium actually shows them. Therefore, I recommend using at least Beta version of the browser, if not Dev or Canary.

How to enable

  1. Open chrome://flags (browser://flags on Yandex, vivaldi://flags on Vivaldi, etc.)
  2. Search for the hashtag title
  3. Set the recommended setting
http://www.counterwise.cl/coleccion-de-web-apis-chilenas/
APIs Abiertas
Feriados: https://www.feriadosapp.com/api/
Regiones-Provincias-Comunas: https://apis.digital.gob.cl/dpa/
Farmacias de turno: http://farmanet.minsal.cl/maps/index.php/ws/getLocalesTurnos
Código postal correos de chile(devuelve pagina web): http://codigopostal.correos.cl:5004/?calle=NombreCalle%20bello&numero=6667&comuna=nombre%20Comuna
Indicadores económicos: http://iframe.lfi-app.cl/indicadores/
@AndresReyesDev
AndresReyesDev / wc-min-order-amount.php
Last active August 24, 2018 21:31 — forked from woogists/wc-min-order-amount.php
Set a minimum order amount for checkout
/**
* Set a minimum order amount for checkout
*/
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 50;
@AndresReyesDev
AndresReyesDev / 2022_01_01_000001_create_regions_table.php
Last active April 13, 2024 12:54
Laravel 8 y Laravel 9 — División Administrativa de Chile: Regiones, Provincias y Comunas. Migraciones y Seeders.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRegionsTable extends Migration
{
/**
* Run the migrations.

WS PROD:

Username: UsrTestServicio

Password: U$$vr2$tS2T

@AndresReyesDev
AndresReyesDev / FocusAppQuotesEspañol.txt
Created January 7, 2020 19:24
Frases para procastinadores en español recopiladas de la web. Puedes importarlas directamente a Focus App de Mac. Sientanse libres de agregar más como comentario a este hilo y las agregaré al documento. ¡Saludo colegas procastinadores!
La procrastinación es como una tarjeta de crédito: es muy divertida hasta que te llega el estado de cuenta -Christopher Parker
Cuando tienes que escalar una montaña, no pienses que esperando se hará más pequeña -Vox Populi
No te pongas a contemplar toda la escalera, simplemente da el primer paso -Martin Luther King
Si pospones las cosas hasta que estés seguro de que están bien, entonces nunca lograrás hacer nada -Norman Vincent Peale
El perfeccionismo es la madre de la procrastinación -Michael Hyatt
Si no fuera por el último minuto, nada se haría -Rita Mae Brown
La procrastinación es el Arte de mantenerse al día con las cosas de ayer -Don Marquis
La mayor debilidad de un erudito es: llamar investigación a la procrastinación -Stephen King
La procrastinación es una de las más comunes y mortales enfermedades, y el pago de su cuota en cuanto a éxito y felicidad es carísimo -Wayne Gretzky
¿Sabes lo que sucede cuando le das una buena idea a un procrastinador?… Nada, no sucede nada -Anónimo
@AndresReyesDev
AndresReyesDev / jpg-png-optimize.md
Created March 4, 2020 03:56 — forked from w33zy/jpg-png-optimize.md
Optimize your jpg & png images with jpegoptim and optipng on linux

JPG and PNG image bulk optimization

Install jpegoptim and optipng

apt update && apt install jpegoptim optipng -y

JPG optimization

cd /path/to/your/image/folder