Skip to content

Instantly share code, notes, and snippets.

@jandosul
jandosul / coordinatestoname.js
Created June 21, 2019 15:30 — forked from AmirHossein/coordinatestoname.js
Get City and Country name by coordinates via Google Maps api
// Demo: http://jsfiddle.net/1yom6brx/1/
var latlng;
latlng = new google.maps.LatLng(40.730885, -73.997383); // New York, US
//latlng = new google.maps.LatLng(37.990849233935194, 23.738339349999933); // Athens, GR
//latlng = new google.maps.LatLng(48.8567, 2.3508); // Paris, FR
//latlng = new google.maps.LatLng(47.98247572667902, -102.49018710000001); // New Town, US
//latlng = new google.maps.LatLng(35.44448406385493, 50.99001635390618); // Parand, Tehran, IR
//latlng = new google.maps.LatLng(34.66431108560504, 50.89113940078118); // Saveh, Markazi, IR
@jandosul
jandosul / Node.js chat sockjs
Created September 20, 2013 18:00
Node.js chat with redis pub/sub php session
//var express = require('express');
var sockjs = require('sockjs');
var http = require('http');
var redis = require('redis');
// Redis publisher
var publisher = redis.createClient();
// Sockjs server
var sockjs_opts = {sockjs_url: "http://cdn.sockjs.org/sockjs-0.3.min.js"};