Skip to content

Instantly share code, notes, and snippets.

View arfon's full-sized avatar
:shipit:

Arfon Smith arfon

:shipit:
View GitHub Profile
% "Hello World" in Mercury.
% This source file is hereby placed in the public domain. -fjh (the author).
:- module hello.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
@arfon
arfon / lowe2014.geojson
Created April 20, 2014 00:31
Stuart Lowe, RTW 2014 current location
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arfon
arfon / map.geojson
Created March 24, 2014 14:30
Raoul's bar -- March 25th at 7:30pm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arfon
arfon / github_api_doi.md
Created March 19, 2014 00:34
Building a data archiving service using the GitHub API, figshare and Zenodo

Building a data archiving service using the GitHub API, figshare and Zenodo

Over the past couple of weeks we've seen a couple of great examples of service integrations from figshare and Zenodo that use the GitHub outbound API to automatically archive GitHub repositories. While the implementation of each solution is likely to be somewhat different I thought it might be useful to write up in general terms how to go about building such a service.

In a nutshell we need a tool that does the following:

  • Authenticates against the GitHub API
  • Configures an outbound API endpoint for repository events to be posted to
  • Respond to a GitHub repository event by grabbing a copy of the code
  • Issues a DOI for the code bundle
@arfon
arfon / forks.rb
Created March 3, 2014 02:53
Fork node network
require 'octokit'
require 'pry'
require 'hashie'
require 'json'
require 'active_support/all'
class Fork < Hashie::Dash
property :full_name
property :created_at
property :forks_count
@arfon
arfon / README.md
Last active August 29, 2015 13:56
GitHub forks of octokit/octokit.rb

Closer (orange) nodes are ahead of octokit/octokit.rb:master, the size of the node is proportional to the number of commits ahead (mouseover for forkname).

Outer (grey) nodes are either identical or behind octokit/octokit.rb:master, i.e. no commits have been made on these forks ahead of the parent repo.

@arfon
arfon / README.md
Last active August 29, 2015 13:56
GitHub forks of astropy

Closer (orange) nodes are ahead of astropy/astropy:master, the size of the node is proportional to the number of commits ahead (mouseover for forkname).

Outer (grey) nodes are either identical or behind astropy/astropy:master, i.e. no commits have been made on these forks ahead of the parent repo.

@arfon
arfon / LICENSE
Created February 20, 2014 20:38 — forked from dfm/LICENSE
Copyright (c) 2012–2013 Daniel Foreman-Mackey
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@arfon
arfon / README.md
Last active August 29, 2015 13:56
Astropy PR merge fraction

Fraction of pull requests to Astropy merged over time (grouped by month). The size of the dot is proportional to the number of pull requests in that time period (mouseover to see the count).

Data pulled from the GitHub API:

@arfon
arfon / README.md
Last active August 29, 2015 13:55
Ember.js PR merge fraction

Fraction of pull requests to Ember.js merged over time (grouped by month). The size of the dot is proportional to the number of pull requests in that time period (mouseover to see the count).

Data pulled from the GitHub API: