Skip to content

Instantly share code, notes, and snippets.

@johnd0e
johnd0e / openapi.yaml
Created August 16, 2023 23:27
KoboldAI API
components:
schemas:
AddSentenceSpacingSettings:
properties:
value:
type: boolean
required:
- value
type: object
AuthorsNoteDepthSetting:
@johnd0e
johnd0e / RClickEx.lua
Last active June 29, 2023 21:12
[FAR macro] RClickEx — Right Click Menu Activator
local Info = Info or package.loaded.regscript or function(...) return ... end --luacheck: ignore 113/Info
local nfo = Info { _filename or ...,
name = "RClickEx";
description = "Right Click Menu Activator";
version = "0.3"; --http://semver.org/lang/ru/
author = "jd";
url = "https://forum.farmanager.com/viewtopic.php?t=13250";
id = "D841C948-BE8A-4ACB-97F4-53205783A971";
minfarversion = {3,0,0,6171,0};
files = "README.md";
@johnd0e
johnd0e / HlfTools.lua
Last active May 6, 2023 19:29
[FAR macro] HlfTools
local Info = Info or package.loaded.regscript or function(...) return ... end --luacheck: ignore 113/Info
local nfo = Info { _filename or ...,
name = "HlfTools";
description = "Misc tools for FAR help files";
version = "0.1"; --http://semver.org/lang/ru/
author = "jd";
url = "http://forum.farmanager.com/viewtopic.php?f=15&t=10903";
id = "98B719AC-42B1-49D3-AF03-17DF9A3636FC";
minfarversion = {3,0,0,4138,0}; --ACTL_GETWINDOWINFO возвращает все окна в порядке текущего z-order'а.
help = function(nfo) far.Message(nfo.helpstr, nfo.name, nil, "l") end;
@johnd0e
johnd0e / SmoothMove.lua
Last active April 16, 2023 16:25
SmoothMove
local Info = Info or package.loaded.regscript or function(...) return ... end --luacheck: ignore 113/Info
local nfo = Info { _filename or ...,
name = "SmoothMove";
description = "Additional stops inside camelCase and snake_case words for CtrlLeft/Right, CtrlShiftLeft/Right, CtrlBS/Del/T"; --luacheck: ignore 631
version = "1"; --http://semver.org/lang/ru/
author = "jd";
url = "https://forum.farmanager.com/viewtopic.php?t=13191";
id = "9E2FCC08-B2FB-4CE4-A349-6BFB236BAEB9";
minfarversion = {3,0,0,5460,0}; --LuaFAR 699: luautf8
options = {
@johnd0e
johnd0e / DefinitionToBulletList.lua
Last active May 3, 2023 18:12
Makefile for documents converting using pandoc
-- transform to BulletList
function DefinitionList(el)
local items = {}
for i,item in ipairs(el.content) do
local dt,blocks = table.unpack(item) --term,definitions
local first = blocks[1]
items[i] = first
for j=2,#blocks do
first:extend(blocks[j])
// ==UserScript==
// @author johnd0e
// @name IITC plugin: Collapsible portal levels / ornaments
// @category Layer
// @version 0.1.0
// @description Replace mutliple overlays with single layerChooser entry; togglable on faction layers longclick
// @id collapsible-layers
// @namespace https://gist.github.com/johnd0e
// @homepageURL https://gist.github.com/johnd0e/b378cf7593008f933778c07f7ae03fea
// @supportURL https://gist.github.com/johnd0e/b378cf7593008f933778c07f7ae03fea#new_comment_field
// ==UserScript==
// @author jd
// @name IITC plugin: Browsed portals history
// @category Misc
// @version 0.1
// @description Pushes browsed portals into browser's history, and allows navigate between them with back/forward buttons.
// @namespace https://gist.github.com/johnd0e
// @homepageURL https://gist.github.com/johnd0e/a06ea19aefa6cbf35651eca9bee470a3
// @supportURL https://gist.github.com/johnd0e/a06ea19aefa6cbf35651eca9bee470a3#new_comment_field
// @downloadURL https://gist.github.com/johnd0e/a06ea19aefa6cbf35651eca9bee470a3/raw/custom-linked-portals-show.user.js
@johnd0e
johnd0e / piper.lua
Last active April 16, 2024 11:26
[FAR luajit module]
--https://forum.farmanager.com/viewtopic.php?f=60&t=8696&p=167904#p167904
-- based on https://forum.farmanager.com/viewtopic.php?t=8696
local SYNTAX = [[
Executes a specified command, putting the specified text to it's input stream,
and providing convenient access to the command's output/err.
Syntax: obj = sh.piper(cmdline [,options])
cmdline: a string specifying the command to be executed
options: a table with optional keys:
@johnd0e
johnd0e / yandex-maps-api-loader-debug.user.js
Last active May 16, 2021 15:56
IITC plugin: Yandex maps jsapi loader
// ==UserScript==
// @author johnd0e
// @name IITC plugin: Yandex maps jsapi loader (debug)
// @category Map Tiles
// @version 0.1.0
// @description Loads local copy of jsapi script in case when online one is not available (e.g. blocked by provider).
// @namespace https://gist.github.com/johnd0e
// @homepageURL https://gist.github.com/johnd0e/d7c58f4bcb19c40dc68760a44c847785
// @supportURL https://gist.github.com/johnd0e/d7c58f4bcb19c40dc68760a44c847785#new_comment_field
// @updateURL https://gist.github.com/johnd0e/d7c58f4bcb19c40dc68760a44c847785/raw/yandex-maps-api-loader-debug.meta.js
// ==UserScript==
// @author johnd0e
// @name IITC plugin: Customizing styles for highlight-portal-history
// @category Custom
// @version 0.2.0
// @description Set custom portal size additionally to highlighting
// @id highlight-portal-history-customs
// @namespace https://gist.github.com/johnd0e
// @downloadURL https://gist.github.com/johnd0e/3e0caec364087ed3599fa8ccb1d6c5ae/raw/highlight-portal-history-customs.user.js
// @match https://intel.ingress.com/*