This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Go to the app directory | |
cd /Applications/Google\ Chrome.app/Contents/MacOS/ | |
2. Rename the app to app.orig | |
mv Google\ Chrome Google\ Chrome.orig | |
3. Create a shell script with the original name that uses the args you want |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
def showBreakProblem &blk | |
threads = 2 | |
consumers = [] | |
threads.times do |i| | |
consumers << Thread.new(i) do |i| | |
Thread.current[:num] = i | |
begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'marc' | |
require 'open-uri' | |
r = MARC::Reader.new(open('http://mirlyn.lib.umich.edu/Record/000039829.marc')).first | |
puts r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"responseHeader":{ | |
"status":0, | |
"QTime":0, | |
"params":{ | |
"explainOther":"", | |
"fl":"*,score", | |
"indent":"on", | |
"start":"0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Then just create a simple XML file pointing to the 50k line files | |
# Don't forget to gzip the files first | |
#!/usr/local/bin/perl | |
my $numfiles = ARGV[0]; # number of files generated before | |
my $urlToSitemapDir = 'http://www.my.machine.edu/dir/for/sitemaps'; | |
print q{<?xml version="1.0" encoding="UTF-8"?> | |
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1006 DLI | |
1040 GyWOH | |
1059 SciDir | |
1062 NYU | |
1077 ItFiC | |
1150 CSt | |
1175 FrPJT | |
1176 DGPO | |
1182 NjP | |
1196 BLKDR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'threach' | |
require 'jruby_streaming_update_solr_server' | |
solrURL = 'your solr url' | |
sussQueueSize = 128 # number of docs to queue up | |
sussThreads = 1 # number of threads to use to send stuff to solr | |
threads = 3 # number of threads to use to process the data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'marc' | |
require 'yajl' | |
require 'benchmark' | |
iterations = 5 | |
xmlsourcefile = 'topics.xml' # 18k records as a MARC-XML collection | |
jsonsourcefile = 'topics.ndj' # Same records as newline-delimited marc-in-json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rdf' | |
require 'threach' | |
(1..10).threach(3) do |c| | |
u = RDF::URI.new("http://example.org/#{c}/"); puts u.to_s | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code to benchmark various serializations of MARC records using ruby-marc | |
# Not included is XML -- serialization using ruby-marc is ridiculously slow and the # filesizes are bigger than anything else. Even with the lib-xml reader, | |
# deserialization is also relatively slow | |
# | |
# I didn't bother to benchmark json/pure in later runs because it's just so damn | |
# slow that it would never be a good choice. | |
# | |
# My results can be found at http://robotlibrarian.billdueber.com/sizespeed-of-various-marc-serializations-using-ruby-marc/ | |
require 'marc' |