Skip to content

Instantly share code, notes, and snippets.

View hsablonniere's full-sized avatar
😎

Hubert SABLONNIÈRE hsablonniere

😎
View GitHub Profile
@hsablonniere
hsablonniere / slide-transformer.rb
Created December 1, 2016 23:54 — forked from mojavelinux/slide-transformer.rb
Reconfigure AST to convert all blocks with the role SLIDE into sections and transferring the content to those new sections.
require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal'
require 'pp'
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
@hsablonniere
hsablonniere / LICENSE.txt
Created April 8, 2012 17:01 — forked from 140bytes/LICENSE.txt
Mother Effing JavaScript Loader - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE