Skip to content

Instantly share code, notes, and snippets.

View alanhamlett's full-sized avatar

Alan Hamlett alanhamlett

View GitHub Profile
@alanhamlett
alanhamlett / wakatime_github_timeline.py
Last active August 29, 2015 14:14
WakaTime GitHub Commit Timeline
""" File: views.py
"""
@blueprint.route('/project/<path:project_name>/commits')
@api_utils.nocache
@auth.login_required
def project_commits(project_name):
user = app.current_user

Keybase proof

I hereby claim:

  • I am alanhamlett on github.
  • I am alanhamlett (https://keybase.io/alanhamlett) on keybase.
  • I have a public key whose fingerprint is 2A17 98FE 2E12 3F7C BCDB E05F 76C4 315D 71A9 FECC

To claim this, I am signing this object:

@alanhamlett
alanhamlett / test_oauth.py
Last active August 29, 2015 14:10
OAuth example
#!/usr/bin/env python
import base64
import requests
ACCESS_TOKEN = "XXX"
APP_SECRET = "XXX"
# get some JSON, authenticating with url args
r = requests.get('https://wakatime.com/api/v1/users/current/stats/complete', params={'access_token': ACCESS_TOKEN})