Skip to content

Instantly share code, notes, and snippets.

@Ruin0x11
Ruin0x11 / lss.lua
Created March 7, 2022 07:47
lss.lua
local inspect = require "inspect"
local Rule = {}
local function rule(...)
local classes = {}
local elementId = nil
local pseudos = {}
local count = select("#", ...)
@Ruin0x11
Ruin0x11 / output.txt
Created December 12, 2021 23:55
Elona+ CGX item frequency tables
secret experience of Kumiromi 0.00% (2) :.......................................
lightsabre 0.00% (3) :.......................................
book of resurrection 0.00% (4) :.......................................
guillotine 0.00% (6) :.......................................
iron maiden 0.00% (6) :.......................................
livestock feed 0.00% (6) :.......................................
mandrake salad 0.00% (6) :.......................................
disinfectant 0.00% (11) :.......................................
vomit 0.00% (11) :.......................................
small medal 0.00% (11) :.......................................
@Ruin0x11
Ruin0x11 / start.hsp
Created August 1, 2021 07:28
hsplua test
#include "hsplua.as"
hl_newstate 0
hl_switchstate 0
hl_pushfunction *dolog
hl_setglobal "dolog"
hl_dostring "g = dolog('tests', 12345, 'test')"
hl_getglobal "g"
a=hl_tointeger(1)
@Ruin0x11
Ruin0x11 / inv.org
Created July 12, 2020 03:03
invctrl ops

invctrl ops

NOTE: on_item_selected and on_filter must be extracted as separate components. This is to allow shortcuts.

1 - general inventory (“X”)

properties

  • Supports tagging as no-drop.

on_filter

  • Include items on chara.
  • Include items on the ground.
  • Include equipped items.
  • Permit own_state 5.
@Ruin0x11
Ruin0x11 / SpellsMenu.lua
Created July 10, 2020 05:50
IUiLayer template
local Gui = require("api.Gui")
local Draw = require("api.Draw")
local I18N = require("api.I18N")
local Ui = require("api.Ui")
local data = require("internal.data")
local IUiLayer = require("api.gui.IUiLayer")
local UiList = require("api.gui.UiList")
local UiWindow = require("api.gui.UiWindow")
local InputHandler = require("api.gui.InputHandler")
@Ruin0x11
Ruin0x11 / nginx.dev.conf
Last active May 3, 2020 20:22
szurubooru dev config
pid /tmp/nginx/nginx.pid;
error_log /tmp/nginx/error.log;
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
http {
URxvt*foreground: #DDCCBB
! Brown BG
!*background: #30251D
! Grey BG
URxvt*background: #151515
!black
@Ruin0x11
Ruin0x11 / auth.lua
Created January 27, 2020 11:53
YouTube account challenge auth
-- luarocks install inspect
local inspect = require("inspect")
local requests = require("requests")
local json = require("json")
local function p(...)
print(inspect(...))
end
@Ruin0x11
Ruin0x11 / rar2zip.sh
Created January 23, 2020 21:33
rar2zip.sh
#!/bin/bash
#
# rar2zip conversion script
# Based on: https://shkspr.mobi/blog/2016/12/converting-rar-to-zip-in-linux/
#
# Usage: rar2zip.sh file [file ...]
echo "Converting RARs to ZIPs"
# Use RAM disk for temporary files.
@Ruin0x11
Ruin0x11 / vstest.el
Last active October 3, 2019 20:50
Use VSTest from Emacs
(defcustom vstest-assembly "" "VSTest assembly to use")
(setq vstest-assembly "C:\\path\\to\\assembly.dll")
(defun vstest-console-all ()
(interactive)
(let ((class-name (file-name-sans-extension (buffer-name)))
(default-directory (projectile-project-root))
(assembly vstest-assembly))
(compile (concat "vstest.console " assembly))))