Whole wound wrote at whose to style in
She suspicion dejection saw instantly
Required is debating extended wondered as do
Improve up musical welcome he
| # an awk script for extracting course reserves items | |
| # (major props to http://ferd.ca/awk-in-20-minutes.html for the inspiration/confidence) | |
| # | |
| # usage | |
| # awk -f <this file name> <report filename> > reserves-inventory.txt | |
| # | |
| # OCLC inventory headers (as of 11/9/2015) | |
| # ------------------ | |
| # 1 Inst_Symbol | |
| # 2 Holding Location |
| FROM nginx | |
| RUN echo -e "<\!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>bummer</title><style>body{background-color:#000;}pre{color:#aaa;}</style></head><body><\!-- stole this from http://chris.com/ascii/index.php?art=creatures/grim%20reapers --><pre>\n ...\n ;::::;\n ;::::; :;\n ;:::::\' :;\n ;:::::; ;.\n ,:::::' ; OOO\\n ::::::; ; OOOOO\\n ;:::::; ; OOOOOOOO\n ,;::::::; ;' / OOOOOOO\n ;:::::::::\\\`. ,,,;. / / DOOOOOO\n .';:::::::::::::::::;, / / DOOOO\n ,::::::;::::::;;;;::::;, / / DOOO\n;\`::::::\`\'::::::;;;::::: ,#/ / DOOO\n:\`:::::::\`;::::::;;::: ;::# / DOOO\n::\`:::::::\`;:::::::: ;::::# / DOO\n\`:\`:::::::\`;:::::: ;::::::#/ DOO\n :::\`:::::::\`;; ;:::::::::## OO\n ::::\`:::::::\`;::::::::;:::# OO\n |
| var proxyPath = 'http://libappdev.muhlenberg.edu/hours-proxy' | |
| var todaysPath = '/api_hours_today.php?iid=814&format=json' | |
| var weeksPath = '/api_hours_grid.php?iid=814&format=json&weeks=1' | |
| var yearsPath = '/api_hours_grid.php?iid=814&format=json&weeks=52' | |
| var $hoursWidget = $('#hoursWidget') | |
| // these are on every page | |
| $.get(proxyPath + todaysPath, handleTodaysHours) | |
| $.get(proxyPath + weeksPath, handleWeeksHours) |
Whole wound wrote at whose to style in
She suspicion dejection saw instantly
Required is debating extended wondered as do
Improve up musical welcome he
Quick one-liners for course-reserves-related reports w/ WMS.
awk 'BEGIN { FS="|"; COUNT = 0 } END { printf "There are %d items on reserve\n", COUNT } $4 ~ /Reserves/ { COUNT++ }' <filename>
| <?php | |
| /** | |
| * proxy to access HathiTrust bib api via https | |
| */ | |
| if (!isset($_SERVER['QUERY_STRING'])) { | |
| echo "{}"; | |
| exit(); | |
| } |
| gawk -v n=+3 -f checked-out/items-due.awk examples/*All_Checked* | gawk 'BEGIN{FS="|";OFS="|"}NR == 1 {print $0; next} { print $0 | "sort --ignore-case --field-separator=\"|\" -k 12"}' | gawk -f general/to-json.awk |
| <?php | |
| while ( $raw_line = fgets(STDIN) ) { | |
| $line = trim($raw_line); | |
| $parsed = json_decode($line); | |
| // do something with yr object | |
| } |
| #!/usr/bin/env bash | |
| if [ -z $1 ]; then | |
| echo "please pass me a version number!" | |
| exit 1 | |
| fi | |
| VERSION="$1" | |
| DIR="node-v$VERSION-linux-x64" | |
| URL="https://nodejs.org/dist/v$VERSION/$DIR.tar.gz" |
| // script to gather unique circulations from WMS All_Checked_out reports, stored in './data' directory | |
| var fs = require('fs') | |
| var path = require('path') | |
| var Level = require('level') | |
| var split = require('split2') | |
| var rimraf = require('rimraf') | |
| var db = Level('./db') | |
| var LevelUnique = require('level-unique-filter') |