Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

mgb BharathMG

🎯
Focusing
View GitHub Profile
View polyline.go
func EncodePolyline(coordinates []*Point) string {
if len(coordinates) == 0 {
return ""
}
factor := math.Pow(10, 5)
output := encode(coordinates[0].Lat, factor) + encode(coordinates[0].Lng, factor)
for i := 1; i < len(coordinates); i++ {
a := coordinates[i]
@BharathMG
BharathMG / refresh-ever.go
Last active Aug 29, 2015
Stop manually refreshing Movie booking sites to check if they started selling your favourite movie tickets. This prog will run forever until they open the booking.
View refresh-ever.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
"github.com/skratchdot/open-golang/open"
)
View sleepsort.bash
#!/bin/bash
function f() {
sleep "$1"
echo "$1"
}
while [ -n "$1" ]
do
f "$1" &
shift
done
View ReadME
This Validator focuses on validating
1.Name Field
2.Phone Number Field