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
// https://yggdrasil.eng.hokudai.ac.jp/info_student/edu/ | |
$("tr").map(function(){ | |
if($(this).children().slice(3, 4).text().match("大鐘")){ | |
return $(this).children().slice(0, 4).map(function(){ | |
return $(this).text(); | |
}).toArray().join(" ").replaceAll(" ", " "); | |
} | |
}).toArray().join("\n"); |
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 | |
# frozen_string_literal: true | |
# Usage: pdfinfo input.pdf | ./pts2mm.rb | |
# This script converts "595.276 x 841.89 pts" to "210.00 x 297.00". | |
# 72pt = 1inch = 25.4 mm | |
print STDIN.read.scan(/(\S+) x (\S+)/).map { _1.map(&:to_f).map { |j| '%.2f' % (j / 72 * 25.4) }.join(' x ') + "\n" }.join |
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
/* -*- js-indent-level: 2 -*- */ | |
(function (e, s) { | |
const re = /(?:.*?\/){0,1}(?:dp|gp\/product)\/([0-9A-Z]{10})/ | |
e.src = s | |
e.onload = function () { | |
jQuery(document).ready(function ($) { | |
console.log(($.map($('a.a-link-normal'), | |
function (el) { | |
const line = el.attributes.href.textContent | |
const m = line.match(re) |
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 | |
# frozen_string_literal: true | |
require 'csv' | |
# Parse student lists from | |
# - ELMS Moodle and | |
# - "HOKKAIDO Univ. Entry System of Syllabi and Academic Records" | |
# and compare them. The script checks only names and student IDs. | |
# |
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> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Amazon URL Shortner</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> | |
<script> | |
$(function () { | |
const re = /(https:\/\/www\.amazon\.co\.jp\/)(?:.*?\/){0,1}(?:dp|gp\/product)\/([0-9A-Z]{10})/ |