Skip to content

Instantly share code, notes, and snippets.

View tpendragon's full-sized avatar

Trey Pendragon tpendragon

  • Princeton University Library
  • Salem, OR
View GitHub Profile
{
"name": "pf2e",
"title": "Pathfinder 2nd Edition",
"description": "An early alpha game system for running games of Pathfinder 2nd Edition in the Foundry VTT environment.",
"version": 0.453,
"schema": 0.411,
"minimumCoreVersion": "0.4.5",
"author": "hooking",
"scripts": [
"./scripts/init.js",
Adapter iterations/s std.dev. iterations time (s)
basic_metadata_tests create_stub
postgres 661.473 (±12.7%) 3306 4.998
sequel_postgres 1469.010 (±11.6%) 7336 4.994
basic_metadata_tests create_with_text
postgres 552.374 (±10.6%) 2761 4.998
sequel_postgres 1221.849 (±11.8%) 6103 4.995
basic_metadata_tests create_with_many_fields
postgres 480.882 (±15.9%) 2403 4.997

Keybase proof

I hereby claim:

  • I am tpendragon on github.
  • I am tpendragon (https://keybase.io/tpendragon) on keybase.
  • I have a public key whose fingerprint is 4D27 C5C7 83AF 916D DFD3 AE7E AB67 7006 525E C407

To claim this, I am signing this object:

# Same 6021 Triples
# JSON-LD (I don't have a TTL parser...)
iex(34)> Benchwarmer.benchmark(fn -> Client.get(%ExFedora.Client{url: "http://localhost:8984/rest"}, "4e/38/da/ba/4e38daba-a6b9-4ffb-a138-52041782f2cb") end)
*** #Function<20.54118792/0 in :erl_eval.expr/5> ***
4.3 sec 1 iterations 4351705.0 μs/op
[%Benchwarmer.Results{args: [], duration: 4351705,
function: #Function<20.54118792/0 in :erl_eval.expr/5>, n: 1, prev_n: 1}]
# 4.3 seconds
irb(main):001:0> class TestHash
irb(main):002:1> def hash
irb(main):003:2> 1
irb(main):004:2> end
irb(main):005:1> end
=> :hash
irb(main):006:0> b = {}
=> {}
irb(main):007:0> c = TestHash.new
=> #<TestHash:0x007f817a1cc4f8>
curl -H "Accept: text/turtle" http://fragments.dbpedia.org

Keybase proof

I hereby claim:

  • I am terrellt on github.
  • I am terrellt (https://keybase.io/terrellt) on keybase.
  • I have a public key whose fingerprint is 9928 4E50 9243 3416 3155 0908 A953 BFB4 24A6 A7C8

To claim this, I am signing this object:

module OregonDigital
module SolrNTripleExtension
def self.extended(document)
document.will_export_as(:nt, "application/n-triples")
end
def export_as_nt
graph = CleanRepository.new(ActiveFedora.fedora.connection, GenericAsset).find(self["id"])
graph = OregonDigital::GraphMutators::SubjectChanger.call(graph, GenericAsset.id_to_uri(self["id"]), RDF::URI("http://oregondigital.org/resource/#{self["id"]}"))
graph.dump(:ntriples)
end
@tpendragon
tpendragon / dev-tat
Last active August 29, 2015 14:17
Automate launching my dev environment in a tmux session for a project folder.
#!/bin/bash
string=`tmux list-session`
directory_name=`basename $PWD`
if [[ $string == *$directory_name* ]]
then
tmux new-session -As $directory_name
else
tmux -2 new-session -As $directory_name -d
tmux split-window -h
tmux select-pane -t 1
require 'rails_helper'
RSpec.describe "Error Handling" do
describe "Active Record Not Found" do
controller do
def index
raise ActiveRecord::RecordNotFound
end
end