Skip to content

Instantly share code, notes, and snippets.

@oncomouse
oncomouse / todo.org
Created November 4, 2023 21:34
Very large todo.org file

Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium [

Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium [

Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium [

<2023-08-21 Mon 13:00-15:30> <2023-08-23 Wed 13:00-15:30> <2023-08-25 Fri 13:00-15:30>

  • [X] Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium
  • [X] Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium

Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium [

<2023-08-28 Mon 13:00-15:30> <2023-08-30 Wed 13:00-15:30> <2023-09-01 Fri 13:00-15:30>

@oncomouse
oncomouse / Readme.md
Last active December 23, 2021 15:37
Patch to run Juxta in 2021

This is a patch to compile and run juxta-services in 2021, which doesn't work otherwise.

You have to run JDK-1.8, as the code does not work with anything newer.

Usage

  1. Clone https://github.com/performant-software/juxta-service and run cd juxta-service
  2. Run curl -so patch.diff https://gist.githubusercontent.com/oncomouse/3172563c1105f0618e43f8703c87490d/raw/0be455e65ef6acd49fba050d5884cf197c468358/patch.diff to download the below patch.diff file.
  3. Run git apply patch.diff
  4. You can then follow the instructions in the original README file included with Juxta.
@oncomouse
oncomouse / make_signup.rb
Created January 27, 2021 23:22
Signup Maker
require 'csv'
File.open('./spr2021-signup.md', 'w') do |fp|
fp.puts '# ENGL 604: Spring 2021 Presentations'
CSV.foreach('./spr2021.csv', headers: true) do |row|
fp.puts "\n## #{row.field('FIRST NAME')} #{row.field('LAST NAME')}\n\n"
fp.puts "### Dates\n\n1. \n1. \n1. \n\n"
fp.puts "### Topics\n\n* \n* \n"
end
end
@oncomouse
oncomouse / dirs.rb
Last active December 9, 2020 15:39
Create grade rubrics for students given a CSV file exported from Banner and a blank rubric
# frozen_string_literal: true
require 'fileutils'
require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = 'Usage: dirs.rb [options]'
opts.on('-a', '--assignment ASSIGNMENT', 'Assignment Name') { |v| options[:assignment] = v }
@oncomouse
oncomouse / grammar.html
Created October 13, 2020 16:42
Use Tracery in Jekyll
---
layout: tracery
---
{
"origin": "Hello, #name#.",
"name": [
"#adjective# #noun#",
"#adjective# #noun#",
"#adjective# #noun#",
"#adjective#, #adjective# #noun#"
@oncomouse
oncomouse / Readme.md
Created July 31, 2020 15:56
Workspace Output for CoC.nvim formatting issue

Verbose Coc.nvim workspace output

This illustrates a problem I'm having with JavaScript formatting in CoC.nvim

Server Output

Incorrect Output

With the first (broken) coc-settings.json file, the following results from :CocCommand workspace.showOutput appear.

@oncomouse
oncomouse / argv-split.js
Last active June 2, 2020 14:38
ARGV Splitter and Parser for Node.js
/**
Usage:
// test.js
const argv = require('./argv-split')
const arguments = argv(process.argv.slice(2))
console.log(arguments)
> node test.js -abc 123 --foo=bar -de6 --flag1 -r5 file1 file2
{
@oncomouse
oncomouse / tiny-argv.js
Last active May 30, 2020 20:15
Tiny ARGV Parser in Node
/**
Usage:
const arguments = argv()
.value({key: 'foo', defaultValue: 'bar', alias: 'f'})
.flag({key: 'flag'})
console.log(arguments.foo, arguments.flag)
> node script.js --flag -f TinyArgv
TinyArgv true
@oncomouse
oncomouse / restore-citekeys.js
Last active May 19, 2020 17:02
Restore Pandoc Citation Keys
/*
I use this to restore citeproc keys to my Pandoc MS's after de-compiling Word
documents that have been edited using track changes.
*/
const fs = require('fs')
const child_process = require('child_process')
// Tiny ARGV Parser:
const TinyArgv = function (argv) {
this.__argv = argv
@oncomouse
oncomouse / matchWith.js
Last active June 27, 2019 15:16
Pattern matching (matchWith) for Crocks ADTs
const compose = require('crocks/helpers/compose');
const curry = require('crocks/helpers/curry');
// head :: [a] -> a
const head = xs => xs[0];
// split :: String -> String -> [String]
const split = curry((s, xs) => xs.split(s));
// toString :: a -> String
const toString = m => m.toString();
// has :: a -> Object -> Boolean
const has = curry((key, obj) => Object.prototype.hasOwnProperty.call(obj, key));