Skip to content

Instantly share code, notes, and snippets.

View ggrossetie's full-sized avatar
😅
Hi!

Guillaume Grossetie ggrossetie

😅
Hi!
View GitHub Profile

Sets additional document attributes, which override equivalently-named attributes defined in the document unless the value ends with @.

Selects the converter to use (as registered with this keyword).

const input = `{{},{{{{{},{{<!!!>!<"<!>,<!!!>!>},<!>,<'e">},{<!!<}!uu!!!>!!a!!a!>},<!!!!!>ue!>,<"!!!>!}>,<}!!!>,ii>}}},{},{}},{{},{{<!!!>!>,<i!!'!!{>},{},{<{}}!>},<i<"{,}{!!oo>}},{{{{<}i<}"">},{<o<!>>}},<!!!>uo{}!!'!!<!!!>o!>>},{<!!!!!>!>},<!!!>!>,<>,{<!!!!!>{<!>,<>}}}},{{{},{{}}}},{{<{u'""o>,{<ee!!!!!!!>!!!!e{uea!>!!i>}},{<o{!!!>!!!!e<!>},<!>,<e!!!!>,<>}}},{{{{},{{{<a!!>},{<}<{!>},<!>},<o!e!!},!>!!<u{i>}},{<a{!,!!u!!e}a!>},<u{!!!>},<>}}},{<i,>,{}},{<u!!!>!>eie!>,"!!!,,!>,<}<eo!>},<>,<>}},{{{}}},{},{{{<!>,<iooi!!ueao!>,<!!!>}!>},<"ai>,{<u}a{e!<!!!!!!!>!!u{{!{!>},<<{o!>,<!o>}}},{{{},{<<,"!>},<u!!u'!!!>au!o>,<!!"!!!>'!!!>,<!>},<'oaaou!!!!!>},!>,<e>},{{{{{},<uo,{eiu,!''!ui">}},{<!>,<!>},<!a!!>}},{{},{{},<i!i!!,iu!!!>ie"e!>},<a!>!"i!>{!>},<>},{{{{<!>,<}}!>},<!!!>},<!>},<!!'!>,<,'!>!!<,}{e>},{<ua!>,<>,<}!>!!!>"!>},<'!!!>}<>}},{{<a}!!,ee!!!>!>},<a!e!!!>},<>}},{{{},{<}"a}!>,<!!!>!>},<!!,!>,<<}{o""!!a!!,a>}},{{<>}},{{}}}},{<o!>},<!!<"!>},<!e!!!!!>!>{>},{<>,<<>}}}}}}}},{{{{<!>},<}}'!>,}>}},{<"!!!!!>,'<!>!!i}{o!>ai{"!!
@ggrossetie
ggrossetie / build.adoc
Created December 8, 2017 08:32
Deep dive, build Asciidictor.js introduction

Asciidoctor.js is a JavaScript port of Asciidoctor. With asciidoctor.js, the {asciidoc}[AsciiDoc] syntax can be used in the browser!

Introduction

The {asciidoctorjs-git}[asciidoctor.js project] is a direct port of Asciidoctor from Ruby to JavaScript using the {opal}[Opal] Ruby-to-JavaScript cross compiler. It consists of a Rake build script that executes the Opal compiler on the Asciidoctor source code to produce the asciidoctor.js script.

Opal parses the Ruby code and any required libraries, then rewrites the code into JavaScript under the Opal namespace. The resulting JavaScript can be executed within any JavaScript runtime environment (such as a browser).

const input = "";
let acc = 0;
let i = 0,
len = input.length;
for (; i < len; i++) {
let nextDigitIndex = (i + (input.length / 2)) % input.length;
if (input.charAt(i) === input.charAt(nextDigitIndex)) {
acc += parseInt(input.charAt(i), 0);

Asciidoctor.js User Manual

  • Install

  • Usage

    • How to integrate into a Node.js app, a web page, an Atom plugin, a Brackets plugin, a Nashorn app, a JavaScript app bundled with Webpack…​

    • How to instantiate the Asciidoctor processor

  • Basic API

    • load()

    • convert()

    • Options and attributes

@ggrossetie
ggrossetie / content.adoc
Created November 9, 2017 09:55
Container with items in AsciiDoc
AsciidoctorJ

Java bindings for Asciidoctor. Asciidoctor on the JVM!

1.5.6

This is a test

Hello world

yarn add v1.1.0
warning You are using Node "4.1.1" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || ^8.0.0"
info No lockfile found.
[1/4] Resolving packages...
warning [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Node 0.12.0
Asciidoctor 1.5.4
Opal 0.10.0.beta3
Load scripts: 0.234s
Run #1: 1,642
Run #2: 1,309
Run #3: 1,26
Run #4: 1,236
class IO
def read
if @eof
''
else
`res = self.read_proc(@path)`
@eof = true
@lineno = res.size
res
end