Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
@mojavelinux
mojavelinux / marked-asciidoc-content.adoc
Last active March 7, 2024 20:23
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 / include.asciidoc.txt
Last active October 24, 2023 09:06
A sample AsciiDoc file for testing Asciidoctor.
== Included Section
Look, I came from out of the [blue]#blue#!
--
I'm keepin' it open.
An 'open block', like this one, can contain other blocks.
It can also act as any other block. (TODO)
@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 / 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 / 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 / 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

@mojavelinux
mojavelinux / steps.asciidoc
Created June 7, 2013 21:24
Steps to convert WordPress post to AsciiDoc
  1. Pull out content from <content> tag in exported XML file

  2. Replace blank lines w/ </p><p>, add <p> as first line and </p> as last line

  3. Put that content into the body of a basic HTML document structure (so it looks like an HTML file)

  4. convert using

    pandoc --no-wrap -f html -t asciidoc post-content.html > post-content.adoc
  5. use sed to cleanup

    sed -i s/^image:/image::/ post-content.adoc
@mojavelinux
mojavelinux / app.rb
Created March 4, 2022 11:40
Ruby program to print Hello, World!
puts 'Hello, World!'
@mojavelinux
mojavelinux / asciidoc-writers-guide.asciidoc
Last active February 23, 2022 07:44
Asciidoc Writer's Guide

AsciiDoc Writer’s Guide

@mojavelinux
mojavelinux / spring-gs-accessing-twitter.adoc
Last active November 23, 2021 10:08
Spring Guides: Accessing Twitter Data

Accessing Twitter Data