Skip to content

Instantly share code, notes, and snippets.

View abelsromero's full-sized avatar

Abel Salgado Romero abelsromero

View GitHub Profile
@abelsromero
abelsromero / maven-metadata-local.xml
Created October 13, 2017 06:31
poc/publishing asciidoctor rendered docs with maven
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>org.asciidoctor.maven</groupId>
<artifactId>asciidoc-to-html-example</artifactId>
<version>1.0.0-SNAPSHOT</version>
<versioning>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20171013062755</lastUpdated>
@abelsromero
abelsromero / includePaths.rb
Created January 21, 2018 09:46
Asciidoctor extension to include files from several directories defines in a an attribute
class GlobIncludeProcessor < Asciidoctor::Extensions::IncludeProcessor
def process doc, reader, target_glob, attributes
# paths contains absolute paths
paths = doc.attributes['paths'].nil? ? false : doc.attributes['paths'].split(',')
# puts paths
# puts '-------------'
if paths
paths.each do |p|
path = File.join p, target_glob
@abelsromero
abelsromero / image_popup.adoc
Last active March 1, 2022 20:21
How to integrate image popup in Asciidoctor without extensions

This guide shows how to integrate Magnific Popup without custom extensions.

Steps

  1. Download and install Magnific Popup locally.

  2. Create docinfo.html with

Asciidoctor-maven-plugin 2.x.x migration guide

The asciidoctor-maven-plugin 2.0.0 introduces some breaking changes. This guide will provide the steps required to update a project currently using 1.5.x or 1.6.x version to 2.x.x. For each of the breaking changes, the motivation and new equivalent configuration will be offered.

Note
New configuration details are highlighted in bold.
@abelsromero
abelsromero / GraalRunner.java
Last active April 9, 2019 15:21
Simple Java native image with GraalV POC
/**
* This simple code, loops endlessly through the values of a pair of int value.
* However, when running, the memory consumption increases up to 256,3M, at that moment it stabilizes for a while.
* After a brief moment, memory increases to 257,3MB and stops there.
* Env: Windows 10 + WSL + GraalVM 1.0.0-rc-15
*/
public class MiniLauncher {
public static void main(String[] args) {

Asciidoctor Maven Plugin

# open terminal#cmd - return : open -a iTerm
shift + alt - return : open -a iTerm
# Place in corners
shift + alt - 8 : yabai -m window --grid 2:2:1:0:1:1
shift + alt - 9 : yabai -m window --grid 2:2:1:1:1:1
shift + alt - 6 : yabai -m window --grid 2:2:0:0:1:1
shift + alt - 7 : yabai -m window --grid 2:2:0:1:1:1
# Move to screen & make full
shift + alt - 1 : yabai -m window --display 1 && yabai -m display --focus 1 && yabai -m window --grid 1:1:0:0:1:1