Skip to content

Instantly share code, notes, and snippets.

View marcoah's full-sized avatar
🏠
Working from home

Marco Hernandez marcoah

🏠
Working from home
View GitHub Profile
@marcoah
marcoah / video.html
Created October 20, 2019 21:12
Mostrar video HTML5
<video id="example_video_1" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="480"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup='{"example_option":true}'>
<source src="rtmp://localhost/live/test" type="rtmp/flv">
</video>
@marcoah
marcoah / importarcsv.sql
Created October 20, 2019 20:47
Importa un csv a una tabla de MYSQL
LOAD DATA LOCAL INFILE 'C:/CompartidoMarcoAntonio/PlanCuentas.csv' INTO TABLE contab.ad010
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\r\n';
@marcoah
marcoah / mapa-google.html
Created October 20, 2019 20:46
Mostrar un Mapa con la API de Google Maps
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body { height: 100%; margin: 0; padding: 0; }
#map { height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
@marcoah
marcoah / consulta_histograma.sql
Created July 10, 2018 06:32
Para construir histogramas (seleccionar datos por rango)
Select CASE WHEN prof < 10 THEN 'Menor a 10'
WHEN prof between 10 AND 20 THEN 'Entre 10 y 20'
ELSE 'Mayor a 20' END as Rango, Count(*) as Cantidad
FROM Perforaciones group by Rango
@marcoah
marcoah / PasarCoordenadasDoubleaGeography.sql
Created April 22, 2018 23:53
Pasar datos de Latitud y Longitud en campos double a un solo campo geography, Codigo para MySQL 5.6
UPDATE perforaciones SET POSICION = GeomFromText(CONCAT('POINT (', LON, ' ', LAT, ')'))
@marcoah
marcoah / CoordenadaDoubleaGeography.sql
Last active April 22, 2018 23:54
Codigo para pasar Latitud y Longitud de campos double a Geography. SQL Server 2008 en adelante
UPDATE [dbo].[Perforaciones]
SET [Posicion] = Geography::STPointFromText('POINT(' + CAST([LON] AS VARCHAR(20)) + ' ' + CAST([LAT] AS VARCHAR(20)) + ')', 4326)
GO