Skip to content

Instantly share code, notes, and snippets.

missing = []
count_good = 0
bad_checksum = []
def checksum(io)
Digest::MD5.new.tap do |checksum|
while chunk = io.read(5.megabytes)
checksum << chunk
end
end.base64digest

It’s mostly an error in your mental model of how git thinks about these things.

You’ve got, basically, 3 “buckets” in git:

  1. the repository, where committed things live

  2. the “index” which is basically a staging area where you can put things before you commit them,

  3. the working copy, which is basically what you see in the directory, and make changes to.

{
"records": {
"004421859": {
"recordURL": "https://catalog.hathitrust.org/Record/004421859",
"titles": [
"Bertrand Russell on education"
],
"isbns": [],
"issns": [],
"oclcs": [
// So, the biggest issue is that getJSON doesn't work this way(http://api.jquery.com/jquery.getjson/). Instead
// of returning the data, it returns a "promise"
// which you then need to run to get the data. So instead of:
var photo = $.getJSON("http://thisisnotmybeautifulhouse.tumblr.com/api/read/json?callback=?");
// you need to do something like:
var photo = {};
$.getJSON("http://thisisnotmybeautifulhouse.tumblr.com/api/read/json?callback=?").done(function(data) {
photo = data;
});

Ok, Timed item ingest across multiple runs with items in 1, 2, and 3 different collections.

Details


Average ingest times (just member_of_paths)

In 1 collection:  236 milliseconds
In 2 collections: 240 milliseconds
class Foo < ActiveFedora::Base
property :title, predicate: ::RDF::Vocab::DC.title, multiple: true do |index|
index.as :stored_searchable
end
end
2.3.1 :006 > a = Foo.new
ActiveFedora: loading fedora config from /Users/matt/source/ualib/hydranorth2/config/fedora.yml
ActiveFedora: loading solr config from /Users/matt/source/ualib/hydranorth2/config/solr.yml
=> #<Foo id: nil, title: []>
With Ada.Text_IO; Use Ada.Text_IO;
procedure Program is
package Classes is
type Class1 is tagged
record
i: integer;
end record;
# /etc/sysctl.conf
# Clemens Gruber, 2014
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0
## I/O
diff --git a/Library/Formula/alpine.rb b/Library/Formula/alpine.rb
index 5d76ef4..5594d44 100644
--- a/Library/Formula/alpine.rb
+++ b/Library/Formula/alpine.rb
@@ -20,7 +20,9 @@ class Alpine < Formula
ENV.j1
system "./configure", "--disable-debug",
"--prefix=#{prefix}",
- "--with-ssl-include-dir=/usr/include/openssl"
+ "--with-ssl-include-dir=/usr/include/openssl",
@mbarnett
mbarnett / gist:5447223
Created April 23, 2013 20:44
Microbenchmarking method call styles
require "benchmark"
test = "hi man"
m = test.method(:length)
n = 100000
Benchmark.bmbm {|x|
x.report("direct") { n.times { test.length } }
x.report("call") { n.times { m.call } }
x.report("send") { n.times { test.send(:length) } }
x.report("eval") { n.times { eval "test.length" } }
}