Skip to content

Instantly share code, notes, and snippets.

View nat's full-sized avatar

Nat Friedman nat

  • GitHub
  • San Francisco
View GitHub Profile
@nat
nat / notrack.py
Last active August 9, 2022 15:56
#!/usr/bin/env python3
#
# A script to strip the tracking cookies from Twitter links in your clipboard.
#
import pasteboard
import time
pb = pasteboard.Pasteboard()
@nat
nat / auth.py
Last active December 7, 2020 05:33
Authenticate with GitHub from Python using the new device auth flow
#!/usr/bin/env python3
#
# Implements the GitHub device auth flow described here:
# https://docs.github.com/en/free-pro-team@latest/developers/apps/authorizing-oauth-apps#device-flow
from urllib.parse import parse_qs
import urllib, requests, time, webbrowser, json
client_id ='a945f87ad537bfddb109'