Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Grover samgrover

View GitHub Profile
@samgrover
samgrover / newsurl.py
Created May 11, 2021
Extract URL From Apple News URL
View newsurl.py
#!/usr/bin/env python
# A helper script to convert an Apple News URL on the clipboard into
# its corresponding canonical URL and put that on the clipboard.
import pasteboard
import requests
import re
pb = pasteboard.Pasteboard()
@samgrover
samgrover / ohs-kittens.py
Last active Aug 19, 2020
Fetch kittens available for adoption and notify if there are new ones.
View ohs-kittens.py
#!/usr/bin/env python
# Fetch current kittens available for adoption and notify if there are new ones.
import sys
import requests
import logging
import re
import json
from datetime import datetime
View books.py
#!/usr/bin/env python
# A helper script to convert a CSV files of my books read into Markdown for website.
# Usage:
# books.py <books.csv exported from Books.numbers>
import sys
import csv
from datetime import datetime
@samgrover
samgrover / swarm-day-one-import.py
Created Apr 16, 2019
Parse the Swarm/Foursquare exported data and create entries in Day One using their command line tool.
View swarm-day-one-import.py
#!/usr/bin/env python
# Parse the Swarm/Foursquare exported data and create entries in Day One using their command line tool.
# Day One command line tool available at: http://dayoneapp.com/support/CLI
import sys
import json
import requests
import subprocess
import time
@samgrover
samgrover / gist:3f12c814440ff47eb10d
Created Jun 3, 2014
Swift example code transliterated in Hindi
View gist:3f12c814440ff47eb10d
// Playground - noun: a place where people can play
enum Rank: Int {
case Ace = 1
case Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten
case Jack, Queen, King
func description() -> String {
switch self {
case .Ace:
return "ace"
View keybase.md

Keybase proof

I hereby claim:

  • I am samgrover on github.
  • I am samgrover (https://keybase.io/samgrover) on keybase.
  • I have a public key whose fingerprint is 2008 F779 4918 080E 6AD2 30A9 D111 6E50 B1C1 A165

To claim this, I am signing this object: