Skip to content

Instantly share code, notes, and snippets.

! name: School District Search Engine
! description: Searched Google for the url of every school district using SERPAPI and made a goggle with the results. List needs to be refined and tested.
! author: Dhruv Mehrotra twitter:@dmehro
! public: true
! avatar: #ff6600
! name: Law Enforcement Website Search
! description: I used the SERPAPI to search Google for police/sheriff websites for 3,000 jurisdictions in the U.S. and turned results into a goggle. Note: Often times the police webpage is incuded on its jurisdiction's website. Also...this list could probably be refined and tested.
! author: Dhruv Mehrotra twitter: @dmehro
! public: true
! avatar: #ff6600
def dms_to_dd(data):
dd = float(data[0].strip()) + float(data[1].strip())/60 + float(data[2].strip())/(60*60);
if data[3].strip() == 'W' or data[3].strip() == 'S':
dd *= -1
return dd;
dmehrotra / @womenForCohen.tweets
Last active January 17, 2019 15:58
all the tweets | Tweet: We can't wait!!! You will do a fantastic job! You are amazing leader & speaker #ThanksDonald #AmericaFirst … | Tweet: Snazzy looking & ready to #MAGA … | Tweet: Happy Sunday @MichaelCohen212 we can't wait to see more of your presence in the coming days! #SundayMorning #MAGA #WhiteHouse | Tweet: Best looking men award goes to 👇🏻 We love you guys! #ThankYouTour2016 #MakeAmericaGreatAgain … | Tweet: Look at this guy, always taking care of those who love this country! #usa #Trump #FBF
import sys
import ipaddress
fi = sys.argv[1]
count = 0
with open(fi) as f:
for i,line in enumerate(f):
network = line.split(',')[0]
if (network != 'network' and network != '\n'):
net = ipaddress.ip_network(network)
for x in net.hosts():
MSSH="ssh -o ControlPath=./control"
$MSSH -O exit "root@$ip"
# Get the Device IP Address
dmehrotra / gist:023ac72e255a78b44fcda50b46838bed
Created November 2, 2016 18:15
Docker Shit for Refugee School
Slide 1
There's only a single operating system running. That operating system is just carved up into isolated little spaces.
A container is a self-contained sealed unit of software. It has everything in it that is needed to run that code.
Docker uses bridges to create virtual networks inside your computer
Docker is a program written in Go - > Kernels run directly on your hardware
dmehrotra /
Created July 15, 2016 18:40
script for installing freeswitch
sudo apt-get -y update
sudo apt-get -y install autoconf automake devscripts gawk g++ git-core libjpeg-dev libncurses5-dev libtool make python-dev gawk pkg-config libtiff4-dev libperl-dev libgdbm-dev libdb-dev gettext sudo equivs mlocate git dpkg-dev devscripts sudo wget sox flac
sudo apt-get -y -f install
sudo update-alternatives --set awk /usr/bin/gawk
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl | sudo apt-key add -
echo "deb jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies
sudo apt-get install -y libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev yasm nasm libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev
dmehrotra / links
Last active January 20, 2016 22:29