Skip to content

Instantly share code, notes, and snippets.

View saleiva's full-sized avatar
🤓

Sergio Álvarez Leiva saleiva

🤓
View GitHub Profile
He dado las invitaciones a news.layervault en **explicito** orden cronológico
http://twitter.com/dsaltaren/status/289441866145996800
http://twitter.com/damagedgoods/status/289441977576079360
http://twitter.com/happywebcoder/status/289442291469393920
@saleiva
saleiva / gist:4604263
Last active December 11, 2015 12:58
Delete clicked div and the following ones (jquery)
var array_de_divs = $('div');
$('div').bind('click',function(){
var indice_clickado = $(this).index()
for(i=indice_clickado;i<=a.length-1;i++){
$(a[i]).hide()
}
})
{"cities":[{"pop_max":35676000,"name":"Tokyo"},{"pop_max":19040000,"name":"New York"},{"pop_max":19028000,"name":"Mexico City"},{"pop_max":18978000,"name":"Mumbai"},{"pop_max":18845000,"name":"Sao Paulo"},{"pop_max":15926000,"name":"Delhi"},{"pop_max":14987000,"name":"Shanghai"},{"pop_max":14787000,"name":"Kolkata"},{"pop_max":13485000,"name":"Dhaka"},{"pop_max":12795000,"name":"Buenos Aires"},{"pop_max":12500000,"name":"Los Angeles"},{"pop_max":12130000,"name":"Karachi"},{"pop_max":11893000,"name":"Cairo"},{"pop_max":11748000,"name":"Rio de Janeiro"},{"pop_max":11294000,"name":"Osaka"},{"pop_max":11106000,"name":"Beijing"},{"pop_max":11100000,"name":"Manila"},{"pop_max":10452000,"name":"Moscow"},{"pop_max":10061000,"name":"Istanbul"},{"pop_max":9904000,"name":"Paris"},{"pop_max":9796000,"name":"Seoul"},{"pop_max":9466000,"name":"Lagos"},{"pop_max":9125000,"name":"Jakarta"},{"pop_max":8990000,"name":"Chicago"},{"pop_max":8829000,"name":"Guangzhou"},{"pop_max":8567000,"name":"London"},{"pop_max":8012000,"name"
<div class="cartodb-popup">
<a href="#close" class="cartodb-popup-close-button close">x</a>
<div class="cartodb-popup-content-wrapper">
<div class="cartodb-popup-content">
<h4 style="position:absolute; top:12px; left:19px; right:21px; display:block; width:auto; padding:8px; text-align:center; color:white; background:rgba(0,0,0,0.7)">{{name}}</h4>
<img src="http://maps.googleapis.com/maps/api/staticmap?size=188x170&center={{latitude}},{{longitude}}&zoom=13&maptype=satellite&markers=
icon:http://bit.ly/19isKFH|{{latitude}},{{longitude}}&sensor=false" />
</div>
</div>
<div class="cartodb-popup-tip-container"></div>
SELECT ST_centroid(the_geom) as the_geom, ST_centroid(the_geom_webmercator) as the_geom_webmercator, cartodb_id, desig_abbr, tourism FROM buildings
UPDATE k9_police_dogs_killed_in_the_line_of_duty_2009 SET date_proc = to_timestamp(date_of_death, 'Day, Month DD, YYYY')
//goto: https://twitter.com/messages?since_id=0
// delete console.log
querySelectorAttempt._timerIDs = []
function querySelectorAttempt(selectors, callback, _attempts){
if (!Array.isArray(selectors)) selectors = selectors.toString().split(/\s*,\s*/)
console.log('querySelectorAttempt', selectors, _attempts)
if (_attempts == null) _attempts = 20;
var elements
selectors.forEach(function(selector){
@saleiva
saleiva / gist:10121008
Last active September 17, 2020 17:15
Software Engineer - Back End at CartoDB

Software Engineer - Back End at CartoDB

We are building the easiest and most powerful data mapping engine ever. We have more than 40.000 loving users (growing rapidly) and customers from all around the world, And we have offices in downtown Madrid and NY.

Our team of engineers and designers are changing the way maps are made. This is a big task, we need to scale! Because we're looking for truly talented engineers with a passion for maps, code and quality. Our team is fast, smart and independent.

@saleiva
saleiva / gist:10635674
Created April 14, 2014 10:25
Developer Intern at CartoDB

Developer Intern at CartoDB

We are building the easiest and most powerful data mapping engine ever. We have more than 40.000 loving users (growing rapidly) and customers from all around the world, And we have offices in downtown Madrid and NY.

Our team of engineers and designers are changing the way maps are made. This is a big task, we need to scale! We're looking for talented people with a passion for maps, code and quality. Our team is fast, smart and independent.

@saleiva
saleiva / Insert fake data on a CartoDB table
Created May 6, 2014 16:43
Insert fake data on a CartoDB table
import string
import urllib
import urllib2
import math, random
import time
from optparse import OptionParser
account_name = ''
account_api_key = ''