Skip to content

Instantly share code, notes, and snippets.

@silenoth
silenoth / starken.php (obsoleto)
Last active April 19, 2023 05:06
Obsoleto, ahora starken tiene su propia api. [Sencilla función para cotizar los precios de los paquetes enviados a través de Starken (antes Turbus Cargo). * No requiere el modulo allow_url_fopen.]
<?php
/*
* Sencilla funcion para cotizar los precios de los paquetes enviados a traves de Starken (antes Turbus Cargo).
* No requiere el modulo allow_url_fopen.
*/
include 'simple_html_dom.php';
/**
* @param int $origen Código ciudad origen.
Install MySQL / MariaDB
Install with pacman.
sudo pacman -S mariadb
Initialize data directories.
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
By default MySQL will run as the user running the command unless a user is explicitly specified with --user option. Path to the installation directory can be specified with --basedir option while data directory is specified with --datadir.
Vee Validate
v-validate="'required|regex:^([a-zA-Z\\-]+)(\\s+)([a-zA-Z\\-]+)?$'"
it's validate two words with one space
node_modules/laravel-mix/src/index.js
if (Mix.sees('laravel')) {
Config.publicPath = 'system'; //custom folder
}
@silenoth
silenoth / chilexpress.php
Created August 14, 2016 21:25
Version modificada que no requiere el modulo allow_url_fopen. Autor original @nikoskip
<?php
/**
* - Version modificada que no requiere el modulo allow_url_fopen.
*
* Una simple función para obtener los costos de envío de un paquete mediante Chilexpress.
* Como única dependencia se necesita de la liberia PHP Simple HTML DOM Parser: http://simplehtmldom.sourceforge.net/
*
* Para poder comunicarse con Chilexpress, se debe tener la lista de todas las comunas que ellos utilizan y el código
* que le asignan a cada una. En este archivo, al final, podrás encontrar el listado, el cual podrás parsear fácilmente
*/
@silenoth
silenoth / ciudades_starken
Created August 17, 2016 06:11
Ciudades Starken.cl
array (
1287 => 'ACHAO',
2424 => 'AGUA BUENA',
1531 => 'AHUI',
2435 => 'AIQUINA',
1250 => 'ALERCE',
2346 => 'ALGARROBAL',
1143 => 'ALGARROBITO',
588 => 'ALGARROBO',
1331 => 'ALHUE',