Skip to content

Instantly share code, notes, and snippets.

View mig1098's full-sized avatar

miglio esaud mig1098

View GitHub Profile
@mig1098
mig1098 / readexcel.php
Last active March 19, 2019 16:56
Read data from excel. PHPExcel library
<?php
include('../PHPExcel/PHPExcel/IOFactory.php');
//@param $temp_file path name of file or tmp_name from input file
function leerArchivoExcelCsv($temp_file){
$arrayData = array();
$inputFileName = $temp_file;
/*check point*/
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
@mig1098
mig1098 / readcsv.php
Created March 19, 2019 17:10
Read csv files from csv. PHP
<?php
//tmp_name from input file
//@param array $tmp
//@return array
function leercsv($tmp){
$arrayData = array();
if(!($handle = @fopen ($tmp, 'rb'))){
throw new \Exception('Error en la carga del fichero');
}else{
$row = 1;
@mig1098
mig1098 / settings.json
Created June 27, 2019 00:52
vscode php intellisense json configuration
{
"php.validate.enable": true,
"php.validate.executablePath": "C:\\Users\\Administrador\\AppData\\Local\\Programs\\php\\php7.0.10\\php.exe",
"php.validate.run": "onType",
"php.executablePath": "C:\\Users\\Administrador\\AppData\\Local\\Programs\\php\\php7.0.10\\php.exe",
"window.zoomLevel": -1,
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"workbench.iconTheme": "Monokai Pro Icons",
"workbench.colorTheme": "Dark++"
}
@mig1098
mig1098 / jquery.browser.js
Last active July 10, 2019 15:59
jquery browser, Uncaught TypeError: Cannot read property 'msie' of undefined
/* Uncaught TypeError: Cannot read property 'msie' of undefined */
/* add to jquery to fix */
jQuery.browser = {};
(function () {
jQuery.browser.msie = false;
jQuery.browser.version = 0;
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
jQuery.browser.msie = true;
jQuery.browser.version = RegExp.$1;
}
@mig1098
mig1098 / hand.svg
Created July 11, 2019 22:07
svg hand
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mig1098
mig1098 / execute.php
Last active August 16, 2019 06:53
aumentar el procesos de un archivo
<?php
ini_set("max_execution_time", "-1");
ini_set("memory_limit", "-1");
ignore_user_abort(true);
set_time_limit(0);