Skip to content

Instantly share code, notes, and snippets.

@jarodium
jarodium / gist:75922d700327cc390298
Created June 5, 2015 10:17
verificar se o texto de um input é um Google Place válido
function is_location_valid(address, address_success_div)
{
var geocoder = new google.maps.Geocoder();
geocoder.geocode( {"address": address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK)
{
address_success_div.innerHTML = "SUCCESS";
}
else
@jarodium
jarodium / gist:b7bbc4eafe98a635a157
Created May 20, 2015 16:28
Controlar uma iframe de youtube via id
function callPlayer(frame_id, func, args) {
if (window.jQuery && frame_id instanceof jQuery) frame_id = frame_id.get(0).id;
var iframe = document.getElementById(frame_id);
if (iframe && iframe.tagName.toUpperCase() != 'IFRAME') {
iframe = iframe.getElementsByTagName('iframe')[0];
}
// When the player is not ready yet, add the event to a queue
// Each frame_id is associated with an own queue.
// Each queue has three possible states:
@jarodium
jarodium / _mysql_ops
Last active March 23, 2017 13:44
Mysql Ops
1