Skip to content

Instantly share code, notes, and snippets.

View anjalbinayak's full-sized avatar

Anjal Binayak Adhikari anjalbinayak

View GitHub Profile
@anjalbinayak
anjalbinayak / cars.json
Created January 23, 2024 17:38
Cars List
{
"supercars": [
{
"brand": "Ferrari",
"model": "LaFerrari",
"year": 2021,
"top_speed_mph": 217,
"acceleration_sec": 2.4,
"engine": "V12 Hybrid",
"horsepower": 950,
"use client";
import {
Box,
Button,
Link,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,
@anjalbinayak
anjalbinayak / GitCommitEmoji.md
Created July 20, 2021 03:50 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@anjalbinayak
anjalbinayak / dynamic-map-marker.js
Created September 26, 2020 15:56
This gist is used in medium article
let mapMarker = null;
let map;
map = new google.maps.Map(document.getElementById("map"), {
center: { lat: 28.3949, lng: 84.1240 }, // :nepal:
zoom: 6,
});
map.addListener('click',function (e){
let marker = new google.maps.Marker({
@anjalbinayak
anjalbinayak / click-to-get-the-coordinates-of-location.js
Created September 26, 2020 15:47
This gist is used in medium article
map.addListener('click', function(e) {
let lat = e.latLng.lat();
let lng = e.latLng.lng();
});
//use the lat and lng as your needs.
@anjalbinayak
anjalbinayak / custom-map-marker.js
Created September 26, 2020 15:38
This gist is used in medium article
var marker = new google.maps.Marker({
position: { lat: -34.397, lng: 150.644 },
title:"Custom Marker Image",
icon: "new-image.png"
});
marker.setMap(map);
//you just have to put the location of image file in 'icon' property of object in Marker's constructor
@anjalbinayak
anjalbinayak / create-multiple-markers.js
Created September 26, 2020 15:30
This gist is used in medium article
var marker1 = new google.maps.Marker({
position:{ lat: -34.397, lng: 150.644 },
title:"Marker 1"
});
marker1.setMap(map);
var marker2 = new google.maps.Marker({
position: { lat: -33.397, lng: 151.644 },
@anjalbinayak
anjalbinayak / embed-single-marker.js
Created September 26, 2020 15:26
This gist is used in medium article
marker.setMap(map);
//map is the instance of google.maps.map
@anjalbinayak
anjalbinayak / create-single-marker.js
Created September 26, 2020 15:23
This gist is used in medium article
var marker = new google.maps.Marker({
position: { lat: -34.397, lng: 150.644 },
title:"Location Place or Anything that you want to tooltip while hovering"
});
@anjalbinayak
anjalbinayak / simple-map-embed.html
Created September 26, 2020 15:10
This gist just serves as a part of a code in medium article
<!DOCTYPE html>
<html>
<head>
<title>Simple Map Embed</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<script
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=&v=weekly"
defer
></script>
<link rel="stylesheet" type="text/css" href="./style.css" />