Skip to content

Instantly share code, notes, and snippets.

View arfon's full-sized avatar
:shipit:

Arfon Smith arfon

:shipit:
View GitHub Profile
@arfon
arfon / LICENSE
Last active July 3, 2018 00:18
Ruby class for validating ORCID formats and checksums
The MIT License (MIT)
Copyright (c) 2018 Arfon Smith
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
@arfon
arfon / README.md
Created June 24, 2016 18:19
Octokit.net GitHub Activity
@arfon
arfon / README.md
Created June 24, 2016 18:06
GitHub VisualStudio activity
@arfon
arfon / README.md
Last active June 24, 2016 17:51
Jekyll GitHub Activity
if [ "$PS1" ]; then
#PS1="[\u@\h:\w] "
PS1="\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]"
PS1="\[\033[01;32m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]"
#case `id -u` in
# 0) PS1="${PS1}# ";;
# *) PS1="${PS1}$ ";;
#esac
fi
@arfon
arfon / create_events.md
Last active November 2, 2020 11:49
GitHub Archive event formats

2011-02-15-0.json.gz

{  
   "repo":{  
      "id":1367057,
      "url":"https://api.github.dev/repos/motech/MOTECH",
      "name":"motech/MOTECH"
   },
   "type":"CreateEvent",
require 'digest'
class EventParseError < StandardError; end
class EventTransform
attr_accessor :actor, :created_at, :raw_event, :id, :org, :other, :payload, :is_public, :repo, :type
def initialize(event_json)
@raw_event = event_json
@other = Hash.new

Keybase proof

I hereby claim:

  • I am arfon on github.
  • I am arfon (https://keybase.io/arfon) on keybase.
  • I have a public key ASDmGO8GpkwxMW24CCNpKhDKNw2WR_oiNPAJBN8DsvWwhgo

To claim this, I am signing this object:

@arfon
arfon / transitive-credit.jsonld
Last active April 16, 2016 14:47
Transitive credit example
{
"@context":"http://schema.org",
"@type":"ScholarlyArticle",
"headline":"Implementing Transitive Credit with JSON-LD",
"dateCreated":"2014-07-10",
"keywords":"transitive credit, credit for code, json-ld, linked data",
"author":[
{
"@type":"Person",
"name":"Daniel S. Katz",
@arfon
arfon / big_query_examples.md
Last active September 19, 2022 13:00
BigQuery Examples for blog post

How many times shouldn't it happen...

-- https://news.ycombinator.com/item?id=11396045

SELECT count(*)
FROM (SELECT id, repo_name, path
        FROM [bigquery-public-data:github_repos.sample_files]
 ) AS F