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 | |
# Can be used to create a merged bibliography from a set of exported collectiions | |
# list files by name length: | |
MAINCOLLECTION=`ls *.bib | perl -e 'print sort { length($a) <=> length($b) } <>' | head -n 1` | |
MAINROOT=$(echo "$MAINCOLLECTION" | cut -f 1 -d '.') | |
rm -f "$MAINCOLLECTION Bibliography.md" # In case we already created one before | |
for FILE in *.bib |
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 python3 | |
# Requires pypinyin, can be installed with pip: https://github.com/mozillazg/python-pinyin | |
# Thanks to XerCis on CSDN: https://blog.csdn.net/lly1122334/article/details/105380586 | |
# Example: psort file-with-Chinese-words-on-each-line.txt | |
import sys | |
from pypinyin import pinyin, Style | |
from itertools import chain |
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 is a workaround for lack of pause in curl: | |
# example: | |
# kurl 20 “http://myurl.com/[1-10].jpg” | |
# Will download with a 20 second pause | |
# Assumes $1 is pause in seconds between requests | |
# Assumes $2 is URL, with [x-y] as range inside it | |
# Assumes output is .jpg file | |
if [ -z "$1" ] 2> /dev/null; then | |
echo "No parameters found. Exiting." |
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
javascript:(function(){p=prompt('Find book or ebook at St Andrews by Keyword:','');if(p){document.location.href='https://encore.st-andrews.ac.uk/iii/encore/plus/C__S'+escape(p)+'__Ff%3Afacetfields%3Atitle%3Atitle%3ATitle%3A%3A__Orightresult__U__X0__T?lang=eng&suite=def'};})(); |
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
javascript:(function(){p=prompt('Find book or ebook at St Andrews by Keyword:','');if(p){document.location.href='https://encore.st-andrews.ac.uk/iii/encore/plus/C__S'+escape(p)+'__Orightresult__U__X0__T?lang=eng&suite=def'};})(); |
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
# assumes dezoom.sh is in the same directory | |
# assumes list.txt containing URLs on separate lines to each of the NLA maps | |
# the URL should point to the jpg to the tile in the bottom right of the seadragon zoom tiles | |
# NLA offers jpg and tiff download but former is low resolution and latter are way too massive in size | |
# echo Paste in the highest tile on zoom level 14: | |
listfile="/Users/kml/shell/list.txt" | |
lines=`cat $listfile` | |
totallines=`grep -c ".*" list.txt` | |
count=0 | |
for line in $lines; do |
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
# This is a wrapper for: https://github.com/lovasoa/dezoom.sh | |
# Running that command can be tedious if you have a regular URL pattern from openSeaDragon, | |
# such as the NLA format: https://nla.gov.au/[some image id]/dzi?tile=14/44_38.jpg | |
# Running this will prompt you for the url pointing to the highest X_Y tile and will | |
# then construct the appropriate dezoom.sh command using -X and -Y parameters | |
# it assumes you have wget and ImageMagick installed, and that the dezoom.sh file | |
# is in the same directory. | |
echo Paste in the highest tile on zoom level 14: | |
read fullurl |
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
// | |
// main.m | |
// keyswitch | |
// | |
// Created by K. M. Lawson on 2015.11.25. | |
// | |
// | |
// com.apple.inputmethod.Korean.2SetKorean | |
// com.apple.inputmethod.Kotoeri.Japanese | |
// com.apple.inputmethod.TCIM.Pinyin |
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 ruby | |
# Rename and save this as fbsetup.rb, and add a fbsetup alias to your bash setup to point to this script | |
# This script is to designed to be run from the command line within a directory where you have a list of student assignments you will mark. | |
# The command, to be run in the directory of the target feedback form takes the format of: | |
# fbsetup [modulename] [assessmentname-one-word] [duedate-year-month-day] | |
# Example: | |
# fbsetup 3335 Short-Essay-1 2015-10-20 | |
# It will: | |
# 1. The student assignments downloaded from MMS have the student number as the first 9 characters. It will grab these first 9 characters and assume they are the student number |
NewerOlder