Skip to content

Instantly share code, notes, and snippets.

View danyill's full-sized avatar
🔭

danyill

🔭
  • 22:07 (UTC +12:00)
View GitHub Profile
@danyill
danyill / log.txt
Created November 20, 2018 20:57
web server log for request
web_1 | 166.65.189.100 - - [21/Nov/2018:09:56:34 +1300] "GET /w/api.php?action=visualeditor&format=json&paction=metadata&page=Modelling_GXP_Parallels_in_PowerFactory&uselang=en&oldid=26916 HTTP/1.1" 200 1462 "https://kokako.cc/wiki/Modelling_GXP_Parallels_in_PowerFactory?veaction=edit" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36"
@danyill
danyill / debug-mediawiki.log
Created November 20, 2018 21:09
partial log from root@b18bd4c9d8a9:/var/log/mediawiki#
-0', true)
#20 /var/www/html/w/includes/Message.php(1290): MessageCache->get('editnotice-0', true, Object(LanguageEn))
#21 /var/www/html/w/includes/Message.php(982): Message->fetchMessage()
#22 /var/www/html/w/includes/Title.php(5052): Message->exists()
#23 /var/www/html/w/extensions/VisualEditor/includes/ApiVisualEditor.php(382): Title->getEditNotices()
#24 /var/www/html/w/includes/api/ApiMain.php(1579): ApiVisualEditor->execute()
#25 /var/www/html/w/includes/api/ApiMain.php(535): ApiMain->executeAction()
#26 /var/www/html/w/includes/api/ApiMain.php(506): ApiMain->executeActionWithErrorHandling()
#27 /var/www/html/w/api.php(94): ApiMain->execute()
#28 {main}
@danyill
danyill / batch-api.txt
Created November 20, 2018 21:15
Batch API
https://kokako.cc/w/api.php?action=parsoid-batch&batch=[{"action":"imageinfo","filename":"Script_step2b.png","page":"Modelling_GXP_Parallels_in_PowerFactory","txopts":{"width":1200}}]
{
"parsoid-batch": [
{
"width": 1804,
"height": 770,
"size": 268694,
"mediatype": "BITMAP",
"mime": "image/png",
@danyill
danyill / notes.adoc
Created December 18, 2018 06:51
contributing.adoc issue with Antora

Testing contributing.adoc for Antora:

docker run -it ubuntu:cosmic bash

Within the container:

apt update && apt install -y wget git && wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
@danyill
danyill / Antora-tests.adoc
Created December 18, 2018 06:52
Antora tests 1
885 passing (1m)
8 failing
1) cli
     should generate site to fs destination when playbook file is passed to generate command:
   Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/antora/packages/cli/test/cli-test.js)
2) cli
     cache directory
@danyill
danyill / stacktrace.txt
Created March 11, 2019 08:23
Asciidoctor 2.0.0.rc1
21:21 $ asciidoctor -q --trace Setting_Guide.adoc
Traceback (most recent call last):
71: from /usr/local/bin/asciidoctor:23:in `<main>'
70: from /usr/local/bin/asciidoctor:23:in `load'
69: from /var/lib/gems/2.5.0/gems/asciidoctor-2.0.0.rc.1/bin/asciidoctor:15:in `<top (required)>'
68: from /var/lib/gems/2.5.0/gems/asciidoctor-2.0.0.rc.1/lib/asciidoctor/cli/invoker.rb:109:in `invoke!'
67: from /var/lib/gems/2.5.0/gems/asciidoctor-2.0.0.rc.1/lib/asciidoctor/cli/invoker.rb:109:in `each'
66: from /var/lib/gems/2.5.0/gems/asciidoctor-2.0.0.rc.1/lib/asciidoctor/cli/invoker.rb:126:in `block in invoke!'
65: from /var/lib/gems/2.5.0/gems/asciidoctor-2.0.0.rc.1/lib/asciidoctor.rb:1530:in `convert_file'
64: from /var/lib/gems/2.5.0/gems/asciidoctor-2.0.0.rc.1/lib/asciidoctor.rb:1530:in `open'
@danyill
danyill / extension.rb
Last active December 23, 2019 23:50
Extension for numbering figures
require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal'
include Asciidoctor
Extensions.register do
treeprocessor do
process do |document|
figureNumbers = {}
document.find_by(context: :section) {|sect|
if sect.level == 1
@danyill
danyill / defaults.adoc
Created December 30, 2019 10:06
Dan's defaults for asciidoc
:figure-caption: Figure
:toc: left
:docinfo: shared
:docinfodir: {assetdir}
:docinfosubs: attributes
:safe-mode-unsafe:
:iconfont-remote!:
:stylesheet: asciidoctor.css
:scriptsdir: {assetdir}
:linkcss!:
@danyill
danyill / asciidoc-static.adoc
Created January 2, 2020 01:29 — forked from briandominick/asciidoc-static.adoc
Static Site Generators with AsciiDoc Support

There are 19 static site generators that support AsciiDoc sourcing.

21:21 $ asciidoctor -v Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
21:20 $ asciidoctor --trace -r ./lib/src-inline-macro.rb ./lib/src-inline-macro/sample.adoc
Traceback (most recent call last):
26: from /usr/bin/asciidoctor:15:in `<main>'
25: from /usr/lib/ruby/vendor_ruby/asciidoctor/cli/invoker.rb:111:in `invoke!'
24: from /usr/lib/ruby/vendor_ruby/asciidoctor/cli/invoker.rb:111:in `each'
23: from /usr/lib/ruby/vendor_ruby/asciidoctor/cli/invoker.rb:128:in `block in invoke!'
22: from /usr/lib/ruby/vendor_ruby/asciidoctor/convert.rb:183:in `convert_file'