Skip to content

Instantly share code, notes, and snippets.

@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" | \
apply plugin: 'groovy'
sourceCompatibility = 1.5
version = '0.1-SNAPSHOT'
repositories {
mavenRepo(urls: 'http://repository.codehaus.org/')
mavenCentral()
}