Skip to content

Instantly share code, notes, and snippets.

View sebaestel's full-sized avatar

Sebastian Duran sebaestel

View GitHub Profile
@sebaestel
sebaestel / Transantiago public endpoints.md
Created July 12, 2017 03:35 — forked from radutzan/Transantiago public endpoints.md
APIs REST públicas con data del Transantiago. Respuestas en JSON.

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

http://www.transantiago.cl/restservice/rest/getservicios/all

Info completa de servicio

@sebaestel
sebaestel / regiones.topojson
Created March 29, 2016 03:17
Mapa de regiones de Chile enformato JSON, a partir de shapefiles de la BCN http://siit2.bcn.cl/mapas_vectoriales/index_html/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sebaestel
sebaestel / dabblet.css
Created September 17, 2015 02:15
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@sebaestel
sebaestel / dabblet.css
Created September 17, 2015 02:15
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@sebaestel
sebaestel / gist:988ddfe347acfe68424a
Created October 22, 2014 19:40
Directive for charts in angular
app.controller('chartCtrl', function ($scope) {
$scope.addPoints = function () {
var seriesArray = $scope.highchartsNG.series
var rndIdx = Math.floor(Math.random() * seriesArray.length);
seriesArray[rndIdx].data = seriesArray[rndIdx].data.concat([1, 10, 20])
};
$scope.addSeries = function () {
var rnd = []
[
{
"id":15101,
"name":"Arica",
"provincia_id":151
},
{
"id":15102,
"name":"Camarones",
"":151
// autocompletar comunas
function searchLocation(){
$.getJSON( "/static/js/provincias.json", function( data ) {
$.each( data, function( key, val ) {
if($('#comunas option:selected').attr('data-provincia')==val.id){
var provincia = val.name; //provincia
var region_id = val.region_id;
$.getJSON( "/static/js/region.json", function( data ) {
$.each( data, function( key, val ) {
@sebaestel
sebaestel / frameset
Created September 25, 2013 19:38
Framset
<frameset rows="39,*" frameborder="no" border="0" framespacing="0">
<frame src="English/navigation.php?language=English" name="navigationFrame" id="navigationFrame" scrolling="No" noresize="noresize" />
<frame src="English/index.php?language=English" name="contentFrame" id="contentFrame" />
</frameset>