Skip to content

Instantly share code, notes, and snippets.

View Aminadav's full-sized avatar
💭
typing...

Aminadav Glickshtein Aminadav

💭
typing...
View GitHub Profile
@avielsh
avielsh / GoogleMaps.js
Last active May 6, 2020 14:48
Return distance and duration between two addresses
/**
* Get Distance between 2 different addresses.
* @param start_address Address as string Ex. "בורגשוב 35, תל אביב"
* @param end_address Address as string Ex. "הקישון 140,תל אביב"
* @param ret Return type as string Ex. "km" or "duration". default is both
* @customfunction
*/
function GOOGLEMAPS(start_address,end_address,ret) {
// start_address = "Tel aviv";
@paambaati
paambaati / launch.js
Last active May 5, 2022 05:35
Debug mocha tests using Visual Studio Code
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Run app.js",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"