content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
local util = require "lspconfig.util" local servers = require "nvim-lsp-installer.servers" local middleware = require "nvim-lsp-installer.middleware" describe("middleware", function() local server before_each(function() -- 1. setup dummy server local default_options = { cmd = { "dum...
nilq/small-lua-stack
null
-- x86 specific code local arch = {} -- x86 register names arch.REG = { GS = 0, FS = 1, ES = 2, DS = 3, EDI = 4, ESI = 5, EBP = 6, ESP = 7, EBX = 8, EDX = 9, ECX = 10, EAX = 11, TRAPNO = 12, ERR ...
nilq/small-lua-stack
null
--- === hs.notify === --- --- On-screen notifications using Notification Center --- --- This module is based in part on code from the previous incarnation of Mjolnir by [Steven Degutis](https://github.com/sdegutis/). local module = require("hs.notify.internal") -- private variables and methods -----------------------...
nilq/small-lua-stack
null
local _timer = {} function _timer:new(trigger, func) local timer = {} timer.count = 0 timer.started = false timer.trigger = trigger timer.triggered = false timer.func = func function timer:start() self.started = true return self end function timer:stop() self.started = false return...
nilq/small-lua-stack
null
-- trim 去除字符串前后的空白字符 local function trim(s) s = string.match(s, "^%s*(%S.*)") s = s and string.match(s, "(.*%S)%s*$") or "" -- 如果全是空白字符,则不会运行这个match return s end local function split(s, p) local t = {} if s == "" or p == "" then return t end local pt = string.format("[^%s]+", ...
nilq/small-lua-stack
null
local ffi = require 'ffi' ffi.cdef[[ char *strerror(int errnum); int epoll_create1(int flags); typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data v...
nilq/small-lua-stack
null
local currentPath = debug.getinfo(1, 'S').source:sub(2) local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '') rootPath = rootPath == '' and '.' or rootPath loadfile(rootPath .. '/platform.lua')('script') package.path = package.path .. ';' .. rootPath .. '/test/?.lua' .. ';' .. rootPath .. '/test/?/init.l...
nilq/small-lua-stack
null
function Omrogg(Unit, event, miscUnit, misc) Unit:RegisterEvent("Omrogg_Fear", 10000, 0) Unit:RegisterEvent("Omrogg_Thunderclap", 15000, 0) Unit:RegisterEvent("Omrogg_Blast_Wave", 21000, 0) Unit:RegisterEvent("Omrogg_Aggro_Switch", 25000, 0) end function Omrogg_Fear(Unit, event, miscUnit, misc) Unit:FullCastSpell...
nilq/small-lua-stack
null
--------------------------------------------------- -- Spinning Dive -- Leviathan delivers a single-hit attack on target. --------------------------------------------------- require("scripts/globals/settings") require("scripts/globals/status") require("scripts/globals/monstertpmoves") --------------------------------...
nilq/small-lua-stack
null
AutomaticTrainDeployment_defines = {} AutomaticTrainDeployment_defines.names = { entities = { deleteStop = "AutomaticTrainDeployment-delete-stop", readStop = "AutomaticTrainDeployment-read-stop", copyStop = "AutomaticTrainDeployment-copy-stop", randomStop = "AutomaticTrainDeployment-random-stop" ...
nilq/small-lua-stack
null
class 'FreeCamManager' function FreeCamManager:__init() Network:Subscribe("FreeCamTP", self, self.TeleportPlayer) -- Set default permissions from whitelist Events:Subscribe("ModuleLoad", self, self.SendPermissionAll) Events:Subscribe("ModulesLoad", self, self.SendPermissionAll) Events:Subscribe("PlayerJo...
nilq/small-lua-stack
null
-- Mite's specification -- (c) Reuben Thomas 2001 -- Operand types -- * The table is a list of types -- * Encoding is given by list position (e.g. r = 0x1) -- * Each type has two fields: Type = Object {_init = { "name", -- as in the assembly language "desc", -- description }} opType = { Type {"r", "i...
nilq/small-lua-stack
null
local nodes = require("go.ts.nodes") local log = require("go.utils").log local warn = require("go.utils").warn M = { -- query_struct = "(type_spec name:(type_identifier) @definition.struct type: (struct_type))", query_package = "(package_clause (package_identifier)@package.name)@package.clause", query_struct_id...
nilq/small-lua-stack
null
-- Copyright (C) idevz (idevz.org) local _M = {} function _M.ini(write, name, t) local contents = "" for section, s in pairs(t) do contents = contents .. ("[%s]\n"):format(section) for key, value in pairs(s) do contents = contents .. ("%s=%s\n"):format(key, tostring(value)) ...
nilq/small-lua-stack
null
local kata = {} function kata.runningAverage() N = 0 Average = 0 return function(x) Nold = N N = N + 1 Average = Average * (Nold/N) + x/N return math.floor(Average*100+0.5)/100 end end return kata
nilq/small-lua-stack
null
local _, Addon = ... local Bags = Addon.Bags local Chat = Addon.Chat local Dejunker = Addon.Dejunker local Destroyer = Addon.Destroyer local ERROR_CAPS = _G.ERROR_CAPS local Filters = Addon.Filters local L = Addon.Libs.L local Utils = Addon.Utils local concat = table.concat -- Filter arrays Filters[Dejunker] = {} Filt...
nilq/small-lua-stack
null
local ffi = require("cffi") -- strings are convertible to char pointers local foo = "hello world" local foop = ffi.cast("const char *", foo) assert(ffi.string(foop) == "hello world") -- pointer<->number conversions local up = ffi.cast("uintptr_t", foop) local op = ffi.cast("const char *", up) assert(ffi.string(op...
nilq/small-lua-stack
null
local L = require('signal').L local MultiInput = { init = function(obj, parent) obj.parent = parent obj.signal = L obj.connections = {} end, connect = function(self, output) if self.connections[output] then return end self.connections[output] = true if output.connect then ...
nilq/small-lua-stack
null
local jit = require('jit') print(jit.os .. '-' .. jit.arch)
nilq/small-lua-stack
null
local setmetatable = setmetatable local print = print local ipairs = ipairs local button = require( "awful.button" ) local tag = require( "awful.tag" ) local util = require( "awful.util" ) -- local shifty = require( "shifty" ) local beautiful = require( "beautiful" ) local ...
nilq/small-lua-stack
null
local Env = require("api.Env") data:add_type { name = "item_ex_mapping", fields = { { name = "item_id", type = types.data_id("base.item"), template = true, }, { name = "chip_id", type = types.optional(types.data_id("base.chip")), template = ...
nilq/small-lua-stack
null
AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include("shared.lua") function ENT:TableOfProps() local stand1 = ents.Create( "prop_physics" ) stand1:SetModel( "models/props_c17/playground_teetertoter_stan.mdl" ) stand1:SetPos( self:LocalToWorld( Vector( 0, -15, 5 ) ) ) stand1:SetAngles( self:LocalTo...
nilq/small-lua-stack
null
local rules = require "scripts.rules" local Character = { control = {}, data = {}, name = "", type = "", talked = false, } function Character:new(o, control) o = o or {} setmetatable(o, self) self.__index = self self.control = control return o end function Character:create() self.data.skin = se...
nilq/small-lua-stack
null
return { {id = 1, name = 'chat'}, }
nilq/small-lua-stack
null
-- Copyright 2021 SmartThings -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in ...
nilq/small-lua-stack
null
if SERVER then include("disablesound/init.lua") end
nilq/small-lua-stack
null
local t = Def.ActorFrame{ LoadActor("newbar") .. { InitCommand=cmd(halign,1;valign,1;x,SCREEN_RIGHT;y,SCREEN_BOTTOM-18;draworder,40;zoom,1); }; }; t[#t+1] = Def.ActorFrame{ LoadActor("base")..{ InitCommand=cmd(halign,0;valign,0;xy,SCREEN_LEFT,SCREEN_TOP); }; LoadActor("text")..{ InitCommand=cmd(h...
nilq/small-lua-stack
null
object_intangible_vehicle_speeder_ric_920_pcd = object_intangible_vehicle_shared_speeder_ric_920_pcd:new { } ObjectTemplates:addTemplate(object_intangible_vehicle_speeder_ric_920_pcd, "object/intangible/vehicle/speeder_ric_920_pcd.iff")
nilq/small-lua-stack
null
local map = vim.api.nvim_set_keymap vim.api.nvim_exec([[ augroup Format autocmd! autocmd BufWritePost * FormatWrite augroup END ]], true) map('n', '<silent> <leader>f', ':Format<CR>', { noremap = true }) require "format".setup { ["*"] = { {cmd = {"sed -i 's/[ \t]*$//'"}} -- remove traili...
nilq/small-lua-stack
null
local arc_demo = {} function arc_demo.demo() local arc = lvgl.arc_create(lvgl.scr_act(), nil) lvgl.arc_set_end_angle(arc, 200) lvgl.obj_set_size(arc, 150, 150) lvgl.obj_align(arc, nil, lvgl.ALIGN_CENTER, 0, 0) end return arc_demo
nilq/small-lua-stack
null
local default_settings = { volume = 100, -- max game_speed = 3, -- normal start_stage = 1, -- first max_unlocked_dungeon = 1, -- just the first ###not implemented draw_crosshairs_always = false, gfx_mode = 'windowed', window_width = window.w, window_height = window.h, -- stage_upgrades : defaults...
nilq/small-lua-stack
null
--[[C'mere I'll make it all stop My show now, Keyblade master! Who am I? Oh, my name's Axel. Got it memorized?]]-- Player = game:GetService("Players").LocalPlayer Character = Player.Character PlayerGui = Player.PlayerGui Backpack = Player.Backpack Torso = Character.Torso Head = Character.Head Left...
nilq/small-lua-stack
null
if redis.call("get",KEYS[1])==ARGV[1] then return redis.call("expire",KEYS[1],ARGV[2]) else return 0 end
nilq/small-lua-stack
null
local st = require "util.stanza"; local blacklist = module:get_option_inherited_set("s2s_blacklist", {}); module:hook("route/remote", function (event) if blacklist:contains(event.to_host) then if event.stanza.attr.type ~= "error" then module:send(st.error_reply(event.stanza, "cancel", "not-allowed", "Communicat...
nilq/small-lua-stack
null
-- Test.lua -- Usage: lua test.lua -v (runs all tests) -- This file combines all test files and initiates lua unit. -- You can run all tests, or pass the name of the test you want to run as -- a command line arguement. ex: lua test.lua TestAssignment -v require("testAssignment") require("testCoreOps") require("testEx...
nilq/small-lua-stack
null
common_io_validation.validate_instance_numbers("iot_timer")
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) RegisterServerEvent('mp:xiaomi') AddEventHandler('mp:xiaomi', function() local player = ESX.GetPlayerFromId(source) if player then local item = player.getInventoryItem('ticket_xiaomi') if item.count >= 1 then TriggerClientEvent('esx...
nilq/small-lua-stack
null
----------------------------------- -- Area: Xarcabard -- NPC: qm5 (???) -- Involved in Quests: Breaking Barriers -- !pos 179 -33 82 112 ----------------------------------- local ID = require("scripts/zones/Xarcabard/IDs") require("scripts/globals/keyitems") require("scripts/globals/missions") ------------------------...
nilq/small-lua-stack
null
-- See if current link is of the format {{youtube:XXXXXXXXXXX}} function youtube_link_bool(inputstr) if inputstr == nil then return false end md_string = string.match(inputstr, "{{".."youtube:".."...........".."}}") if md_string == nil then return false else return true e...
nilq/small-lua-stack
null
function debugMode() --[===[ Upd: Doesn't work How to get X to put a variable on it: To get an amount of pixel per 1 letter you need to 1 * 0.75 * 10 Colons are half a pixel So for example: If I want to print "Speed:" I need to do the following "Speed:" has 5 letters and 1 colon ...
nilq/small-lua-stack
null
if UseItem(174) == true then goto label0 end; do return end; ::label0:: if JudgeMoney(10) == true then goto label1 end; Talk(106, "客倌,你别开玩笑了,烧刀子一壶可是要10两银子的!", "talkname106", 0); do return end; ::label1:: AddItem(174, -10); Talk(106, "客倌,你慢用,", "talkname106", 0); GetItem(1...
nilq/small-lua-stack
null
raceDroidConvoTemplate = ConvoTemplate:new { initialScreen = "", templateType = "Lua", luaClassHandler = "raceDroidConvoHandler", screens = {} } intro = ConvoScreen:new { id = "intro", leftDialog = "@conversation/event_perk_racing:s_ac51e630", -- Greetings, I'm the coordinator for this course. If you'd like to r...
nilq/small-lua-stack
null
include('shared.lua') ENT.RenderGroup = RENDERGROUP_BOTH function ENT:Draw() self.BaseClass.Draw(self) Wire_DrawTracerBeam( self, 1 ) end
nilq/small-lua-stack
null
class("DaofengPTPage", import(".TemplatePage.PtTemplatePage")).OnUpdateFlush = function (slot0) slot0.super.OnUpdateFlush(slot0) slot7, slot8, slot3 = slot0.ptData:GetResProgress() setText(slot0.progress, setColorStr(slot1, "#915167") .. "/" .. slot2) LoadImageSpriteAsync(pg.item_data_statistics[id2ItemId(slot4)]...
nilq/small-lua-stack
null
package.path = 'D:/Program Files (x86)/HTTPD/htdocs/TrainMobileFile/LuaCode/lib/?.lua;D:/Program Files (x86)/HTTPD/htdocs/TrainMobileFile/LuaCode/skynet/?.lua' local fs = require 'file_system' local jt = require 'json_tool' local lib_path = fs.getBaseLibFilePath() local db_path = fs.getBaseDataFilePath() local ip_path ...
nilq/small-lua-stack
null
local PlanarLayout = {} require("pgf.gd.planar").PlanarLayout = PlanarLayout -- imports local Coordinate = require "pgf.gd.model.Coordinate" local Storage = require "pgf.gd.lib.Storage" local BoyerMyrvold = require "pgf.gd.planar.BoyerMyrvold2004" local ShiftMethod = require "pgf.gd.planar.ShiftMethod" local Embeddi...
nilq/small-lua-stack
null
--[[ Name: "sh_zip_tie.lua". Product: "HL2 RP". --]] local ITEM = {}; -- Set some information. ITEM.name = "Zip Tie"; ITEM.cost = 5; ITEM.model = "models/items/crossbowrounds.mdl"; ITEM.weight = 0.2; ITEM.access = "v"; ITEM.useText = "Tie"; ITEM.classes = {CLASS_CPA, CLASS_OTA}; ITEM.business = true; ITEM.blacklist =...
nilq/small-lua-stack
null
local type = {} type.Name = "Config" type.Icon = "icon16/page_white_gear.png" type.Extension = ".cfg" function type:Callback(strContent) end Metro.FileTypes:Register(type.Name, type.Extension, type.Callback, type.Icon)
nilq/small-lua-stack
null
local humanoidList = {} local storage = {} function humanoidList:GetCurrent() return storage end local function findHumanoids(object, list) if object then if object:IsA("Humanoid") then table.insert(list, object) end for _, child in pairs(object:GetChildren()) do local childList = findHumanoids(child, ...
nilq/small-lua-stack
null
slot2 = "BankRecordCcsView" BankRecordCcsView = class(slot1) BankRecordCcsView.onCreationComplete = function (slot0) slot3 = slot0 slot0.init(slot2) slot3 = slot0 slot0.initSignal(slot2) end BankRecordCcsView.init = function (slot0) slot4 = "csb/common/BankRecordItem.csb" slot0.list_lv.setItemResCcsFileName...
nilq/small-lua-stack
null
minpac.add('tpope/vim-abolish', {type = 'opt'})
nilq/small-lua-stack
null
CS_WEAPON_P228 = 1 CS_WEAPON_GLOCK = 2 CS_WEAPON_SCOUT = 3 CS_WEAPON_HEGRENADE = 4 CS_WEAPON_XM1014 = 5 CS_WEAPON_C4 = 6 CS_WEAPON_MAC10 = 7 CS_WEAPON_AUG = 8 CS_WEAPON_SMOKEGRENADE = 9 CS_WEAPON_ELITE = 10 CS_WEAPON_FIVESEVEN = 11 CS_WEAPON_UMP45 = 12 CS_WEAPON_SG550 = 13 CS_WEAPON_GALIL = 14...
nilq/small-lua-stack
null
local TextService = game:GetService("TextService") local UserInputService = game:GetService("UserInputService") local CorePackages = game:GetService("CorePackages") local InGameMenuDependencies = require(CorePackages.InGameMenuDependencies) local Roact = InGameMenuDependencies.Roact local UIBlox = InGameMenuDependenci...
nilq/small-lua-stack
null
local http = require "http" local io = require "io" local json = require "json" local stdnse = require "stdnse" local openssl = stdnse.silent_require "openssl" local tab = require "tab" local table = require "table" description = [[ Checks whether a file has been determined as malware by Virustotal. Virustotal is a se...
nilq/small-lua-stack
null
-- acb227's TARDIS Vortex Manipulator (Personal Teleport Adaptaton) -- Added a fix for stupid ROBLOX and their local position bugs. -- Initial checks. TeleportPlayer = game:GetService("Players"):FindFirstChild("acb227") if script.Parent.className ~= "Tool" then if TeleportPlayer == nil then print("Error: Player no...
nilq/small-lua-stack
null
local policy = require('apicast.policy') local _M = policy.new('oauth_mtls', 'builtin') local X509 = require('resty.openssl.x509') local b64 = require('ngx.base64') -- The "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Header -- Parameter is a base64url encoded SHA-256 thumbprint (a.k.a. digest) -- of the DE...
nilq/small-lua-stack
null
-- ************************************************************************** -- --[[ Dusk Engine Component: Tile Layer Builds a tile layer from data. --]] -- ************************************************************************** -- local dusk_tileLayer = {} -- ***************************************************...
nilq/small-lua-stack
null
modifier_hiraishin_armor_debuff = class({}) -------------------------------------------------------------------------------- function modifier_hiraishin_armor_debuff:IsHidden() return false end function modifier_hiraishin_armor_debuff:IsDebuff() return true end function modifier_hiraishin_armor_debuff:IsStunDebuf...
nilq/small-lua-stack
null
local root = script.Parent.Parent local includes = root:FindFirstChild("includes") local Roact = require(includes:FindFirstChild("Roact")) local Components = root:FindFirstChild("Components") local ConnectTheme = require(Components:FindFirstChild("ConnectTheme")) local StandardComponents = require(Components:FindFir...
nilq/small-lua-stack
null
-- mod-version:1 lite-xl 2.00 -- for LuaFormatter fortmatter local config = require "core.config" local formatter = require "plugins.formatter" config.luaformatter_args = {"-i", "--use-tab", "--indent-width=1"} -- make sure to keep -i arg if you change this formatter.add_formatter { name = "LuaFormatter", file_patt...
nilq/small-lua-stack
null
local TableHelper = {} function TableHelper.pack(...) if table.pack ~= nil then return table.pack(...) end return { n = select("#", ...), ... } end function TableHelper.unpack(...) if table.unpack ~= nil then return table.unpack(...) end return unpack(...) end return TableHelper
nilq/small-lua-stack
null
ESX = nil TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) ESX.RegisterUsableItem('bread', function(source) local _source = source local xPlayer = ESX.GetPlayerFromId(_source) xPlayer.removeInventoryItem('bread', 1) TriggerClientEvent('esx_status:add', source, 'hunger', 150000) TriggerClientE...
nilq/small-lua-stack
null
-- load data from a .csv file kode = kode or {} local function loadFile(path) local nums = 0 local lines = {} for line in io.lines(path) do nums = nums + 1 lines[nums] = line end return nums, lines end -- make line string to table local function makeLine(line_text) local nums = 0 local values = {} if lin...
nilq/small-lua-stack
null
function onCreate() makeLuaSprite('theGround', 'bedroomevil',-500,-240) addLuaSprite('theGround', false) makeLuaSprite('lightsy', 'lights',-100,-100) addLuaSprite('lightsy', true) setLuaSpriteScrollFactor('lightsy', 0.6, 0.6); end function onBeatHit() end function StepHit() end functio...
nilq/small-lua-stack
null
local runtime,exports = ... local IO = runtime.oop.create("I/O") exports.IO = IO function IO:__ctor(tag,tagColor,msgColor) self.tag = tag self.tagColor = tagColor self.msgColor = msgColor self.debug = false end function IO:SetDebug(debug) self.debug = debug end function IO:NewLine() Msg("\n") end function I...
nilq/small-lua-stack
null
-- For compatibility, to remove local StreamHandler = require('jls.io.streams.StreamHandler') return { StreamHandler = StreamHandler, CallbackStreamHandler = StreamHandler.CallbackStreamHandler, BufferedStreamHandler = require('jls.io.streams.BufferedStreamHandler'), LimitedStreamHandler = require('jl...
nilq/small-lua-stack
null
local w = 240 local dataA = string.char(0xFF, 0x00):rep(w*10) local dataB = string.char(0xFF, 0xFF):rep(w*10) local dataC = string.char(0x00, 0xFF):rep(w*10) local f = io.open("video.bin", "wb") for i = 1, 240, 1 do f:write(dataA) f:write(dataB) f:write(dataC) end f:close()
nilq/small-lua-stack
null
--- OnSelectTribute --- -- -- Called when AI has to tribute monster(s). -- Example card(s): Caius the Shadow Monarch, Beast King Barbaros, Hieratic -- -- Parameters (3): -- cards = available tributes -- minTributes = minimum number of tributes -- maxTributes = maximum number of tributes -- -- Return: -- result = tabl...
nilq/small-lua-stack
null
return { _fold = false, _id = "c3DLayerTest1", _type = "C3DLayerTest", height = "$fill", width = "$fill", _children = { { _id = "label3", _type = "cc.Label", color = "00ff00", fontSize = 30, opacity = 100, scaleX = "$minScale", scaleY = "$minScale", strin...
nilq/small-lua-stack
null
--[[-------------------------------------------------------- -- Firebase PushID - A Lua implementation of Firebase PushID -- Copyright (c) 2014-2015 TsT tst2005@gmail.com -- --]]-------------------------------------------------------- -- Sample of use: --[[ local firebase_pushid = require("firebase_pushid") local p1...
nilq/small-lua-stack
null
return { config = { { version = "v1", message = "wRPC" }, { version = "v0", message = "JSON over WebSocket" }, }, }
nilq/small-lua-stack
null
-- 2014 Aureoline Tetrahedron -- Created by Juno Nguyen @JunoNgx -- Made with LÖVE v0.9.1 -- Typeface used: SF Square Head -- SFX generated with Bfxr -- (Processed with Audacity) -- LÖVE Android port by Martin Felis @fysxdotorg require 'android' require 'players' require 'control' require 'gui' require 'dust' require...
nilq/small-lua-stack
null
local shell = require("shell") local args = shell.parse(...) if #args < 1 then io.write("Usage: unalias <name>") return end local result = shell.getAlias(args[1]) if not result then io.stderr:write("no such alias") else shell.setAlias(args[1], nil) io.write("alias removed: " .. args[1] .. " -> " .. result) ...
nilq/small-lua-stack
null
local MockPlugin = {} MockPlugin.__index = MockPlugin local MockToolbar = {} MockToolbar.__index = MockToolbar local MockButton = {} MockButton.__index = MockButton local CollectionService = game:GetService("CollectionService") function MockPlugin.new() local deactivator = Instance.new("BindableEvent") local unlo...
nilq/small-lua-stack
null
object_tangible_tcg_series1_decorative_indoor_garden_01 = object_tangible_tcg_series1_shared_decorative_indoor_garden_01:new { } ObjectTemplates:addTemplate(object_tangible_tcg_series1_decorative_indoor_garden_01, "object/tangible/tcg/series1/decorative_indoor_garden_01.iff")
nilq/small-lua-stack
null
-- @module advice Advices from Lisp implemented in Lua local advice = {} -- List of advices advice.list = {} advice.sandbox = {} -- Check if an advice exists or not -- @param options table -- @return true or false local function wrapper_exists(options) return advice.list[options.id] ~= nil and advice.list[op...
nilq/small-lua-stack
null
package.path = package.path .. ";../?.lua" Object = require "lib/classic" local tween = require "lib/tween" require "lib/deep" require "obj/StackParticleSystem" require "obj/DestroyParticleSystem" Totem = Object:extend() Totem.WIDTH = 45 Totem.HEIGHT = 55 Totem.DEPTH = 55 Totem.AREAL_Z = 2 Totem.AREAL_SIZE_X = 160 To...
nilq/small-lua-stack
null
function checkForUpdate ( ) end
nilq/small-lua-stack
null
local M = {} M.bootstrap = function() local fn = vim.fn local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" vim.api.nvim_set_hl(0, "NormalFloat", { bg = "#1e222a" }) if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", ...
nilq/small-lua-stack
null
local cwd = (...):gsub("%.[^%.]+$", "") .. "." return { name = "game_playertrade", description = "Allow to trade items with players", author = "edubart", website = "https://github.com/edubart/otclient", sandboxed = true, classPath = cwd .. "playertrade" }
nilq/small-lua-stack
null
#!/usr/bin/env lua -- MoonFLTK example: symbols.lua -- -- Derived from the FLTK test/symbols.cxx example (http://www.fltk.org) -- fl = require("moonfltk") N = 0 W = 70 H = 70 ROWS = 6 COLS = 6 function slider_cb() local val = math.floor(orientation:value()) local sze = math.floor(size:value()) for i = wind...
nilq/small-lua-stack
null
require "strict" require "game" require "player" function love.load() print("Init") Game:Initialize() Player:Initialize() end function love.draw() Game:DrawBullet() Game:DrawEnemy() Player:Draw() Game:DrawUI() end enemyTimer = 1 curSpeed = 100 maxSpeed = 500 function love.update() ...
nilq/small-lua-stack
null
local hud = {} hud.shop = {} hud.message = "" hud.message_showing = false hud.message_timer = 0 hud.messages = {} function hud.add_message(text, start_time, end_time) local msg = {} msg.text = text msg.start_time = start_time msg.end_time = end_time table.insert(hud.messages, msg) end function hud.add_...
nilq/small-lua-stack
null
local nginx_template = require "bin.initconf.templates.nginx" local pl_template = require "pl.template" local pl_tablex = require "pl.tablex" local pl_file = require "pl.file" local pl_path = require "pl.path" local pl_dir = require "pl.dir" local logger = require "bin.utils.logger" local _M = {} local function compi...
nilq/small-lua-stack
null
local L = LibStub("AceLocale-3.0"):NewLocale("CollectMe", "enUS", true, true) if not L then return end -- UI L["Mounts"] = true L["Companions"] = true L["Titles"] = true L["Missing"] = true L["Ignored"] = true L["Filters"] = true L["Random Mount"] = true L["Random Companion"] = true L["filters_nlo"] = "No ...
nilq/small-lua-stack
null
ID = "Shader" shaders = { posteffect_white = { vs = { "data/shader/fullScreenTriangle.hlsl", "FullScreenTriangleVS" }, ps = { "data/shader/postEffect.hlsl", "WhitePostEffectPS" }, }, radialBlur = { vs = { "data/shader/fullScreenTriangle.hlsl", "FullScreenTriangleVS" }, ps = { "data/shader/postEff...
nilq/small-lua-stack
null
local function get_script_path() local info = debug.getinfo(1,'S'); local script_path = info.source:match[[^@?(.*[\/])[^\/]-$]] return script_path end local scandir if love then function scandir(directory) directory = get_script_path() .. directory return love.filesystem.getDirectoryItems(direc...
nilq/small-lua-stack
null
do local _ = { ['solar-panel-equipment'] = { categories = {'armor'}, sprite = { filename = '__base__/graphics/equipment/solar-panel-equipment.png', width = 32, priority = 'medium', height = 32 }, ...
nilq/small-lua-stack
null
-- Copyright (c) 2018 Redfern, Trevor <trevorredfern@gmail.com> -- -- This software is released under the MIT License. -- https://opensource.org/licenses/MIT describe("actions.move_to", function() local actions = require "actions" local components = require "components" it("has a target position to move to", fu...
nilq/small-lua-stack
null
local type = type local rawset = rawset local setmetatable = setmetatable local assert = assert local tracecount = 0 local tracebacks = setmetatable({}, {__mode = "k"}) local function cppclass(classname, super) local olua = require "olua" local cls = olua.class(classname, super) cls.Get = cls.class['.get...
nilq/small-lua-stack
null
marssurvive={breath_timer=0,player_sp={},air=21,player_space={}, itemdroptime=tonumber(minetest.setting_get("item_entity_ttl")), aliens={},aliens_max=4} if marssurvive.itemdroptime=="" or marssurvive.itemdroptime==nil then marssurvive.itemdroptime=880 else -- hacky temporary fix to stop this from crashing when...
nilq/small-lua-stack
null
SKILL.name = "Repair" SKILL.LevelReq = 5 SKILL.SkillPointCost = 2 SKILL.Incompatible = { } SKILL.RequiredSkills = { } SKILL.icon = "vgui/skills/Dow2_repair_icon.png" SKILL.category = "Mechanicus" -- Common Passives, Warrior SKILL.slot = "MELEE" -- ULT, RANGED, MELEE, AOE, PASSIVE SKILL.class = { "techmarine", }...
nilq/small-lua-stack
null
--Ga-P.U.N.K.クラッシュ・ビート -- --Script by REIKAI function c100417010.initial_effect(c) --ACT local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(100417010,0)) e2:SetCa...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- D E V E L O P E R T O O L S -- -----------------------------------------------------------------------------...
nilq/small-lua-stack
null
-- ID, baud, data, parity, stop, echo uart.setup(0, 115200, 8, 0, 1, 0) function trim(s) return s:match'^%s*(.*%S)' or '' end socket = nil sending = false function connect() socket = net.createConnection(net.TCP, 0) uart.write(0, 'Net: connecting to backend...\r\n') socket:connect(9999, 'rlvi-backend.samgen...
nilq/small-lua-stack
null
local ffi = require("ffi") ffi.cdef[[ typedef struct tagFoo { int size; } Foo; ]] Foo = ffi.typeof("Foo") ffi.metatype(Foo, { __index = { create = function(self, ...) print("creating: ", self) return ffi.new(Foo, ...) end; } }) Foo:create()
nilq/small-lua-stack
null
function love.conf(t) t.title = "Ussuri" t.author = "Lucien Greathouse" t.url = "https://github.com/LPGhatguy/Ussuri" t.identity = "Ussuri-Test" t.version = "0.8.0" t.console = true t.release = false t.screen.width = 1024 t.screen.height = 768 t.screen.fullscreen = false t.screen.vsync = true t.screen.fsa...
nilq/small-lua-stack
null
----------------------------------- -- Area: Windurst Waters -- NPC: Mashuu-Ajuu -- Starts and Finished Quest: Reap What You Sow -- Involved in Quest: Making the Grade -- !pos 129 -6 167 238 ----------------------------------- local ID = require("scripts/zones/Windurst_Waters/IDs") require("scripts/globals/settings") ...
nilq/small-lua-stack
null
configuração local = require ' config ' strings locais = {} - array interno com strings traduzidas - Avalia a expressão da Lua função local eval ( str ) carga de retorno ( ' return ' .. str) () fim - Analisa o arquivo com tradução e retorna uma tabela com strings em inglês como - chaves e cadeias traduzidas com...
nilq/small-lua-stack
null
-- luacheck: globals vim local extend = require("iron.util.tables").extend local python = {} local has = function(feature) return vim.api.nvim_call_function('has', {feature}) == 1 end local executable = function(exe) return vim.api.nvim_call_function('executable', {exe}) == 1 end local windows_linefeed = functio...
nilq/small-lua-stack
null