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
(* | |
Copyright 2009 Konrad M. Lawson | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
function! WC() | |
if getline(1) != '' | |
if &modified || !exists("b:wordcount") | |
let l:old_status = v:statusmsg | |
let position = getpos(".") | |
execute "silent normal g\<c-g>" | |
let b:wordcount = str2nr(split(v:statusmsg)[11]) | |
let v:statusmsg = l:old_status | |
call setpos('.', position) | |
return b:wordcount |
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 really stripped down and simple version of | |
-- Daniel Shockley's DocInfo, which I had trouble getting | |
-- to work on pandoc converted unicode files. | |
-- Thanks to him for the original script: | |
-- DocInfo (for Skim) | |
-- version 1.0, Daniel A. Shockley, http://www.danshockley.com | |
-- http://www.danshockley.com/files/DocInfo.scpt | |
tell application "Skim" | |
set docName to name of document 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
#!/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 |
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
# 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
# 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
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
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
# 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." |
OlderNewer