Skip to content

Instantly share code, notes, and snippets.

View anjalbinayak's full-sized avatar

Anjal Binayak Adhikari anjalbinayak

View GitHub Profile
@anjalbinayak
anjalbinayak / xampp_php7_xdebug.md
Created September 17, 2020 08:12 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@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" />
@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 / 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-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 / 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 / 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 / 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 / GitCommitEmoji.md
Created July 20, 2021 03:50 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
"use client";
import {
Box,
Button,
Link,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,