content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
--!A cross-platform terminal ui library based on Lua -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the...
nilq/small-lua-stack
null
local M = {} M.msgnotext = 'No text selected.' M.warnedualimit = false function M:run(func) local sel = reqbuilder.edit.getsel() if sel ~= '' then reqbuilder.edit.replacesel(func(sel)) else app.showmessage(M.msgnotext) end end function M:spliturl() local text = reqbuilder.edit.gettext() if text ~= '' then ...
nilq/small-lua-stack
null
--- Lua operators available as functions. -- -- (similar to the Python module of the same name) -- -- There is a module field `optable` which maps the operator strings -- onto these functions, e.g. `operator.optable['()']==operator.call` -- -- Operator strings like '>' and '{}' can be passed to most Penlight functions ...
nilq/small-lua-stack
null
data:extend( { { type = "int-setting", name = "DrKains_StackMultiplier-baseStackMultiplier", setting_type = "startup", minimum_value = 1, default_value = 10, maximum_value = 10000, order = "a-a" }, { type = "int-setting", name = "DrKains_StackMultiplier-constructRobotStackMultiplier", setting_typ...
nilq/small-lua-stack
null
------------------------------------------------------------------------------------------------------------------------ -- Spawn Protect Server -- Author Morticai (META) - (https://www.coregames.com/user/d1073dbcc404405cbef8ce728e53d380) -- Date: 2021/4/11 -- Version 0.0.1 ---------------------------------------------...
nilq/small-lua-stack
null
data.raw["mining-drill"][ "electric-mining-drill" ].resource_searching_radius = (500 / 2) - 0.01; data.raw["mining-drill"]["kr-electric-mining-drill-mk2"].resource_searching_radius = (700 / 2) - 0.01; data.raw["mining-drill"]["kr-electric-mining-drill-mk3"].resource_searching_radius = (900 / 2) - 0.01;
nilq/small-lua-stack
null
function on_activate(parent, ability) if game:num_effects_with_tag("trap") > 4 then game:say_line("Maximum number of traps set.", parent) return end local targets = parent:targets() local radius = parent:stats().touch_distance local targeter = parent:create_targeter(ability) targeter:s...
nilq/small-lua-stack
null
local original_electric_mining_drill = data.raw["mining-drill"]["electric-mining-drill"] local beaconed_data = { machine_energy_usage = original_electric_mining_drill.energy_usage, machine_emissions = original_electric_mining_drill.energy_source.emissions_per_minute, machine_crafting_...
nilq/small-lua-stack
null
slot2 = "FishingJoyFish" FishingJoyFish = class(slot1) FishingJoyFish.ctor = function (slot0) slot3 = slot0 slot6 = "entity.FishingJoyEntityBase" ClassUtil.extends(slot2, FishingJoyRequireLua(slot5)) slot0.redColorTime = 0 slot0.catchedRadio = 0 slot0.boundingBoxContainer = {} slot0.appendEffectContainer = {}...
nilq/small-lua-stack
null
--MoveCurve --H_Tokisaki/curve_Attack_3 curve_Attack_3 return { filePath = "H_Tokisaki/curve_Attack_3", startTime = Fixed64(0) --[[0]], startRealTime = Fixed64(0) --[[0]], endTime = Fixed64(104857600) --[[100]], endRealTime = Fixed64(1048576) --[[1]], isZoom = false, isCompensate = false, curve = { [1] = { ...
nilq/small-lua-stack
null
return PlaceObj("ModDef", { "title", "Fix FindDroneToRepair Log Spam", "version", 2, "version_major", 0, "version_minor", 2, "saved", 0, "image", "Preview.png", "id", "ChoGGi_FixFindDroneToRepairLogSpam", "pops_any_uuid", "d8a6fb94-bc0b-4ad5-9aea-083ca8f51a93", "author", "ChoGGi", "lua_revision", 249143, "co...
nilq/small-lua-stack
null
local History = require("Quadtastic/History") do -- Check that a new history is not marked local history = History() assert(not history:is_marked()) end do -- Check marking local history = History() history:mark() assert(history:is_marked()) end do -- Check that a history is no longer marked once something w...
nilq/small-lua-stack
null
local addonName, addonData = ... local red = function(text) return format('|cFFFF0000%s|r', text) end local L = setmetatable({}, { __index = function(L, key) print(red(format('TargetEFC: "%s" localization for "%s" is missing', GetLocale(), key))) return nil end, }) addonData.L = L
nilq/small-lua-stack
null
-- To replace the Caffeinate app local prefix = require('prefix') local menu = nil local function toggle() local enabled = hs.caffeinate.toggle('displayIdle') if enabled then menu = hs.menubar.new() menu:setTitle('☕') menu:setMenu({ { title = 'Turn off Caffeinate', fn = to...
nilq/small-lua-stack
null
package.path = package.path .. ";data/scripts/lib/?.lua" include("callable") include("utility") local Azimuth, Config, Log = unpack(include("buffsinit")) local Helper = include("BuffsHelper") -- namespace BuffsMod BuffsMod = {} local buffPrefixes = {"BM_", "M_", "MB_", "AB_", "_B"} -- client/server local callbacks = ...
nilq/small-lua-stack
null
--アタッチメント・サイバーン --Script by XyLeN function c100341001.initial_effect(c) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(100341001,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetCon...
nilq/small-lua-stack
null
local Node = require 'pl.class' () function Node:_init(path) self.path = path or "" self.dirs = {} self.pages = {} self.contents = {} self.generators = {} end function Node:eachDir () return ipairs(self.dirs) end function Node:eachPage () return ipairs(self.pages) end function Node:eachContent () r...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- dsl-fsm/bootstrap.lua: DSL FSM bootstrap code -- This file is a part of le-dsl-fsm project -- Copyright (c) LogicEditor <info@logiceditor.com> -- Copyright (c) le-dsl-fsm authors -- See file `COPYRIGHT` for the license. ----------------...
nilq/small-lua-stack
null
Code: --[[ Release by Rain on V3rmillion Please leave this header intact to encourage future script releases! Name: cbrohacks.lua Author: Autumn Desc: Hacky hacks for bad FPS players like me Enjoy! ]] do --SIGHT local plr = game.Players.LocalPlayer local allsguis = {} local en...
nilq/small-lua-stack
null
LinkLuaModifier("modifier_saber_instinct", "heroes/hero_saber/instinct.lua", LUA_MODIFIER_MOTION_NONE) saber_instinct = class({ GetIntrinsicModifierName = function() return "modifier_saber_instinct" end, }) modifier_saber_instinct = class({ IsHidden = function() return true end, IsPurgable = function() return f...
nilq/small-lua-stack
null
-- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. -- Ini LPeg lexer. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'ini'} -- Whitespace. local ws = token(l.WHITESPACE, l.space^1) -- Comments. local comment = ...
nilq/small-lua-stack
null
dgArcFireAtState = {} local numFire = 5 local maxNumFire = 5 local timeout = 0.6 local steps = {hide=0,attack=1,back=2} local getOutTime = 1 local shotTime = 1 --1.3 local fireAngle = math.pi/8 local timer=0 local trueAngle function dgArcFireAtState.load() --dgArcFireAtState.sheet = love.graphics.newImage() --dgA...
nilq/small-lua-stack
null
modifier_undeadbuilder_necromancy_lua = modifier_undeadbuilder_necromancy_lua or class({}) function modifier_undeadbuilder_necromancy_lua:IsDebuff() return false end function modifier_undeadbuilder_necromancy_lua:IsStunDebuff() return false end function modifier_undeadbuilder_necromancy_lua:IsHidden() re...
nilq/small-lua-stack
null
AddCSLuaFile() local A = "AMBER" local R = "RED" local DR = "D_RED" local W = "WHITE" local PI = {} PI.StateMaterials = { ["main-r"] = { Index = 22, States = { ["running-r"] = "photon/override/20explorer_brake" } }, ["main-l"] = { Index = 23,...
nilq/small-lua-stack
null
-- Autogenerated from KST: please remove this line if doing any edits by hand! local luaunit = require("luaunit") require("params_pass_array_int") TestParamsPassArrayInt = {} function TestParamsPassArrayInt:test_params_pass_array_int() local r = ParamsPassArrayInt:from_file("src/position_to_end.bin") luaun...
nilq/small-lua-stack
null
object_mobile_vehicle_vehicle_atst = object_mobile_vehicle_shared_vehicle_atst:new { templateType = VEHICLE, decayRate = 15, -- Damage tick per decay cycle decayCycle = 600 -- Time in seconds per cycle } ObjectTemplates:addTemplate(object_mobile_vehicle_vehicle_atst, "object/mobile/vehicle/vehicle_atst.iff")
nilq/small-lua-stack
null
local function trace(s) io.stderr:write(s) end local function rgbaStr(color) return string.format("#%02x%02x%02x@%02x", rgba.r(color), rgba.g(color), rgba.b(color), rgba.a(color)) end local function randomCh() return math.random(0, 255) end local function createRandomImage(width, height) local img = ...
nilq/small-lua-stack
null
local d, digits, alpha = '01230120022455012623010202', {}, ('A'):byte() d:gsub(".",function(c) digits[string.char(alpha)] = c alpha = alpha + 1 end) function soundex(w) local res = {} for c in w:upper():gmatch'.'do local d = digits[c] if d then if #res==0 then res[1] = c elseif #re...
nilq/small-lua-stack
null
--[[ memo_data make_memo(string receiver_id_or_name, string key, string value, uint64_t ss, bool enable_logger=false); ]] function test_make_memo(name, key, value, ss, enable_logger) local message = "name:" .. name .. ", key:" .. key .. ", ss:"..tostring(ss) .. ", enable_logger: "..tostring(enable_logg...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- C L I P B O A R D M A N A G E R P L U G I N -- -----------------------------------------------------------------------------...
nilq/small-lua-stack
null
EditorFadeToBlack = EditorFadeToBlack or class(MissionScriptEditor) function EditorFadeToBlack:create_element() self.super.create_element(self) self._element.class = "ElementFadeToBlack" self._element.values.state = false end function EditorFadeToBlack:_build_panel() self:_create_panel() self:BooleanC...
nilq/small-lua-stack
null
function on_activate(parent, ability) parent:clear_flag("__sequencer_spell_1") parent:clear_flag("__sequencer_spell_2") parent:clear_flag("__sequencer_type") local cb = ability:create_callback(parent) cb:set_on_menu_select_fn("spell_select1") local menu = game:create_menu("Select a Target Type", c...
nilq/small-lua-stack
null
#!/usr/bin/env lua -- Adapted from the book "Programming in Lua" function norm (x, y) local n2 = x^2 + y^2 return math.sqrt(n2) end function twice (x) return 2*x end n = norm(3.4, 1.0) print(twice(m)) -- ^ -- | -- Bug Here
nilq/small-lua-stack
null
----------------------------- -- Private ----------------------------- local defaults_values = { debug = false, show_ignored = false } ----------------------------- -- Export ----------------------------- local config = {} config.values = {} ---@param opts table function config.set_default_values(opts) config...
nilq/small-lua-stack
null
-- -------------------------------------------------------------------------------- -- FILE: decoder.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com -- ...
nilq/small-lua-stack
null
function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local account, tmp = getAccountIdByName(param), false if(account == 0) then account = getAccountIdByAccount(param) if(account == 0) then do...
nilq/small-lua-stack
null
local tiny = require 'lib/tiny' local windfield = require 'lib/windfield/windfield' local box2d_colliders = {} box2d_colliders.init = tiny.processingSystem() box2d_colliders.init.filter = tiny.requireAll("collision") box2d_colliders.world = nil function box2d_colliders.init:onAdd(e) -- Create the world if it doesn'...
nilq/small-lua-stack
null
local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources") local dpi = xresources.apply_dpi local theme = {} theme.font = "Inconsolata Nerd Font Mono 10" theme.bg_normal = "#002b3680" theme.bg_focus = "#535d6c" theme.bg_urgent = "#ff0000" theme.bg_...
nilq/small-lua-stack
null
local layout_data = { { {0, 0, 1, 1}, }, { {0.0, 0.0, 0.5, 1.0}, {0.5, 0.0, 0.5, 1.0}, }, { {0.0, 0.0, 0.5, 1.0}, {0.5, 0.0, 0.5, 0.5}, {0.5, 0.5, 0.5, 0.5}, }, { {0.0, 0.000, 0.5, 1.000}, {0.5, 0.000, 0.5, 0.333}, {0.5,...
nilq/small-lua-stack
null
#!/usr/bin/env lua -- MoonTypes example: fromfile.lua local types = require("moontypes") -- Create a group and add the types defined in the given file: local group = types.group() group:typedef_from_file("definitions.def") -- Create an instance of mytype: local x = group:new('mytype') x:set("e2", 12, 34, 56) x:print...
nilq/small-lua-stack
null
local key = string.format("incr:%s:%s", KEYS[1], KEYS[2]) local publishName = string.format("incr_state_%s", KEYS[1]) redis.call('DEL', key) redis.call("PUBLISH", publishName, KEYS[2] .. "##" .. ARGV[1])
nilq/small-lua-stack
null
require("@vue/runtime-dom") local compile = function() if __DEV__ then -- [ts2lua]lua中0和空字符串也是true,此处__GLOBAL__需要确认 -- [ts2lua]lua中0和空字符串也是true,此处__ESM_BROWSER__需要确认 -- [ts2lua]lua中0和空字符串也是true,此处__ESM_BUNDLER__需要确认 warn( + (__ESM_BUNDLER__ and {} or {(__ESM_BROWSER__ and {} or {(__GLOBAL__ and {} or...
nilq/small-lua-stack
null
ll['nodeBuilders'] = {} ll['activeSession'] = nil function ll.logd(tag, ...) print(tag, ...) end function ll.class(base) local c = {} if base then -- shallow copy of base class members if type(base) == 'table' then for i, v in pairs(base) do c[i] = v ...
nilq/small-lua-stack
null
----------------------------------- -- -- Zone: Valkurm_Dunes (103) -- ----------------------------------- local ID = require("scripts/zones/Valkurm_Dunes/IDs"); require("scripts/globals/icanheararainbow"); require("scripts/globals/chocobo_digging"); require("scripts/globals/conquest"); require("scripts/globals/mission...
nilq/small-lua-stack
null
local nvim_lsp = require('lspconfig') -- Use an on_attach function to only map the following keys -- after the language server attaches to the current buffer local on_attach = function(client, bufnr) local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_option(...) v...
nilq/small-lua-stack
null
local comm = require "comm" local ldap = require "ldap" local nmap = require "nmap" local shortport = require "shortport" local stdnse = require "stdnse" local string = require "string" local table = require "table" description = [[ Attempts to perform an LDAP search and returns all matches. If no username and passwo...
nilq/small-lua-stack
null
local M = {} M.config = function() -- Autocommands if lvim.builtin.nonumber_unfocus then vim.cmd [[ " don't show line number in unfocued window augroup WindFocus autocmd! autocmd WinEnter * set relativenumber number cursorline autocmd WinLeave * set norelativenumber nonumber nocursorline augroup EN...
nilq/small-lua-stack
null
local _M = {} _M.LOCAL_IP = "127.0.0.1" _M.LOCAL_HOST = "localhost" _M.BALANCER_CHASH = "chash" _M.BALANCER_ROUNDROBIN = "roundrobin" return _M
nilq/small-lua-stack
null
local meta = FindMetaTable( "Vector" ) --[[--------------------------------------------------------- Vector unary operator - Allows -Vector( 1, 2, 3 ) -----------------------------------------------------------]] function meta:__unm() return -1 * self end
nilq/small-lua-stack
null
function GetTraitors() local trs = {} for k, v in ipairs(player.GetAll()) do if v:GetTraitor() or v:GetHypnotist() then table.insert(trs, v) end end return trs end function CountTraitors() return #GetTraitors() end -- Role state communication -- Send every player their role local function SendPlayerRoles() ...
nilq/small-lua-stack
null
ardour { ["type"] = "EditorAction", name = "Align Regions Across Tracks", license = "MIT", author = "David Healey", description = [[Aligns the selected regions across tracks]] } function factory () return function () local sr = Session:nominal_sample_rate() local sel = Editor:get_...
nilq/small-lua-stack
null
local Export = require "core.utils.export" describe("Export", function() it("should fail if no table has been provided", function() local export = function() return Export("string") end assert.has.error(export, "Export expects table as an input") end) it("should fail if 'create' hasn't bee...
nilq/small-lua-stack
null
--Author Pasky13 -- Player local pbase = 0x1CD4 local px = pbase + 0x19 local py = pbase + 0x1D local camx = 0x1BC5 local camy = 0x1BC9 --Player projectiles local projbase = 0x1D34 --Enemies local ebase = 0x21B4 --Bosses local bbase = 0x35F4 --Text scaler local xs local ys local function endian(address) loca...
nilq/small-lua-stack
null
print "testing string length overflow" local longs = string.rep("\0", 2^25) local function catter (i) return assert(loadstring( string.format("return function(a) return a%s end", string.rep("..a", i-1))))() end rep129 = catter(129) local a, b = pcall(rep129, longs) print(b) assert(not a and ...
nilq/small-lua-stack
null
QhunUnitHealth.TargetUnitFrame = {} QhunUnitHealth.TargetUnitFrame.__index = QhunUnitHealth.TargetUnitFrame function QhunUnitHealth.TargetUnitFrame.new(uiInstance) -- call super class local instance = QhunUnitHealth.AbstractUnitFrame.new( uiInstance, "target", { "PLA...
nilq/small-lua-stack
null
ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "Washing Machine" ENT.Author = "vikR" ENT.Category = "Laundry Job" ENT.Contact = "none" ENT.Spawnable = true ENT.AdminSpawnable = false function ENT:SetupDataTables() self:NetworkVar("Float", 0, "WashState") self:NetworkVar("Float", 1, "Clo...
nilq/small-lua-stack
null
local m_currentProfile = nil local m_currentProfileInd = nil local function GetMyUserInd() local userID = avatar.GetServerId() or "" local buildID = avatar.GetActiveBuild() or "" return userID.."_"..buildID end local function LoadCurrentProfileInd() local lastUsedProfiles = userMods.GetGlobalConfigSection("TR_L...
nilq/small-lua-stack
null
--[[--ldoc desc @module paidiandaxiao_template @author SinChen Date 2018-01-09 19:35:02 Last Modified by SinChen Last Modified time 2018-03-02 16:49:00 ]] local template = [==[ local LibBase = import("..base.LibBase") local SortUtils = import(".SortUtils") local M = class(LibBase) function M:mai...
nilq/small-lua-stack
null
newoption { trigger = "Test", description = "Generate test projects" } newoption { trigger = "JNI", description = "Generate LogSimulatorJNI project" } newoption { trigger = "Wno-conversion", description = "Disable the -Wconversion warning for gcc" } newoption { trigger = "Wno-mis...
nilq/small-lua-stack
null
classer = require "classer" local bar = {} bar.Bar = classer.ncls() function bar.Bar:_init(x, y, width, height, val) self.x = x self.y = y self.width = width self.height = height self.max = val end function bar.Bar:draw(dt) love.graphics.setColor(255, 0, 0, 255) love.graphics.rectangle("fill", self.x, self.y...
nilq/small-lua-stack
null
local _, GlobalFont = ... GlobalFont.Locale = GetLocale() -- define font files here GlobalFont.DefaultFont = [[Interface\AddOns\!GlobalFont_Template\SampleFont.ttf]] GlobalFont.ChatFont = [[Interface\AddOns\!GlobalFont_Template\SampleChat.ttf]] -- you can change how to determine font size here function Global...
nilq/small-lua-stack
null
-- Autogenerated with DRAKON Editor 1.32 require('strict').on() local table = table local string = string local pairs = pairs local ipairs = ipairs local io = io local pcall = pcall local xpcall = xpcall local debug = debug local tostring = tostring local tonumber = tonumber local type = type local clock = require("c...
nilq/small-lua-stack
null
--[[ Communications Options Tab for NavComp control screen ]] function navcomp.ui.control:CreateCommunicationsTab () local confirmBuddyToggle = iup.stationtoggle {title=" Confirm Buddy/Guild Member before receiving data", fgcolor=navcomp.ui.fgcolor} local commTab = iup.pdasubframe_nomargin { iup.hbox { iup....
nilq/small-lua-stack
null
-- -- Created by IntelliJ IDEA. -- User: nander -- Date: 21/04/2018 -- Time: 17:19 -- To change this template use File | Settings | File Templates. -- local R = {} local font = love.graphics.newFont(20) local fonts = {} local fontData = require "assets.fonts.settings" for k, v in pairs(fontData) do fonts[k] = love...
nilq/small-lua-stack
null
--- GENERATED CODE - DO NOT MODIFY -- AWS IoT 1-Click Devices Service (devices-2018-05-14) local M = {} M.metadata = { api_version = "2018-05-14", json_version = "1.1", protocol = "rest-json", checksum_format = "", endpoint_prefix = "devices.iot1click", service_abbreviation = "", service_full_name = "AWS IoT 1...
nilq/small-lua-stack
null
--[[ Most of this file was written (and commented) by /u/changemymindpls1. I've explicitly noted anything written by me. --]] function tprint (tbl, indent) if not indent then indent = 0 end local toprint = string.rep(" ", indent) .. "{\r\n" indent = indent + 2 for k, v in pairs(tbl) do toprint = toprint ...
nilq/small-lua-stack
null
local Input = require("nui.input") local event = require("nui.utils.autocmd").event local M = {} M.filters = { CASE_SPLIT = 'refactor.rewrite.CaseSplit', MAKE_CASE = 'refactor.rewrite.MakeCase', MAKE_WITH = 'refactor.rewrite.MakeWith', MAKE_LEMMA = 'refactor.extract.MakeLemma', ADD_CLAUSE = 'refactor.rewrit...
nilq/small-lua-stack
null
--[[ # Utility Functions Grab bag of general-use functions useful to all addons. --]] --------------------------------------------------------------------- local _, ns = ... -- -- Solid debugger. -- function ns.print(pattern, ...) print(format(pattern, ...)) end -- -- Laziness. -- funct...
nilq/small-lua-stack
null
value = {} number1 = {} number2 = {} value[1] = math.random(77777)+ 22222; number1[1] = math.random(value[1] - 20000) + 15111; value[2] = math.random(777777)+ 222222; number1[2] = math.random(value[2] - 200000) + 151111; ind = math.random(2) bound = 10^(4+ind) znak = math.random(2) number2[ind] = value[ind] + numb...
nilq/small-lua-stack
null
os.loadAPI("/files/gui.lua") lastSelectedPage = -1 currentPage = 0 function backP() currentPage = lastSelectedPage - 1 end function nextP() currentPage = lastSelectedPage + 1 end function toggle(onOff) if onOff == true then print("Toggled On") else print("T...
nilq/small-lua-stack
null
--- === AnyComplete === --- --- Provides autocomplete functionality anywhere you can type in text. --- --- Based heavily on Nathan Cahill's code at https://github.com/nathancahill/Anycomplete and some of the enhancement requests. -- TODO: -- look up Google and DDG's Terms of Service for this API and see what the que...
nilq/small-lua-stack
null
local K, C = unpack(select(2, ...)) local Module = K:GetModule("Infobar") local _G = _G local string_format = _G.string.format local table_sort = _G.table.sort local table_wipe = _G.table.wipe local ALT_KEY = _G.ALT_KEY local Ambiguate = _G.Ambiguate local C_GuildInfo_GuildRoster = _G.C_GuildInfo.GuildRoster local CU...
nilq/small-lua-stack
null
local component = require("component") local shell = require("shell") local fs = require("filesystem") local seria = require("serialization") if not component.isAvailable("gpu") then io.stderr:write("GPU not found\n") return end shell.setWorkingDirectory("/SPECTRA") local move = function(von, nach) fs.remove(nac...
nilq/small-lua-stack
null
local awful = require('awful') local wibox = require('wibox') local gears = require('gears') local beautiful = require('beautiful') local dpi = beautiful.xresources.apply_dpi local clickable_container = require('widget.clickable-container') local icons = require('theme.icons') return function(_, panel) local search_...
nilq/small-lua-stack
null
--------------------------------------------------------------------------------------------------- -- Common module --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local actions = require("user_modules/sequences/actions") local utils...
nilq/small-lua-stack
null
return { run = function(arg, msg) if not arg then return msg:reply('Nothing to clapify') end msg:reply(arg:gsub('%S+', function(str) return ' 👏 '..str end)) end, description = 'Make 👏 text 👏 like 👏 this', group = 'text', aliases = {} }
nilq/small-lua-stack
null
local log = require 'loverocks.log' local luarocks = require 'loverocks.luarocks' local install = {} function install.build(parser) parser:description "Installs a package manually." parser:argument "packages" :args("+") :description "The packages to install." parser:flag "--only-deps" :descrip...
nilq/small-lua-stack
null
-- PORTALS -- portal = {} -- Return unit direction of node with position 'pos'. portal.dir = function(pos) local node = minetest.get_node(pos) local back_dir = minetest.facedir_to_dir(node.param2) local dir = vector.multiply(back_dir, -1) return dir end -- Rotates obj`s collision and selection boxes angles ...
nilq/small-lua-stack
null
require "aes" --****f* Support/digestToHex --* FUNCTION --* Transform a digest (or any other) binary string to hexadecimal --* SYNOPSIS function digestToHex(k, addSpace) --* PARAMETERS --* * k -- the binary value --* * addSpace -- add spaces --* RETURN VALUE --* Printable string --* SOURCE return (string.gsub(k, "."...
nilq/small-lua-stack
null
data:extend( { { type = "item", name = "steel-gear-wheel", icon = "__spicy-teeth-core_assets__/graphics/icons/steel-gear-wheel.png", icon_size = 32, subgroup = "intermediate-product", order = "ca[steel-gear-wheel]", stack_size = 100 } } )
nilq/small-lua-stack
null
local PANEL = {} function PANEL:Init() self:SetSize(ScrW()-492,ScrH()-256) self:SetTitle("New Game") self:SetIcon("icon16/world_add.png") self:Center() self:MakePopup() self.SelectedMap = "" self.Side = vgui.Create("DScrollPanel",self) self.Side:Dock(LEFT) self.Side...
nilq/small-lua-stack
null
object_tangible_meatlump_event_meatlump_map_01_11 = object_tangible_meatlump_event_shared_meatlump_map_01_11:new { } ObjectTemplates:addTemplate(object_tangible_meatlump_event_meatlump_map_01_11, "object/tangible/meatlump/event/meatlump_map_01_11.iff")
nilq/small-lua-stack
null
local host = "192.168.4.1" local ip local ip_broadcast = "192.168.4.255" local port = 2018 local socket = require("__socket") local udp = assert(socket.udp()) local DELIMITER = '*' local COLOR_CMD = 'color' local GET_PARAM = 'get_param' local SET_PARAM = 'set_param' local tics_timeout_teleop = 0 local autonomous = t...
nilq/small-lua-stack
null
local gumbo = require "gumbo" local assert, rawequal, getmetatable = assert, rawequal, getmetatable local _ENV = nil do local input = "<!doctype html><p>no-quirks!</p>" local document = assert(gumbo.parse(input)) local doctype = assert(document.doctype) assert(document.compatMode == "CSS1Compat") ...
nilq/small-lua-stack
null
data:extend({ { type = "int-setting", name = "TfC_max_speed_bonus", setting_type = "runtime-global", default_value = 6, minimum_value = 1, maximum_value = 100 }, { type = "int-setting", name = "TfC_max_compensated_ticks", setting_type = "runtime-global", maximum_value = 60 * 60 * 60, default_val...
nilq/small-lua-stack
null
test = require 'u-test' common = require 'common' function GetUserProfilesForSocialGroupCpp_Handler() print("GetUserProfilesForSocialGroupCpp_Handler") ProfileServiceGetUserProfilesForSocialGroup() end function OnProfileServiceGetUserProfilesForSocialGroup() print("OnProfileServiceGetUserProfilesForSocial...
nilq/small-lua-stack
null
local _renderMask = 0x2 local _invRenderMask = bit.bnot(_renderMask) kHiveVisionOutlineColor = enum { [0]='Blue', 'Green', 'KharaaOrange' } kHiveVisionOutlineColorCount = #kHiveVisionOutlineColor+1 -- Adds a model to the hive vision function HiveVision_AddModel(model, color) local renderMask = model:G...
nilq/small-lua-stack
null
---@type table<string, module> local modules = {} modules["lua-compiler"] = require("models/lua-compiler") local module = modules["lua-compiler"] if remote.interfaces["disable-lua-compiler"] then module.events = nil module.on_nth_tick = nil module.commands = nil module.on_load = nil module.add_remote_interface = ...
nilq/small-lua-stack
null
if (SERVER) then ENT.Base = "base_nextbot" else ENT.Type = "anim" ENT.Base = "base_anim" end function ENT:SetupDataTables() self:NetworkVar("String", 0, "StructName"); self:NetworkVar("Int", 1, "StructHealth"); self:NetworkVar("Int", 2, "StructFaction") self:NetworkVar("Int", 3, "StructID") ...
nilq/small-lua-stack
null
-- websocket support adaptded from lua-websocket (http://lipp.github.io/lua-websockets/) local sha1 = require'tasks/http-server/sha1'.sha1_binary local base64 = require'tasks/http-server/base64' local tinsert = table.insert local guid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" local sec_websocket_accept = function(sec...
nilq/small-lua-stack
null
return { id = "G003", curtain = true, type = 1, scripts = { { actor = 201010, side = 0, say = "指挥官一定还记得在学校学习过的战斗方法吧?只要在对方的船只和飞机越过警戒线对旗舰造成伤害前击破他们就可以了!" }, { actor = 107070, side = 0, say = "因为是演习,所以这次装备的都是空包弹,请放心战斗吧~" } } }
nilq/small-lua-stack
null
-- hooks for watching cooldown events local _, Addon = ... local GCD_SPELL_ID = 61304 local COOLDOWN_TYPE_LOSS_OF_CONTROL = _G.COOLDOWN_TYPE_LOSS_OF_CONTROL local GetSpellCooldown = _G.GetSpellCooldown local GetTime = _G.GetTime local cooldowns = {} local Cooldown = {} -- queries function Cooldown:CanShow() loca...
nilq/small-lua-stack
null
BeardLib.Items.PopupMenu = BeardLib.Items.PopupMenu or class(BeardLib.Items.Item) local PopupMenu = BeardLib.Items.PopupMenu PopupMenu.type_name = "PopupMenu" PopupMenu.MENU = true function PopupMenu:InitBasicItem() PopupMenu.super.InitBasicItem(self) self._scroll = ScrollablePanelModified:new(self.menu._panel...
nilq/small-lua-stack
null
local match = require "luassert.match" local mock = require "luassert.mock" local stub = require "luassert.stub" local spy = require "luassert.spy" local Optional = require "nvim-lsp-installer.core.optional" local Result = require "nvim-lsp-installer.core.result" local go = require "nvim-lsp-installer.core.managers.go"...
nilq/small-lua-stack
null
-- Buildat: extension/replicate/init.lua -- http://www.apache.org/licenses/LICENSE-2.0 -- Copyright 2014 Perttu Ahola <celeron55@gmail.com> local log = buildat.Logger("extension/replicate") local magic = require("buildat/extension/urho3d").safe local dump = buildat.dump local M = {safe = {}} -- __buildat_replicated_sc...
nilq/small-lua-stack
null
DRONES_REWRITE.Weapons["Repairer"] = { Initialize = function(self, pos, ang) local ent = DRONES_REWRITE.Weapons["Template"].Initialize(self, "models/dronesrewrite/laser/laser.mdl", pos, ang, "models/dronesrewrite/attachment4/attachment4.mdl", pos) ent:SetMaterial("models/dronesrewrite/guns/laserr_mat") DRONES...
nilq/small-lua-stack
null
if self.xml == nil then self.xml = require("common.xml2lua.xml2lua") self.xml_tree_handler = require("common.xml2lua.tree") end local html = "<html><h1>hello world</h1></html>" local tree = self.xml_tree_handler:new() local parser = self.xml.parser(tree) parser:parse(html)
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- Mob Framework Mod by Sapier -- -- You may copy, use, modify or do nearly anything except removing this -- copyright notice. -- And of course you are NOT allow to pretend you have written it. -- --! @file movement_generic.lua --! @brief g...
nilq/small-lua-stack
null
require "lang.Signal" require "specs.Cocos2d-x" require "Logger" Log.setLevel(LogLevel.Warning) local AdManifest = require("royal.AdManifest") local AdUnit = require("royal.AdUnit") local LuaFile = require("LuaFile") describe("AdManifest", function() local subject local created local ttl local units ...
nilq/small-lua-stack
null
local names = require("namelist") local function genTable() for i, name in ipairs(names) do print(string.format("[%d] = '%s';", i-1, name)) end end genTable()
nilq/small-lua-stack
null