Skip to content

Instantly share code, notes, and snippets.

View andrelaszlo's full-sized avatar
🤓

André Laszlo andrelaszlo

🤓
View GitHub Profile
@andrelaszlo
andrelaszlo / activate
Last active March 17, 2016 15:20
Modified virtualenv2 activate script
# This file must be used with "source bin/activate" *from bash*
# you cannot run it directly
# This script was modified to introduce the following features:
# * Save and restore PYTHONPATH on activate/deactivate
# * Source .virtualenvrc if it exists
deactivate () {
unset pydoc

Keybase proof

I hereby claim:

  • I am andrelaszlo on github.
  • I am sibilant (https://keybase.io/sibilant) on keybase.
  • I have a public key ASAKC1ZDD5z85BC8yXhLazRLqad48O593CtMoupET-WBiAo

To claim this, I am signing this object:

@andrelaszlo
andrelaszlo / fix_repos.sh
Last active May 18, 2017 17:27
Hack to fix a broken url using the GitHub API
#!/usr/bin/env bash
source token.sh # should export the ACCESS_TOKEN and USER variables
PAGE=1 # Run once per page (manually for now)
PER_PAGE=100 # Max 100
function list_repos {
echo "Listing repos" > /dev/stderr
curl -s -H "Authorization: token $ACCESS_TOKEN" "https://api.github.com/search/code?page=$PAGE&per_page=$PER_PAGE&q=http://www.eecs.harvard.edu/~kirsch/pubs/bbbf/esa06.pdf" | \