Skip to content

Instantly share code, notes, and snippets.

View mbklein's full-sized avatar

Michael B. Klein mbklein

  • Northwestern University
  • Evanston, IL
View GitHub Profile
@cjcolvar
cjcolvar / ntriples_reindexing.rb
Last active April 14, 2021 06:02
Monkey-patch initializer to request ntriples when reindexing to avoid timeouts
ActiveFedora::Fedora.class_eval do
def ntriples_connection
authorized_connection.tap { |conn| conn.headers['Accept'] = 'application/n-triples' }
end
def build_ntriples_connection
ActiveFedora::InitializingConnection.new(ActiveFedora::CachingConnection.new(ntriples_connection, omit_ldpr_interaction_model: true), root_resource_path)
end
end
@dgoguerra
dgoguerra / proxy-toggle.sh
Last active September 7, 2023 02:55 — forked from mnewt/proxy-toggle.sh
Script to toggle Mac OS X SOCKS proxy, and setup a SOCKS server with SSH
#!/bin/sh
PROXY_INTERFACE="Wi-Fi"
PROXY_HOST=127.0.0.1
PROXY_PORT=1080
# A host where ssh can login without interaction, with a key-based
# authentication.
SOCKS_PROC_USER="username"
SOCKS_PROC_HOST="example.com"
@regadas
regadas / nginx.conf
Created November 9, 2013 03:17
nginx cached forward proxy #example
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
@mbklein
mbklein / gist:3820359
Created October 2, 2012 15:55
Matterhorn Dependencies
LIST OF DEPENDENCIES
====================
√ = Installed
* = Installed specific version or with modified/new build script
base_libs
√ jam
√ yasm
√ scons
√ zlib