Skip to content

Instantly share code, notes, and snippets.

View yuercl's full-sized avatar

Long. yuercl

View GitHub Profile
@yuercl
yuercl / exportCollections.sh
Created March 5, 2020 03:20 — forked from samarthbhargav/exportCollections.sh
A Shell Script to Export multiple collections
echo "Enter HostName:"
read host
echo "Enter DB Name:"
read dbname
echo "Enter Auth DB Name: (usually admin)"
read authdb
echo "Enter Username:"
read username
echo "Enter Password"
read password
@yuercl
yuercl / fullquery
Last active September 8, 2015 09:35 — forked from OllieJones/fullquery
Fast nearest-location finder for SQL (MySQL, PostgreSQL, SQL Server)
SELECT zip, primary_city,
latitude, longitude, distance
FROM (
SELECT z.zip,
z.primary_city,
z.latitude, z.longitude,
p.radius,
p.distance_unit
* DEGREES(ACOS(COS(RADIANS(p.latpoint))
* COS(RADIANS(z.latitude))