content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
module(..., lunit.testcase, package.seeall) local common = dofile("common.lua") local http = require("luanode.http") --childProcess = require('child_process'); function test() local s = http.createServer(function (self, request, response) response:writeHead(304) response:finish() end) s:listen(common.PORT, f...
nilq/small-lua-stack
null
-- Script: Element.lua local HTTP = game:GetService("HttpService") local RS = game:GetService("RunService") local TS = game:GetService("TweenService") local QuerySelector = require(script.Parent.QuerySelector) local ElementGroupClass = require(script.Parent.ElementGroup) ---------- local ElementClass = {} ElementCl...
nilq/small-lua-stack
null
--BeachWarNpc.open() - opens minigame --BeachWarNpc.cancel() - cancels opened minigame before start --BeachWarNpc.stop() - stops game in progress, returns all players to arena with clean registry BeachWarNpc = { playerCore = function(player) BeachWarNpc.guiText(player) BeachWarNpc.refill(player) end, core = fu...
nilq/small-lua-stack
null
-- Local settings for specific machine
nilq/small-lua-stack
null
SennexCaveScreenPlay = ScreenPlay:new { numberOfActs = 1, screenplayName = "SennexCaveScreenPlay", lootContainers = { 134411, 8496263, 8496262, 8496261, 8496260 }, lootLevel = 26, lootGroups = { { groups = { {group = "color_crystals", chance = 160000}, {group = "junk", chance = 7240...
nilq/small-lua-stack
null
function onCreate() -- background shit makeLuaSprite('Destruido', 'backgrounds/Destruido',-700,-260); setScrollFactor('Destruido', 0.9, 0.9); scaleObject('Destruido', 1.1, 1.1); addLuaSprite('Destruido', false); end function onUpdate() end function opponentNoteHit(id,data,type,sus) triggerEvent('Scr...
nilq/small-lua-stack
null
vim.o.termguicolors = true vim.g.nvim_tree_indent_markers = 1 vim.g.nvim_tree_git_hl = 1 vim.g.nvim_tree_highlight_opened_files = 1 vim.cmd [[let g:nvim_tree_special_files = { 'README.md': 1, 'Makefile': 1, 'MAKEFILE': 1 }]] vim.g.nvim_tree_show_icons = { folders = 1, files = 1, git = 1, folder_arrows...
nilq/small-lua-stack
null
--[[ Copyright 2012 The Luvit Authors. All Rights Reserved. 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 agr...
nilq/small-lua-stack
null
-- ========== THIS IS AN AUTOMATICALLY GENERATED FILE! ========== PlaceObj('XTemplate', { group = "PreGame", id = "PGMission", PlaceObj('XTemplateWindow', { '__context', function (parent, context) return PGMissionObjectCreateAndLoad() end, '__class', "XDialog", 'Id', "PGMission", 'InitialMode', "sponsor", ...
nilq/small-lua-stack
null
local NET = {} function NET.packages() require 'cudnn' require 'utils/mathfuncs' require 'utils/utilfuncs' if not nn.ConcatUnet then dofile('layers/ConcatUnet.lua') end end function NET.createModel(opt) NET.packages() end function NET.createCriterion() local criterion = nn.MultiCriterion() ...
nilq/small-lua-stack
null
local Block = require("game.Block") local Class = require("game.Class") local Minecart = require("game.Minecart") local physics = require("game.physics") local Player = require("game.Player") local Terrain = require("game.Terrain") local View = require("game.View") local M = Class.new() function M:init(config) conf...
nilq/small-lua-stack
null
local Ring = {} Ring.__index = Ring function Ring:new(size) local buf = { data = {}, size = size, current_pos = 1, } return setmetatable(buf, Ring):fill(0) end function Ring:fill(value) for i = 1, self.size do self.data[i] = value end return self end function Ring:apply(sample) self.dat...
nilq/small-lua-stack
null
--[[ ############################################################################## S V U I By: Failcoder ############################################################################## --]] --[[ GLOBALS ]]-- local _G = _G; local unpack = _G.unpack; local select = _G.select; --[[ ADDON ]]-- local SV = _G['SVUI']; lo...
nilq/small-lua-stack
null
-------------------------------------------------------------------------- -- More string utilities. -- @classmod string require("strict") -------------------------------------------------------------------------- -- -- Copyright (C) 2008-2018 Robert McLay -- -- Permission is hereby granted, free of charge, to any ...
nilq/small-lua-stack
null
if not file.open(".wifi_configured") then file.open(".wifi_configured","w") wifi.setmode(wifi.SOFTAP); wifi.ap.config({ssid="DLI_PLC49_"..wifi.ap.getmac():gsub(":",""):sub(7):upper(),pwd="plc49dli",auth=wifi.WPA2_PSK}); end file.close() wifi.ap.setip({ip="192.168.128.1",netmask="255.255.255.0"});
nilq/small-lua-stack
null
--External libs import require("modules/externals/autobatch") --require("modules/externals/lovedebug") push = require("modules/externals/push") sock = require "sock" suit = require ("modules/externals/suit") --Utils import require("modules/utils/debugUtils") network = require("modules/utils/networkUtils") re...
nilq/small-lua-stack
null
local module = {} m = nil -- Sends a simple ping to the broker local function monitorIO() print("Pollling the IO") local send=0 for io=1,8 do local ios=gpio.read(io) if sts["p"..io][2] ~= ios then tsts["p"..io]=tsts["p"..io]+1 if tsts["p"..io] > config.confidence then...
nilq/small-lua-stack
null
function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then player:teleportTo(fromPosition) return true end if player:getStorageValue(Storage.WrathoftheEmperor.Mission10) < 2 or not player:hasBlessing(1) then player:teleportTo(fromPosition) fromPosition:...
nilq/small-lua-stack
null
local question={ { key="武林试初试",title=[=[关于古代天文、历法的说法错误的一项是]=],question1=[=[卯时对应现在清晨5点到7点]=],question2=[=[“未”是“天干地支”中的天干之一]=],question3=[=[“三光”指的是日、月、星这三种天体]=],question4=[=[季春指的是三月]=],answer=2 }, { key="武林试初试",title=[=[为什么我们常常避讳73,84这两个岁数,这是两位伟大任务去世时的年龄,他们是]=],question1=[=[孔子和孟子]=],question2=[=[老子和庄子]=],question3=[=[汉...
nilq/small-lua-stack
null
CodexDB["units"]["frFR"]={ [3]="Dévoreur", [6]="Vermine kobold", [30]="Araignée forestière", [36]="Golem des moissons", [38]="Nervi défias", [40]="Mineur kobold", [43]="Araignée minière", [46]="Fourrageur murloc", [48]="Guerrier squelette", [54]="Corina Steele", [60]="Ruklar le trappeur", [61]="Thuros Doigts-agiles", [...
nilq/small-lua-stack
null
require 'objects' require 'childwindowmanager' local function ModelRenderable(model, tint) local renderable = NewObject('UiRenderable') local modelElem = NewObject('DisplayModel') modelElem.Model = model if tint ~= nil then modelElem.Tint = tint end renderable:AddElement(modelElem) return renderable end lo...
nilq/small-lua-stack
null
-- Support the new blacklist features. -- -- Hypothetically, we could just nuke all playerdata here since nothing saved by this mod is particularly important. -- But this is More Correct(tm) if globals and globals.playerdata then for _, data in pairs(global.playerdata) do if not data.blacklist then data.bl...
nilq/small-lua-stack
null
--*********************************************************** --** THE INDIE STONE ** --*********************************************************** require "Map/CGlobalObject" ---@class CCampfireGlobalObject : CGlobalObject CCampfireGlobalObject = CGlobalObject:derive("CCampfireG...
nilq/small-lua-stack
null
local Math = {} Math.E = 2.718281828459 Math.Tau = math.pi * 2 --- Linear intepolation between 2 numbers -- @param origin Starting point (alpha = 0) -- @param target Ending point (alpha = 1) -- @param alpha Progress from origin to target (range [0, 1]) function Math.lerp(origin, target, alpha) return origin + (targe...
nilq/small-lua-stack
null
config = { var1 = false, var3 = { false, false, true }, var4 = { true, true } }
nilq/small-lua-stack
null
//________________________________ // // NS2 Single-Player Mod // Made by JimWest, 2012 // //________________________________ // base class for spawning npcs Script.Load("lua/ExtraEntitiesMod/LogicMixin.lua") Script.Load("lua/ExtraEntitiesMod/npc/NpcMixin.lua") class 'NpcManager' (ScriptActor) NpcManager.kM...
nilq/small-lua-stack
null
--[[ This module helps to gather information on memory usage. You could trigger memory profiling using the environment variable JLS_MEMORY_PROFILING and loading the module. export JLS_MEMORY_PROFILING=every:5 lua -l jls.util.memprof examples/httpServer.lua ]] local buffer, class, Map, TableList do local status s...
nilq/small-lua-stack
null
--- -- d/tests/test_visualstudio.lua -- Automated test suite for VisualD project generation. -- Copyright (c) 2011-2015 Manu Evans and the Premake project --- local suite = test.declare("visual_d") local p = premake local m = p.modules.d --------------------------------------------------------------------------- ...
nilq/small-lua-stack
null
local Nimbus = require(script.Parent.Parent.Nimbus) local Widgets = Nimbus.Widgets local Frame = Widgets.Roblox.Frame local TextBox = Widgets.Roblox.TextBox local function AddTaskBox(setTasks) return Frame "AddTask" { AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 0, 1, 0), Size = UDim2.new(1, 0, 0,...
nilq/small-lua-stack
null
local Cube3 = _radiant.csg.Cube3 local Point3 = _radiant.csg.Point3 local PeriodicPurgeMonsterBuff = class() local rng = _radiant.math.get_default_rng() function PeriodicPurgeMonsterBuff:on_buff_added(entity, buff) local json = buff:get_json() self._tuning = json.script_info or {} self._entity = ent...
nilq/small-lua-stack
null
---@class CS.FairyEditor.CommonSettings : CS.FairyEditor.SettingsBase ---@field public font string ---@field public fontSize number ---@field public textColor CS.UnityEngine.Color ---@field public fontAdjustment boolean ---@field public colorScheme CS.System.Collections.Generic.List_CS.System.String ---@field public fo...
nilq/small-lua-stack
null
-- luacheck: globals describe beforeAll expect it local noOptMatcher = function(_received, _expected) return { message = "", pass = true, } end local ERROR_CANNOT_OVERWRITE = "Cannot overwrite matcher" return function() describe("attempt to overwrite default", function() beforeAll(function() local succes...
nilq/small-lua-stack
null
local void = require('plenary.async.async').void local scheduler = require('plenary.async.util').scheduler local Status = require("gitsigns.status") local config = require('gitsigns.config').config local mk_repeatable = require('gitsigns.repeat').mk_repeatable local popup = require('gitsigns.popup') local signs = requ...
nilq/small-lua-stack
null
--[[ Copyright 2011 Iordan Iordanov <iiordanov (AT) gmail.com> This file is part of luci-pbx. luci-pbx is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
nilq/small-lua-stack
null
if SERVER then GM = GM or GAMEMODE LOTTERY_CAN_BET = LOTTERY_CAN_BET or false function GM:OnPreRoundStart(num) game.CleanUpMap() -- Swap teams only if this isn't the first round and the setting is enabled. if GetGlobalInt("RoundNumber") != 1 && SWAP_TEAMS_EVERY_ROUND == 1 && (team.GetScore(TEAM...
nilq/small-lua-stack
null
local addonName = "GuildStoreTools" local versionString = "v0.7.4" local serverName = "" local GST_Original_ZO_LinkHandler_OnLinkMouseUp GUILDSTORETOOLS_units = {} GUILDSTORETOOLS_Variables = {} local defaults = { left = 0, top = 0 } local UnitList = ZO_SortFilterList:Subclass() UnitList.defaults = {} UnitList.S...
nilq/small-lua-stack
null
local sType = require("ServiceType"); local remote_servers={}; --注册服务所部署的IP地址和端口 remote_servers[sType.Auth]={ serviceType = sType.Auth, ip = "127.0.0.1", port = 8000, descrip = "Auth Server", }; remote_servers[sType.System]={ serviceType = sType.System, ip = "127.0.0.1", port = 8001, ...
nilq/small-lua-stack
null
--[[ MTA Role Play (mta-rp.pl) Autorzy poniższego kodu: - Patryk Adamowicz <patrykadam.dev@gmail.com> Discord: PatrykAdam#1293 Link do githuba: https://github.com/PatrykAdam/mtarp --]] local screenX, screenY = guiGetScreenSize() local nametag = {} nametag.active = true local nameData = {} local ...
nilq/small-lua-stack
null
local List = script.Parent local Llama = List.Parent local t = require(Llama.Parent.t) local validate = t.table local function copyDeep(list) assert(validate(list)) local new = {} for i, v in ipairs(list) do if type(v) == "table" then new[i] = copyDeep(v) else new[i] = v end end return new end r...
nilq/small-lua-stack
null
-- A pandoc lua filter for managing different versions in a single -- document. -- -- usage: -- pandoc --lua-filter pandoc-questions.lua --metadata=version:<version> -- pandoc --lua-filter pandoc-questions.lua -o output-<version>.pdf -- -- <version> can be set using metadata or inferred from the name of the -- t...
nilq/small-lua-stack
null
local class = require 'ext.class' local table = require 'ext.table' local InitCond = require 'hydro.init.init' local NLSInitCond = class(InitCond) local initConds = table{ { name = 'Gaussian', mins = {.1, .1, .1}, maxs = {4, 4, 4}, guiVars = { {name='A', value=10}, }, getInitCondCode = function(self) ...
nilq/small-lua-stack
null
slot0 = class("BeatMonterNianActivity", import(".Activity")) slot0.GetDataConfig = function (slot0, slot1) return pg.activity_event_nianshou[tonumber(slot0:getConfig("config_id"))] and slot3[slot1] end slot0.GetCountForHitMonster = function (slot0) return ((pg.TimeMgr.GetInstance():parseTimeFrom(pg.TimeMgr.GetInsta...
nilq/small-lua-stack
null
--[[ TheNexusAvenger Implementation of a command. --]] local BaseCommand = require(script.Parent.Parent:WaitForChild("BaseCommand")) local CommonState = require(script.Parent.Parent:WaitForChild("CommonState")) local Command = BaseCommand:Extend() --[[ Creates the command. --]] function Command:__new() self:In...
nilq/small-lua-stack
null
function TEST() return 3 end
nilq/small-lua-stack
null
local t = Def.ActorFrame {} t[#t + 1] = LoadActor("Mine_Base") t[#t + 1] = LoadActor("Mine_Fill") .. { InitCommand = function(self) self:diffuseshift():effectcolor1(color("#FFFFFFFF")):effectcolor2(color("#FFFFFF22")):effectclock("bgm"):effectperiod( 2 ) end } t[#t + 1] = LoadActor("Mine_Fill") .. ...
nilq/small-lua-stack
null
if CLIENT then SWEP.PrintName = "Grenades" SWEP.Author = "Darkspider" SWEP.Slot = 1 SWEP.SlotPos = 1 SWEP.ViewModelFOV = 70 end SWEP.Base = "darkland_base" SWEP.HoldType = "melee" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.ViewModelFlip = false SWEP.Primary.Sound = nil SWEP.ViewModel = "m...
nilq/small-lua-stack
null
local AddonName, AddonTable = ... AddonTable.skinning = { 110609, 110610, }
nilq/small-lua-stack
null
---@class ISWorldObjectContextMenu ISWorldObjectContextMenu = {} ISWorldObjectContextMenu.fetchSquares = {} ISWorldObjectContextMenu.tooltipPool = {} ISWorldObjectContextMenu.tooltipsUsed = {} ISWorldObjectContextMenu.clearFetch = function() c = 0; window = nil; windowFrame = nil; brokenGlass = nil; door = nil...
nilq/small-lua-stack
null
function cancelPedDamage ( attacker ) if (getElementType( attacker ) ~= "player") then return end if ( not getElementData( source, "GTWoutlaws.vBot" )) then return end if (getTeamName( getPlayerTeam( attacker ) ) == "Staff" ) then cancelEvent() -- cancel any damage done to peds as staff end end addEventHan...
nilq/small-lua-stack
null
------------------------------------------------------------------------------- -- Importing modules ------------------------------------------------------------------------------- local Endpoint = require "elasticsearch.endpoints.Endpoint" ------------------------------------------------------------------------------...
nilq/small-lua-stack
null
require("lualib_bundle"); __TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 1,["6"] = 5,["7"] = 5,["8"] = 5,["9"] = 5,["11"] = 15,["12"] = 16,["13"] = 18,["14"] = 14,["20"] = 11,["24"] = 23,["25"] = 24,["26"] = 23,["27"] = 27,["28"] = 28,["29"] = 30,["30"] = 27,["31"] = 33,["32"] = 34,["33"] = 35,...
nilq/small-lua-stack
null
-- how netrw shows files g.netrw_liststyle = 3
nilq/small-lua-stack
null
--- @classmod Spy --- Wraps a function and records the calls. -- For each call the arguments and return values are saved. local ValueMatcher = require 'test.mock.ValueMatcher' local Spy = {} Spy.__index = Spy function Spy:__call( ... ) local returnValues = { self.wrappedFn(...) } local call = { ar...
nilq/small-lua-stack
null
--[[-- remove the block comment to enable -- sample weather mod -- .. place as many files in the mods folder as you like they all will be executed in same order on client/server resulting in the same indicies etc. -- define a new weather pattern local newWeather = { name="NewClearSky", probability=1, danger=-8...
nilq/small-lua-stack
null
-- Simple z-sorting ZSort = { Items = {} } function ZSort.zSort(arr) table.sort(arr, ZSort.sortFunction) end function ZSort.sortFunction(a, b) return b.z < a.z end function ZSort.clear() ZSort.Items = {} end function ZSort.add(i) table.insert(ZSort.Items, i) end function ZSort.flush() local i ZSort.zSort(ZSo...
nilq/small-lua-stack
null
--unlocks areas when the entity at the position is rotated --define the entities by position like this: -- global.level_unlocks = { -- ["x:0.5 y:0.5"] = {left_top = {x = 0,y = 0}, right_bottom = {x = 50, y = 50}, tile = "dirt-4", unlocked = false}, -- ["x:0.5 y:1.5"] = {left_top = {x = 0,y = 0}, right_bottom = {x ...
nilq/small-lua-stack
null
include('shared.lua') function ENT:Draw() self:DrawModel(); end function ENT:Think ( ) self.OriginalPos = self.OriginalPos or self:GetPos(); self:SetPos(self.OriginalPos + Vector(0, 0, math.sin(CurTime()) * 2.5)); if (self.NextChangeAngle <= CurTime()) then self:SetAngles(self:GetAngles() + Angle(0, .25, 0)...
nilq/small-lua-stack
null
SILE.hyphenator.languages["sa"] = {} SILE.hyphenator.languages["sa"].patterns = { "a1", "ā1", "i1", "ï1", "ī1", "u1", "ü1", "ū1", "r̥1", "ṛ1", "r̥̄1", "ṝ1", "l̥1", "ḷ1", "l̥̄1", "ḹ1", "e1", "o1", "a2i1", "a2u1", -- Break between a and i or u in hiatus. "a3ï1", "a3ü1", -- Do not break before a final consona...
nilq/small-lua-stack
null
local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) local area = createCombatArea(AREA_CROSS6X6) combat:setArea(area) local condition = Condition(CONDITION_ATTRIBUTES) condition:setParameter(CONDITION_PARAM_TICKS, 6000) condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 50)...
nilq/small-lua-stack
null
Current_Tests = { { Test_name = "Sub Event and call", Test_type = "WaitForCallBack", Test_func = function(callback, test_id) Events.Subscribe("TestEvent", function(str, nb, tbl, func) Events.Unsubscribe("TestEvent") if (str == "hello" and nb == 1...
nilq/small-lua-stack
null
local verse = require "verse"; local vcard = require "util.vcard"; local xmlns_vcard = "vcard-temp"; function verse.plugins.vcard(stream) function stream:get_vcard(jid, callback) --jid = nil for self stream:send_iq(verse.iq({to = jid, type="get"}) :tag("vCard", {xmlns=xmlns_vcard}), callback and function(stanza...
nilq/small-lua-stack
null
local log = {} function log.e(msg) print("[ERR] " .. msg) end function log.i(msg) print("[INF] " .. msg) end return log
nilq/small-lua-stack
null
// This code allows for warranting and pardoning of players if (SERVER) then util.AddNetworkString("rp.unarrestPlayer") net.Receive("rp.unarrestPlayer", function(_, client) if (client:Team() ~= TEAM_MAYOR) then return end local id = net.ReadString() for k,v in pairs(player.GetAll()) do if (v:SteamID() =...
nilq/small-lua-stack
null
local Screen = Level:extend() function Screen:activate() --- shape value local reLenX = base.guiWidth-1*2 local reLenY = 100 local reLenZ = 50 local reX = base.guiWidth local reY = base.guiHeight/2-reLenY/2 local reZ = base.guiHeight-50 -- Ball local bR = 20 --- -- levelName local levelName = lang.level_...
nilq/small-lua-stack
null
-- Constants for defining region types. UNDEFINEDAREA = 0x0000 SPAWNAREA = 0x0001 NOSPAWNAREA = 0x0002 WORLDSPAWNAREA = 0x0010 NOWORLDSPAWNAREA = 0x0020 NOBUILDZONEAREA = 0x0100 CIRCLE = 1 RECTANGLE = 2 RING = 3
nilq/small-lua-stack
null
----------------------------------- -- Area: Xarcabard -- NM: Biast ----------------------------------- require("scripts/globals/mobs") ----------------------------------- function onMobInitialize(mob) mob:setMobMod(tpz.mobMod.ADD_EFFECT, 1) end function onAdditionalEffect(mob, target, damage) return tpz.mo...
nilq/small-lua-stack
null
local status_ok, nvim_tree = pcall(require, "nvim-tree") if not status_ok then return end local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") if not config_status_ok then return end local tree_cb = nvim_tree_config.nvim_tree_callback nvim_tree.setup({ hijack_cursor = true, diagnosti...
nilq/small-lua-stack
null
local strict = require 'Q/UTILS/lua/strict' local Q = require 'Q' local qconst = require 'Q/UTILS/lua/qconsts' local Scalar = require 'libsclr' local qmem = require 'Q/UTILS/lua/qmem' local chunk_size = qmem.chunk_size local tests = {} -- Q.pack to return vector of given input number values tests.t1 = fun...
nilq/small-lua-stack
null
local luv = require("luv") local work = function(a) for i=1, 10000000 do --> that's a big number, so use LuaJIT-2 :) coroutine.yield() end end local f1 = luv.fiber.create(work, "a") local f2 = luv.fiber.create(work, "b") f1:ready() f2:ready() f1:join() f2:join()
nilq/small-lua-stack
null
-- "M1T X+12.68mm Y-15.79mm Z+25.68mm\r\n" local lpeg = require("lpeg") local msg = "M1T X+12.68mm Y-15.79mm Z+25.68mm\r\n"
nilq/small-lua-stack
null
WireToolSetup.setCategory( "Visuals/Screens" ) WireToolSetup.open( "consolescreen", "Console Screen", "gmod_wire_consolescreen", nil, "Screens" ) if CLIENT then language.Add( "tool.wire_consolescreen.name", "Console Screen Tool (Wire)" ) language.Add( "tool.wire_consolescreen.desc", "Spawns a console screen" ) lan...
nilq/small-lua-stack
null
return { summary = 'Get a list of Shapes attached to the Collider.', description = 'Returns a list of Shapes attached to the Collider.', arguments = {}, returns = { { name = 'shapes', type = 'table', description = 'A list of Shapes attached to the Collider.' } }, related = { 'C...
nilq/small-lua-stack
null
-- KEYS[1]: full path of entry local fullpath = KEYS[1] if fullpath ~= "" and string.sub(fullpath, -1) == "/" then fullpath = string.sub(fullpath, 0, -2) end local files = redis.call("ZRANGE", fullpath .. "\0", "0", "-1") for _, name in ipairs(files) do local file_path = fullpath .. "/" .. name redis.cal...
nilq/small-lua-stack
null
if modifier_imba_roshan_ai == nil then modifier_imba_roshan_ai = class({}) end function modifier_imba_roshan_ai:GetAttributes() return MODIFIER_ATTRIBUTE_PERMANENT + MODIFIER_ATTRIBUTE_IGNORE_INVULNERABLE end function modifier_imba_roshan_ai:IsPurgeException() return false end function modifier_imba_roshan_ai:IsPurgab...
nilq/small-lua-stack
null
AddCSLuaFile() SWEP.HoldType = "ar2" if CLIENT then SWEP.PrintName = "MP5" SWEP.Slot = 2 SWEP.ViewModelFlip = false SWEP.ViewModelFOV = 54 SWEP.Icon = "vgui/ttt/icon_mac" SWEP.IconLetter = "l" end SWEP.Base = "weapon_tttbase" ...
nilq/small-lua-stack
null
-- Basic scene, keyboard controls the sphere -- scene setup like in tutorial 002 view = UtilFunctions.simplerenderqueue() view.rClear:colorvalue(0.0,0.0,0.0,0) actor = actornode.new("actor",0,0,0) actor.l3d = l3dprimitive.newsphere("box",1,1,1) actor.l3d:linkinterface(actor) actor.l3d:rfLitSun(true) mysun = actorno...
nilq/small-lua-stack
null
------------------------------------------------------------------------ -- card stack layout by Enric Morales -- based on max.lua by Julien Danjou ------------------------------------------------------------------------ -- -- Grab environment we need local pairs = pairs --- card stack layout local cardstack = {} -...
nilq/small-lua-stack
null
local chatCommands local function searchChatCommand(str) if not str or str == "" then return chatCommands end -- Fuzzy search regex string str = ".*" .. str:gsub("[a-zA-Z0-9]", function(a) return a:lower() .. ".*" end) local condition = fn.Compose{fn.Curry(fn.Flip(string.match), 2)(str), fn.Curry(fn.Ge...
nilq/small-lua-stack
null
ITEM.name = "Зелье выносливости" ITEM.desc = "Временно ускоряет восстановление выносливости." ITEM.model = "models/toussaint_bottle8.mdl" ITEM.quantity = 3 ITEM:hook("use", function(item) local client = item.player client:setLocalVar("stmBuff", 1) timer.Create("stmBuff"..client:SteamID(), 3, 0, function() if !IsV...
nilq/small-lua-stack
null
Event_Add("Message_To_New_Players", "Message_To_New_Players", "Client_Login", 0, 0, -1) local Text = "&bThis is your first visit here.<br>" Text = Text.."&bRead &e/Rules /Help&b and &e/Faq<br>" Text = Text.."&bTo get a list of commands, use &e/Commands<br>" Text = Text.."&bTo get a list of players, use &e/Players<br>"...
nilq/small-lua-stack
null
local NotifLib = {} -- this is a certified glitchy exclusive local InternalLib = {} function InternalLib.CreateNotif(Title, Text, Icon) -- weird I know but I just do it so I dont have to do some weird self situation end function NotifLib.createNotif(Title, Text, Icon) if typeof(Title) ~= end return NotifLib
nilq/small-lua-stack
null
-- Old avatar actor frame.. renamed since much more will be placed here (hopefully?) local t = Def.ActorFrame{ Name="PlayerAvatar" } local profile local profileName = "No Profile" local playCount = 0 local playTime = 0 local noteCount = 0 local numfaves = 0 local profileXP = 0 local AvatarX = 0 local AvatarY = SCREE...
nilq/small-lua-stack
null
local M = {} local lsputils = require "as.plugins.code.utils" local lspconfig = require "lspconfig" function M.config(installed_server) return { capabilities = lsputils.get_capabilities(), on_attach = lsputils.lsp_attach, on_init = lsputils.lsp_init, on_exit = lsputils.lsp_exit, ...
nilq/small-lua-stack
null
--Random helper functions that don't really belong anywhere else. -- check for correctness later. function getCommonBPM(bpms,lastBeat) local BPMtable = {} local curBPM = math.round(bpms[1][2]) local curBeat = bpms[1][1] for _,v in ipairs(bpms) do if BPMtable[tostring(curBPM)] == nil then BPMtable[tostring(cur...
nilq/small-lua-stack
null
local sceneHandler = require('src.sceneHandler') local title = require('src.scenes.title') local GAME = {} local setUpScreen = function () local tileSize = 8 local screenWidth = love.graphics.getWidth() local screenHeight = love.graphics.getHeight() print('Setting up window: ' .. screenWidth .. ' x ' .. scree...
nilq/small-lua-stack
null
--- --- 通用接口工具类 --- local LuaCommon_Utils = Class("LuaCommon_Utils") LuaCommon_Utils._instance = nil -- 可读写的路径 LuaCommon_Utils.AssetPath = "" -- lua脚本的根目录 LuaCommon_Utils.LuaDir = UnityEngine.Application.dataPath .. "/Lua" -- override 初始化各种数据 function LuaCommon_Utils.initialize() end function LuaCommon_Utils.Inst...
nilq/small-lua-stack
null
-- test_bgprotocol.lua local Application = require("Application") local serpent = require("serpent") local NetMesh = require("NetMesh") local mesh = NetMesh("bgpconfig.lua") local function main() print("==== mesh ====") print(serpent.encode(mesh.Config)) end run(main)
nilq/small-lua-stack
null
--[[-------------------------------------------------------------------------- -- -- File: UTActivity.Ui.PlayersSetup.lua -- Copyright (c) Ubisoft Entertainment. All rights reserved. -- -- Project: Ubitoys.Tag -- Date: July 27, 2010 -- ---------------------------...
nilq/small-lua-stack
null
local showedLogs, targetPlayer = nil local isWeaponAmountValid = true local isAmmoAmountValid = true local isAmmoPerClipValid = true local isTargetPlayerValid = false local spawnCooldown = true --local logs = "" local targetPlayerName = "" local wSelectedWepID = nil local aSelectedWepID = nil local getPlayerName_ =...
nilq/small-lua-stack
null
--[[-- // FileName: Toggle.lua -- // Written by: Nicholas_Foreman -- // Description: Allows for toggling chat tags/chat color. local Chat = game:GetService("Chat") local ReplicatedModules = Chat:WaitForChild("ClientChatModules") local ChatSettings = require(ReplicatedModules:WaitForChild("ChatSettings")) local ChatCon...
nilq/small-lua-stack
null
-- ByCat#7797 local font = render.create_font("Verdana", 13, 500, false, true, false) local function on_paint() local screen_width = engine.get_screen_width() local fps = tostring(globals.get_framecount()) local ping = tostring(globals.get_ping()) local nickname = globals.get_username() local curt...
nilq/small-lua-stack
null
-- Threaded Child Script -- ICECUBE Communication Protocal v3.0 -- Attach these scripts to UR5 in V-REP scene. enableIk=function(enable) if enable then sim.setObjectMatrix(ikTarget,-1,sim.getObjectMatrix(ikTip,-1)) for i=1,#jointHandles,1 do sim.setJointMode(jointHandles[i],sim.jointmod...
nilq/small-lua-stack
null
--- Handles the replication of inverse kinematics (IK) from clients to servers -- @classmod IKService local require = require(script.Parent.loader).load(script) local Players = game:GetService("Players") local RunService = game:GetService("RunService") local IKBindersServer = require("IKBindersServer") local Maid = ...
nilq/small-lua-stack
null
-- mongo_test.lua local log_debug = logger.debug local timer_mgr = quanta.get("timer_mgr") local MongoMgr = import("store/mongo_mgr.lua") local mongo_mgr = MongoMgr() timer_mgr:once(2000, function() local code, count = mongo_mgr:count("default", "test_mongo_1", {pid = 123456}) log_debug("db ...
nilq/small-lua-stack
null
local ENABLE_EMOTES_IN_CHAT = CreateConVar('ppm2_cl_emotes_chat', '1', { FCVAR_ARCHIVE }, 'Show emotes list while chatbox is open') local ENABLE_EMOTES_IN_CONTEXT = CreateConVar('ppm2_cl_emotes_context', '1', { FCVAR_ARCHIVE }, 'Show emotes list while context menu is open') net.Receive('PPM2.DamageAnimation', funct...
nilq/small-lua-stack
null
local Job = require("plenary.job") local source = {} source.new = function() local self = setmetatable({}, { __index = source }) self.cache = { fetched = false, items = {}, } self.prefix_regex = [[\c\(#\|issue:\?\s\?\)$]] return self end ---@return boolean function source:is_available() return v...
nilq/small-lua-stack
null
local Job = require("plenary.job") local utils = require('spectre.utils') local log= require('spectre._log') local sed={} sed.init = function(_, config) config = vim.tbl_extend('force',{ cmd = "sed", pattern = "%s,%ss/%s/%s/g", args = { '-E', }, }, config or {}) ...
nilq/small-lua-stack
null
--[[ ------------------------------------ Description: OnLastMan (fixed function), Phasor V2+ Copyright (c) 2016-2018 * Author: Jericho Crosby * IGN: Chalwk * Written and Created by Jericho Crosby ----------------------------------- ]]-- -- Called when last man exists function OnLastMan() ...
nilq/small-lua-stack
null
local mapReducer = require('reducers/map') describe('map reducer', function() function initState() return mapReducer({}, {type = '__INIT__'}) end it("should build object index on loading map", function() local state = initState() state = mapReducer(state, { type = 'LOA...
nilq/small-lua-stack
null
--[[ s:UI Module Template Martin Karer / Sezz, 2014 http://www.sezz.at --]] local S = Apollo.GetPackage("Gemini:Addon-1.1").tPackage:GetAddon("SezzUI"); local M = S:CreateSubmodule("XXX", "Gemini:Hook-1.0"); local log; ----------------------------------------------------------------------------- -...
nilq/small-lua-stack
null