Skip to content

Instantly share code, notes, and snippets.

Tom Shorock shorock

Block or report user

Report or block shorock

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shorock /
Last active Jan 5, 2019
drush and jq hack
# Danger, if you don't do this and 'drush status' fails for some other reason, the pipeline exits 0
# and thus tries to site-install again
set -o pipelinefail
is_drupal_installed() {
cd /app/web
drush status --pipe | jq -e '.bootstrap == "Successful"' > /dev/null
shorock / gist:f71a6bc39b30d20d53cf223c76df7f59
Created Oct 5, 2017
Working with Curl/JQ extract from Solr
View gist:f71a6bc39b30d20d53cf223c76df7f59
curl -g "localhost:8983/solr/statistics/select?q=time:[2017-09-01T00:00:00Z+TO+2017-10-01T00:00:00Z]&sort=time+asc&rows=10000&start=30000&wt=json" | jq '.response | [.docs[]|del(._version_)] ' | nice gzip -c > september3.json.gz
shorock /
Created Mar 23, 2017
Cut out the _version_ column in solr dumps
for f in `ls *csv`
mv $f "$f.bak"
csvcut -C _version_ "$f.bak" > $f
rm "$f.bak"
shorock / as-debug.patch
Created Feb 22, 2017
Fiddling with ArchivesSpace using RubyMine debugger
View as-debug.patch
diff --git a/build/build.xml b/build/build.xml
index 4a10c9b..4cb131e 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -326,7 +326,7 @@
<env key="GEM_PATH" value="" />
<env key="BUNDLE_PATH" value="${gem_home}" />
<env key="ASPACE_INTEGRATION" value="${aspace.integration}" />
- <arg line="--1.9 script/rails s Puma --port=${aspace.frontend.port}" />
+ <arg line="--1.9 /home/tom/.rvm/gems/jruby-1.7.22@as/bin/rdebug-ide --rubymine-protocol-extensions --host --port 1234 -- script/rails s Puma --port=${aspace.frontend.port}" />

Keybase proof

I hereby claim:

  • I am shorock on github.
  • I am tshorock ( on keybase.
  • I have a public key whose fingerprint is EA22 AA62 F415 6157 A08D 613F 24C2 BA3D E99B 4BAC

To claim this, I am signing this object:

You can’t perform that action at this time.