Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
@mojavelinux
mojavelinux / protest-with-proposals-in-hand.md
Last active October 8, 2026 06:43
Protest with Proposals in Hand

Protest with Proposals in Hand

I believe and support the victims of sexual assault. I want justice for them. I also want sexual assault eradicated from our society. Yet it keeps happening. So we’re justifiably angry as hell.

In order to stop sexual assault, or get justice when it happens, though, we must be more precise about what we’re asking for. We need solutions that will actually make things better.

A university, a police department, and a prosecutor have different authorities, responsibilities, standards, and remedies. If we blur those distinctions, we can end up demanding that the wrong institution take action, right or wrong, while failing to demand the things that the right institutions actually can do to affect change.

The more serious the allegation, the more important precision becomes, not less. That doesn’t mean lowering our expectations. It means demanding more precise accountability.

@mojavelinux
mojavelinux / request-a-safety-check.md
Last active October 6, 2026 18:51
Request a Safety Check: A Missing Alternative Between Doing Nothing and Calling 911

Request a Safety Check: A Missing Layer Between Doing Nothing and Calling 911

I recently found myself thinking about incident reporting after the reopening of the 2024 sexual assault case at Cornell. I wrote to Cornell’s president and provost with a concrete idea for improving safety on campus: Request a safety check.

The idea is simple. Give people a way to say:

Something doesn’t seem right over there. I have a bad feeling about this. Please have someone trained take a look.

That’s different from asking someone to report a crime. It’s different from asking someone to call 911 to declare an emergency. It’s a low-threshold way to act on a concern when the person observing the situation doesn’t know, or need to know, exactly what’s happening.

@mojavelinux
mojavelinux / collapsible.md
Created March 31, 2026 16:32
Collapsible block in Markdown with and without markup in the title
title without markup

content

vs

Details title with **bold** markup
@mojavelinux
mojavelinux / ApplicationInitializer.java
Created October 21, 2010 04:53
A bridge between the ServletContext life cycle events and CDI observers (with example observer ApplicationInitializer)
// uncomment line if you want the instance to be retained in application scope
// @ApplicationScoped
public class ApplicationInitializer
{
public void onStartup(@Observes @Initialized ServletContext ctx)
{
System.out.println("Initialized web application at context path " + ctx.getContextPath());
}
}
@mojavelinux
mojavelinux / marked-asciidoc-content.adoc
Last active February 11, 2026 16:39
Advice on configuring Marked (OSX) to work with AsciiDoc content using AsciiDoc (or Asciidoctor) as a custom Markdown processor, including how to get AsciiDoc includes to work.

Using Marked with AsciiDoc content

Using Marked with AsciiDoc content

Marked is an OSX application to preview Markdown syntax in HTML. It’s possible to configure AsciiDoc as an custom Markdown processor to create the HTML for your AsciiDoc files.

@mojavelinux
mojavelinux / asciidoc-syntax-quick-reference.adoc
Created December 29, 2014 02:01
AsciiDoc Syntax Quick Reference (sample document)

AsciiDoc Syntax Quick Reference

@mojavelinux
mojavelinux / Writing Tools Writeup.markdown
Created January 30, 2012 18:56 — forked from matthewmccullough/Writing Tools Writeup.md
How To Write A Technical Book (One Man's Modest Suggestions)
@mojavelinux
mojavelinux / slide-transformer.rb
Last active May 11, 2024 10:38
Reconfigure AST to convert all blocks with the role SLIDE into sections and transferring the content to those new sections.
require 'asciidoctor/extensions'
# Reconfigure AST to convert all blocks with the role SLIDE into
# sections and transferring the content to the new sections.
Asciidoctor::Extensions.register do
treeprocessor do
process do |doc|
doc.blocks.replace (doc.find_by role: 'SLIDE').map {|slide|
slide.parent.blocks.delete slide
sect = Asciidoctor::Section.new doc, 1, false
@mojavelinux
mojavelinux / jekyll-asciidoctor-diagram.adoc
Last active November 26, 2022 13:06
How to configure Asciidoctor Diagram in a Jekyll site

How to configure Asciidoctor Diagram in a Jekyll site

Generate site

$ cd /tmp
$ mkdir jekyll-site-creator
@mojavelinux
mojavelinux / atom-fedora-20.adoc
Last active September 26, 2022 18:21
Instructions for building and launching the Atom text editor on Fedora 20.

Using Atom on Fedora 20

This guide walks you through the steps of building and launching the Atom text editor on Fedora 20.

Building Atom

  1. Install prerequisite packages