Skip to content

Instantly share code, notes, and snippets.


Colin grosscol

View GitHub Profile
no-reply / CHODatastream.rb
Last active Aug 29, 2015
Hydra Connect RDF Workshop Walkthrough
View CHODatastream.rb
# lib/models/datastream.rb
class CHODatastream < ActiveFedora::NtriplesRDFDatastream
property :title, predicate: RDF::DC.title
property :creator, predicate: RDF::DC.creator
property :date, predicate:
property :location, predicate: RDF::DC.spatial
jcoyne / Vagrant
Created Dec 7, 2015
Vagrantfile for hydra-camp box
View Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
ClaytonJY / interval-checking.R
Created Feb 5, 2018
Checking interval membership in a tidy-ish way
View interval-checking.R
#### setup ####
tbl <- tibble(
id = 1:25
tripu /
Last active Aug 20, 2019 — forked from rodw/
A simple script to backup an organization's GitHub repositories, wikis and issues.
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
show_usage () {
echo "Usage: `basename $0` [START [END]]"
echo "Steps through the commit history from START to END,"
echo "then returns to the branch or commit from before execution."
echo "START defaults to the root commit (beginning of history)."
echo "END defaults to current branch/commit."
stepheneb / list-native-gems.rb
Created Dec 13, 2010
list RubyGems that have native extensions
View list-native-gems.rb
#!/usr/bin/env ruby
require 'rubygems'
gempaths = Gem::default_path
puts "Scanning paths in Gem::default_path for RubyGems with native extensions ..."
ebeigarts /
Last active Aug 28, 2020



By default RAILS_RELATIVE_URL_ROOT is used only for asset pipeline.

To namespace your rails routes you need to wrap run MyApp::Application with map in your

grosscol / get-cognito-cfd-target.yaml
Last active Oct 2, 2020
Custom Cloudformation Resource to get CloudFront Distribution of Cognito User Pool
View get-cognito-cfd-target.yaml
# This template example assumes a UserPool and UserPoolDomain exist.
# The function of this is to produce a custom resource with an attribute
# that can be referenced for DNSName of an Route53::RecordSet AliasTarget.
# AliasTarget:
# HostedZone: Z2FDTNDATAQYW2
# DNSNAME: !GetAtt UPDomain.CloudFrontDistribution
clintel / gist:1155906
Created Aug 19, 2011
Fenced code in bullet lists with GitHub-flavoured MarkDown??
View gist:1155906

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    More Code
You can’t perform that action at this time.