Skip to content

Instantly share code, notes, and snippets.


Dan Allen mojavelinux

View GitHub Profile
mojavelinux / steps.asciidoc
Created Jun 7, 2013
Steps to convert WordPress post to AsciiDoc
View steps.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 / asciidoc-syntax-quick-reference.adoc
Created Dec 29, 2014
AsciiDoc Syntax Quick Reference (sample document)
View asciidoc-syntax-quick-reference.adoc

AsciiDoc Syntax Quick Reference

mojavelinux / jekyll-asciidoctor-diagram.adoc
Last active May 5, 2022
How to configure Asciidoctor Diagram in a Jekyll site
View jekyll-asciidoctor-diagram.adoc

How to configure Asciidoctor Diagram in a Jekyll site

Generate site

$ cd /tmp
$ mkdir jekyll-site-creator
mojavelinux /
Created Oct 21, 2010
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 / include.asciidoc.txt
Last active Apr 3, 2022
A sample AsciiDoc file for testing Asciidoctor.
View include.asciidoc.txt
== 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 / app.rb
Created Mar 4, 2022
Ruby program to print Hello, World!
View app.rb
puts 'Hello, World!'
mojavelinux / atom-fedora-20.adoc
Last active Jan 14, 2022
Instructions for building and launching the Atom text editor on Fedora 20.
View atom-fedora-20.adoc

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 / spring-gs-accessing-twitter.adoc
Last active Nov 23, 2021
Spring Guides: Accessing Twitter Data
mojavelinux / nodegit-private-clone-test.js
Created May 21, 2018
Clone a private repository using nodegit
View nodegit-private-clone-test.js
const git = require('nodegit')
const fs = require('fs-extra')
const { URL } = require('url')
const REPO_URL = ''
const CLONE_DIR = '/tmp/private-repo-clone-test'
;(async () => {
await fs.emptyDir(CLONE_DIR)
let authAttempted = false
await git.Clone.clone(REPO_URL, CLONE_DIR, {