This file contains 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
#!/bin/sh | |
curl -Ssf "$1" > /dev/null | |
if [[ $? -ne 0 ]]; then | |
echo "Error: Non-200 returned for url $1" | |
exit 1 | |
fi |
This file contains 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
import javax.imageio.ImageIO; | |
import javax.imageio.ImageReader; | |
import javax.imageio.stream.FileImageInputStream; | |
import javax.imageio.stream.ImageInputStream; | |
import java.awt.*; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.Iterator; | |
/** |
This file contains 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
'If G and H are defined for the given row, add the difference to K and clear them | |
Private Sub Update_Total(ByVal Row As Integer) | |
Dim punchStart, punchEnd, timeWorked As Integer | |
punchStart = Range("G" & Row).Value | |
punchEnd = Range("H" & Row).Value | |
timeWorked = punchEnd - punchStart | |
If (punchStart > 0 And punchEnd > 0 And timeWorked > 0) Then | |
Range("K" & Row).Value = Range("K" & Row) + timeWorked | |
Range("G" & Row).Value = "" | |
Range("H" & Row).Value = "" |
This file contains 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
# Here's my initial tmux config, which works well on macOS and Linux, | |
# and uses screen-like and vi bindings. If using Linux, see notes about | |
# xclip below. | |
# | |
# If you use iTerm and homebew on a mac, you can set it up to automatically | |
# launch a new tmux session whenever a new terminal window opens: | |
# | |
# 1) Install tmux (e.g. via homebrew: brew install tmux) | |
# 2) Put this file in your home directory, named .tmux.conf | |
# 3) Edit your iTerm Preferences: |
This file contains 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
# Systemd Unit file for Handle Service used by DSpace | |
# | |
# On hosts that use systemd, like RHEL7, this can be used to auto-start | |
# the handle service and provide the familiar "servicectl start|status|stop" | |
# commands for controlling execution. | |
# | |
# To install: | |
# | |
# 1) As dspace: | |
# REQUIRED: |
Solr has built-in CSV export and import facilities, which can be used to copy data from one core to another.
You can use the following process to select documents from one core and move them to another, using only the Solr Admin UI, Chrome, and curl.
- Use the Solr Admin UI's Query screen to formulate a query for the subset of documents you want to dump.
- Run the query and click on the link that gives you the raw query results.
This file contains 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
#!/usr/bin/env node | |
"use strict"; | |
// what does this function return? | |
function a() | |
{ | |
return | |
{ | |
i: 1 |
This file contains 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
#!/bin/bash | |
# | |
# Dumps a subset of one Solr core and loads it into another one. | |
# | |
# WARNING: THIS DUMP AND LOAD IS LOSSY -- DO NOT USE IT FOR BACKUPS! | |
# In particular, multi-valued fields won't import in the target exactly as they were in the source. | |
# | |
# Before running, change the variables below as needed for your task. | |
# |
I hereby claim:
- I am cwilper on github.
- I am cwilper (https://keybase.io/cwilper) on keybase.
- I have a public key whose fingerprint is 9316 C0C1 B5A6 2552 5568 335D 1173 084A BA6C 1222
To claim this, I am signing this object: