Skip to content

Instantly share code, notes, and snippets.

View chrisyuska's full-sized avatar

Chris Yuska chrisyuska

View GitHub Profile
@chrisyuska
chrisyuska / primes.rb
Last active September 3, 2017 00:11
Prime Phone Number Checker for Google Contacts
# This script will parse an exported Google Contacts CSV file and output any
# contacts with prime phone numbers
#
# How to export Google Contacts CSV file:
# 1. Visit the 'old' Contacts website: https://www.google.com/contacts/?cplus=0
# 2. Click the 'More' dropdown at the top and select 'Export...'
# 3. Select the contacts you want to export, and click 'Export'
#
# Run this script by passing the path of an exported Google Contacts CSV file
# e.g. `ruby primes.rb ~/Downloads/google.csv`
#!/bin/sh
echo "\n --- delete index"
curl -X DELETE 'http://localhost:9200/'
echo "\n --- create index and put mapping into place"
curl -X POST 'http://localhost:9200/myindex/' -d '{
"mappings" : {
"person" : {
"properties" : {