sudo apt-get install -y unixodbc unixodbc-dev unixodbc-bin libodbc1 odbcinst1debian2 tdsodbc php5-odbc
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
--Verificar si va a haber emails repetidos al cambiar todos a @yopmail | |
------------------------------------------------------------------------------------------------- | |
SELECT REPLACE(email, SUBSTRING_INDEX(email, '@', -1), 'yopmail.com') as nuevo_email, count(*) as cant | |
FROM `email` | |
GROUP BY nuevo_email | |
HAVING cant > 1 | |
--Actualizar todos los emais a @yopmail | |
------------------------------------------------------------------------------------------------- |
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
SELECT COUNT( ID ) AS usuarios, DATE_FORMAT( created_at, '%Y/%m' ) AS fecha | |
FROM `fos_user` | |
WHERE 1 | |
GROUP BY DATE_FORMAT( created_at, '%Y/%m' ) | |
LIMIT 0 , 30 |
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
//Fuente http://vblanch.com/logging-to-file-in-prestashop/?lang=es | |
$logger = new FileLogger(0); //0 == nivel de debug. Sin esto logDebug() no funciona. | |
$logger->setFilename(_PS_ROOT_DIR_."/log/debug.log"); | |
$logger->logDebug("Nueva Petición variables GET"); | |
$logger->logDebug(print_r($_GET, true)); | |
$logger->logDebug("Nueva Petición variables POST"); | |
$logger->logDebug(print_r($_POST,true)); |
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
SELECT `id_customer`,`id_gender`, `birthday`, `newsletter`, `optin`, `date_add`, `date_upd`, | |
(SELECT count(id_order) | |
FROM `ps_orders` inner join ps_order_state on ps_orders.current_state = ps_order_state.id_order_state | |
WHERE ps_orders.id_customer = ps_customer.id_customer and ps_order_state.paid = 1) orders | |
FROM `ps_customer` | |
WHERE 1 | |
ORDER BY orders DESC |
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
server { | |
listen 80; | |
listen [::]:80; #Use this to enable IPv6 | |
server_name www.example.com; | |
root /var/www/prestashop17; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
index index.php index.html; |
The php-apcu-bc
package provides a backwards compatibility layer from apcu -> apc, and is reuqired for some older PHP code bases (e.g. Yii 1). The package is not (yet) available in the Ubuntu 16.04 repos. To install it, use php-pear:
sudo apt-get install php-dev php-pear
sudo pecl install apcu_bc-beta
Then edit /etc/php/7.0/apache2/php.ini
and add the following at the end of the file:
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
//Poner esta fórmula en Google Sheets | |
//F13 sería la url = https://www.byma.com.ar/especie/irc9o/ | |
=INDEX(IMPORTXML(F13,"//ul[@class='species-values']//span"),1) | |
//Alternativa si necesitan formatear el texto a número reemplaza '.' por '' y ',' por '.' | |
=SUBSTITUTE(SUBSTITUTE(INDEX(IMPORTXML(F13,"//ul[@class='species-values']//span"),1),".",""),",",".") |
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
-- Go the CSVs path and then connect to the MySQL Server | |
mysql --user=YOURUSER --password=YOURPASSWORD --host=localhost --local-infile=1 YOURDATABASE | |
LOAD DATA LOCAL INFILE 'YOURFILENAME.csv' | |
INTO TABLE YOURTABLE | |
FIELDS TERMINATED by ',' | |
LINES TERMINATED BY '\n'; |
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
<?php | |
// Your code here! | |
$text = "Alameda01 Alameda CACCS | |
Alpine02 Alpine CACCS | |
Amador03 Amador CACCS | |
Butte04 Butte CACCS | |
Calavera05 Calaveras CACCS | |
CCosta07 Contra Costa CACCS | |
Colusa06 Colusa CACCS |
OlderNewer