Skip to content

Instantly share code, notes, and snippets.

View benanhalt's full-sized avatar

Ben Anhalt benanhalt

View GitHub Profile
@benanhalt
benanhalt / web-asset-server.conf
Last active November 14, 2016 17:01
Nginx proxy for Specify web asset server providing HTTPS.
# Nginx configuration for supplying an HTTPS end point for the web
# asset server. The asset server is running on the same system
# (demo-assets.specifycloud.org) on port 8080 meaning it can run
# without root privileges and without using authbind. Nginx proxies
# HTTP requests on port 80 and HTTPS requests on port 443 to the
# underlying asset server. It also rewrites the web_asset_store.xml
# response to cause subsequent request to go through the proxy.
server {
# HTTP access is needed for Specify 6. It will not work with HTTPS.
@benanhalt
benanhalt / dedup.sh
Last active August 29, 2015 14:21
specify attachment deduplication
#!/bin/bash
# This script is for deduplicating Specify attachment files. It is
# intended to be run periodically from a cron job to reclaim space
# lost to duplicate attachment uploads.
#
# Usage:
#
# dedup TARGET_DIR HASH_DIR
#
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Specify 7 Issue Report</title>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<style type="text/css">
table {
width: 100%;