Skip to content

Instantly share code, notes, and snippets.

View abelsromero's full-sized avatar

Abel Salgado Romero abelsromero

View GitHub Profile
# 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

Asciidoctor Maven Plugin

@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 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 / 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

@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 / 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 / errors.log
Created July 22, 2017 09:24
ReGoth compilation errors (MSYS2 clean installation)
In file included from C:/home/bin/msys64-regoth/mingw64/include/c++/7.1.0/chrono:42:0,
from C:/home/bin/msys64-regoth/home/my_user/games/REGoth/src/utils/Utils.h:15,
from C:/home/bin/msys64-regoth/home/my_user/games/REGoth/src/components/Entities.h:2,
from C:/home/bin/msys64-regoth/home/my_user/games/REGoth/src/engine/World.h:6,
from C:/home/bin/msys64-regoth/home/my_user/games/REGoth/src/engine/BaseEngine.h:3,
from C:\home\bin\msys64-regoth\home\my_user\games\REGoth\src\audio\AudioWorld.cpp:17:
C:/home/bin/msys64-regoth/mingw64/include/c++/7.1.0/bits/parse_numbers.h:53:21: error: expected nested-name-specifier before '=' token
using __valid = true_type;
^
C:/home/bin/msys64-regoth/mingw64/include/c++/7.1.0/bits/parse_numbers.h:59:21: error: expected nested-name-specifier before '=' token
@abelsromero
abelsromero / ReGot_compile_mingw_error.log
Created July 21, 2017 06:18
Compile errors for ReGoth on MinGW with MSYS2
[ 56%] Building C object lib/openal-soft/CMakeFiles/OpenAL32.dir/OpenAL32/alAuxEffectSlot.c.obj
In file included from C:/home/bin/msys64/usr/include/stdio.h:61:0,
from C:/home/bin/msys64/home/my_user/temp/REGoth/lib/openal-soft/OpenAL32/Include/alMain.h:5,
from C:\home\bin\msys64\home\my_user\temp\REGoth\lib\openal-soft\OpenAL32\alAuxEffectSlot.c:28:
C:/home/bin/msys64/usr/include/sys/types.h:129:18: error: conflicting types for 'time_t'
typedef _TIME_T_ time_t;
^~~~~~
In file included from C:/home/bin/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:7:0,
from C:/home/bin/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.1.0/include/stddef.h:1,
from C:/home/bin/msys64/usr/include/stdlib.h:16,
@abelsromero
abelsromero / openTESArena-msys2-build.md
Created July 16, 2017 10:31
openTESArena-msys2-build.md

This document describes how to setup a MYS2 environment to build OpenTESArena (https://github.com/afritz1/OpenTESArena). Note that this guide is exclusive for a 64 bits build.

MSYS2 installation

  1. Download and install last version from http://www.msys2.org/

  2. (OPTIONAL) Change language in .bashrc and restart shell