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
<html> | |
<head> | |
<!-- what does this code do? --> | |
<script src="leequery.js"></script> | |
</head> | |
<body> | |
<h1>Playing with JavaScript</h1> | |
<p> | |
This is a paragraph with a button: |
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
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.js"></script> | |
</head> | |
<body> | |
<input type="text" id="searchTerms" placeholder="text to search" /> | |
<button id="searchButton">Search</button> | |
<div id="searchResults"> |
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
# ======================================================================= | |
# tagAdd - adds a tag (term) to the dictionary | |
# | |
# Usage: | |
# | |
# script.execute :in file:/Users/correah/src/mediaflux/tagAdd.tcl :arg -name tagName "tagXX" :arg -name tagDescription "this is the tag XX" | |
# | |
# ======================================================================= | |
set log_name "homework-2023-03-24" |
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
<!DOCTYPE html> | |
<html> | |
<style> | |
th { | |
border-style: solid; | |
} | |
td { | |
border: 0px; | |
padding-top: 0px; |
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 | |
# reference: https://www.atlassian.com/git/tutorials/git-hooks | |
# | |
# To use this Git hook in a given repository: | |
# 1. copy the content to .git/hooks/ | |
# 2. make it an executable: chmod u+x .git/hooks/pre-commit | |
# | |
# Once installed, everytime you issue `git commit` it will make sure the file vault.yml has the | |
# expected token to indicate that is encrypted. If the token is not found we assume the file is | |
# NOT encrypted and reject the commit. |
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
# Reference: https://arxiv.org/abs/2110.01111 | |
a = [1, 9, 100, 23, 4, 99, 500, 245, 77] | |
n = a.length-1 | |
puts "-- ORIGINAL --" | |
puts a | |
for i in 0..n do | |
for j in 0..n do | |
if a[i] < a[j] |
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
require "ezid-client" | |
require "byebug" | |
def show_ark(identifier) | |
puts "Target: #{identifier.target}" | |
puts "ID....: #{identifier.id}" | |
puts "Status: #{identifier.status}" | |
end | |
Ezid::Client.configure do |config| |
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
# Parses timing information for lines that include "ELAPSED: " | |
def parse_file(filename, server) | |
File.readlines(filename).each do |line| | |
elapsed = line.index("ELAPSED: ") | |
next if elapsed.nil? | |
elapsed += 9 | |
# Line looks like: | |
# I, [2021-07-10T00:49:28.827383 #9379] INFO -- : ELAPSED: All items for 99106284923506421 took 1429 ms | |
timestamp = line.split(" ")[1][1..-1] | |
api = line[elapsed..-1].split(" ")[0..1].join("_").downcase |
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 | |
# | |
# This script will process our Alma MARC XML full dump files | |
# and uploads the data to the POD project. | |
# | |
# Notice that we don't publish all records and/or all the data. | |
# | |
# This script expects the `marcli` utility to be available on the PATH | |
# (https://github.com/hectorcorrea/marcli/releases) | |
# |
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
# A very simple config file for Traject to parse a MARC XML file. | |
# | |
# Usage: | |
# traject -t xml -c traject_config_marc_xml.rb -w Traject::DebugWriter xml_tiny.xml | |
to_field 'title', extract_marc('245a', first: true) |
NewerOlder