Skip to content

Instantly share code, notes, and snippets.

View sbenario's full-sized avatar

Steven Benario sbenario

  • Pivotal
  • New York City
View GitHub Profile
@sbenario
sbenario / addPrefixToContacts.scpt
Created October 25, 2019 21:08
AppleScript program to iterate through contacts and add a country code to all phone numbers
-- wholeheartedly taken from: https://gist.github.com/mzcu/3771916
-- my first applescript anything
-- I had too many contacts to do them all at once (kept hanging or doing something wrong, who knows), so I did letter by letter.
tell application "Contacts"
-- tell application "Contacts" to set thisPerson to person "John Doe"
set peopleToChange to people whose last name starts with "Z"
log "count of people results in the query is: " & number of items in peopleToChange

Keybase proof

I hereby claim:

  • I am sbenario on github.
  • I am sbenario (https://keybase.io/sbenario) on keybase.
  • I have a public key whose fingerprint is D903 08F6 7F95 FDFB B88E 762C BDA6 B144 0533 0A8C

To claim this, I am signing this object:

import os
import requests
from datetime import datetime, date
def generateReqString(stock, startdate, enddate):
#format of startdate/enddate should be 20140201 for Feb 01, 2014.
basequery = 'http://ichart.yahoo.com/table.csv?'
basequery_ending= '&ignore=.csv'
startdate = datetime.strptime(startdate,'%Y%m%d')