content
stringlengths
0
1.05M
origin
stringclasses
2 values
type
stringclasses
2 values
BigXD = Enemy:extend("BigXD") function BigXD:new(...) BigXD.super.new(self, ...) self:setImage("enemies/big_xd") self.SFX.laugh = SFX("sfx/laughing", 1) self:addIgnoreOverlap(SolidTile) self.rotate = .8 self.floating = true self.velocity.x = 0 self.floorHeight = 32 self.x = self.x - 500 self.solid = 0 self....
nilq/small-lua-stack
null
fontType = {-- (1)font (2)scale offset ["default"] = {"default", 1}, ["default-bold"] = {"default-bold",1}, ["clear"] = {"clear",1.1}, ["arial"] = {"arial",1}, ["sans"] = {"sans",1.2}, ["pricedown"] = {"pricedown",3}, ["bankgothic"] = {"bankgothic",4}, ["diploma"] = {"diploma",2}, ["beckett"] = {"beckett",2},...
nilq/small-lua-stack
null
minetest.register_chatcommand("create_in_front_of_fayce", { params = "<text>", description = "Send text to chat", privs = {}, func = function( name , text) --print(name:get_player_by_name()) --minetest.chat_send_all(dump(minetest.get_player_by_name(name):get_look_dir())) local pos = minetest.get_player_by_na...
nilq/small-lua-stack
null
return setmetatable({}, {__index = function(self, key) return require("skooma."..tostring(key)) end})
nilq/small-lua-stack
null
require("lib.recipes") -- Loader Furnaces data:extend({ add_furnace_recipe( "lf-furnace-01", {order = "a[loader-furnace]-a[01]", subgroup = "lf-furnace"}, { {"loader", 2}, {"steel-plate", 50}, {"electric-furnace", 48}, {"electronic-circuit", 20}, {"iron-gear-whee...
nilq/small-lua-stack
null
local asserteq = require('pl.test').asserteq local lexer = require 'pl.lexer' local seq = require 'pl.seq' local List = require('pl.List') local open = require('pl.stringio').open local copy2 = seq.copy2 local function test_scan(str, filter, options, expected_tokens, lang) local matches if lang then ...
nilq/small-lua-stack
null
local Prop = {} Prop.Name = "Lake House 201" Prop.Cat = "House" Prop.Price = 340 Prop.Doors = { Vector( 11046, -5861, 177 ), Vector( 11030, -5529, 177 ), } GM.Property:Register( Prop )
nilq/small-lua-stack
null
#!/usr/bin/env luajit local unpack = unpack or require'table'.unpack local highway = require'highway' local interstate95 = highway.new{ length = 517, -- length in kilometers marker_interval = 1.0 -- marker intervals, in kilometers } local interstate76 = highway.new{ length = 37.81958, -- length in kilometers ...
nilq/small-lua-stack
null
CheckBox = { skinnameschecked = { pressedskin = "checkedcheckbox_pressed", defaultskin = "checkedcheckbox", hoveredskin = "checkedcheckbox_hovered", pressedhoveredskin = "checkedcheckbox_hovered_pressed", focusedskin = "checkedcheckbox_focused", focusedhoveredskin = "checkedcheckbox_focused_hovered", foc...
nilq/small-lua-stack
null
--[[ Netherstorm -- Sunfury Researcher.lua This script was written and is protected by the GPL v2. This script was released by BlackHer0 of the BLUA Scripting Project. Please give proper accredidations when re-releasing or sharing this script with others in the emulation community. ~~End of License Agreement -- Black...
nilq/small-lua-stack
null
-- Returns the config options from [about](about.html), -- udpated by any command line flags (if any exist). local about=require"about" -- **help_string(t : table) : str** -- Helper function for `cli. Generates and prints help string local function help_string(t, h, default,about) h = {} for k,xy in pairs(...
nilq/small-lua-stack
null
local box = require "plc.box" local function new_key() -- Note: we use math.random in this test because it is portable, -- but to generate a real key you should use a better RNG, for -- instance /dev/urandom on Linux. local t = {} for i = 1, 32 do t[i] = math.random(0, 255) end return string.ch...
nilq/small-lua-stack
null
--[[-- Additions to the math module. @module std.math ]] local _floor = math.floor --- Extend `math.floor` to take the number of decimal places. -- @function floor -- @param n number -- @param p number of decimal places to truncate to (default: 0) -- @return `n` truncated to `p` decimal places local function floor...
nilq/small-lua-stack
null
----------------------------------------- -- ID: 4962 -- Scroll of Tonko: Ichi -- Teaches the ninjutsu Tonko: Ichi ----------------------------------------- function onItemCheck(target) return target:canLearnSpell(354) end function onItemUse(target) target:addSpell(354) end
nilq/small-lua-stack
null
module("luci.controller.webrestriction", package.seeall) function index() if not nixio.fs.access("/etc/config/webrestriction") then return end entry({"admin", "control"}, firstchild(), "Control", 44).dependent = false entry({"admin", "control", "webrestriction"}, cbi("webrestriction"), _("访问限制"), 11).depe...
nilq/small-lua-stack
null
--- Entity module -- @module Entity require '/locale/stdlib/core' require '/locale/stdlib/surface' require '/locale/stdlib/area/area' Entity = {} --- Converts an entity and its selection_box to the area around it -- @param entity to convert to an area -- @return area that entity selection_box is valid for function E...
nilq/small-lua-stack
null
-- Online Interiors IPL Edits -- Use https://github.com/Bob74/bob74_ipl/wiki to edit below -- Nightclub (Mission Row) Citizen.CreateThread(function() -- Getting the object to interact with AfterHoursNightclubs = exports['bob74_ipl']:GetAfterHoursNightclubsObject() ----------------------------------------...
nilq/small-lua-stack
null
local map = require 'lqc.helpers.map' describe('map function', function() local t1 = { 1, 2, 3, 4, 5 } local function f1(value) return value * 2 end local t2 = { 'abc', 'def' } local function f2(value) return string.rep(value, 3) end it('should apply a function to all elements in the collectio...
nilq/small-lua-stack
null
-- Write to the 1602 screen -- Based on the Adafruit python code -- Pin Definitions RS = 1 CLK = 2 pins={7,6,5,4} -- Set up the out pins function setupPins() gpio.mode(RS,gpio.OUTPUT) gpio.mode(CLK,gpio.OUTPUT) for i=1,4 do gpio.mode(pins[i],gpio.OUTPUT) end end function resetPins(...
nilq/small-lua-stack
null
require 'mia.packer' -- plugin set up require 'lush'(require 'gruvbox') require 'mia.config.keymaps' require 'mia.config.treesitter' require 'mia.config.telescope' return {}
nilq/small-lua-stack
null
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BseUserLeaveRoom_pb', package.seeall) local BSEUSERLEAVEROOM = protobuf.Descriptor(); local BSEUSERLEAVEROOM_ROOMID_FIELD = protobuf.FieldDescriptor(); local BSEUSERLEAVEROOM_SESSIONID_FIELD = protobuf.FieldDescriptor(); local BSEU...
nilq/small-lua-stack
null
--[[ TheNexusAvenger Helper class for creating objects in Lua. --]] local METATABLE_METHODS = { "__call", "__concat", "__unm", "__add", "__sub", "__mul", "__div", "__mod", "__pow", "__tostring", "__eq", "__lt", "__le", "__gc", "__len", } --[[ Returns the ...
nilq/small-lua-stack
null
local sw,sh = guiGetScreenSize() local GothaProMed = dxCreateFont("destek/Roboto.ttf",15) addEventHandler( "onClientRender", root, function ( ) for k,player in ipairs(getElementsByType("player")) do if player ~= getLocalPlayer() and getElementDimension(getLocalPlayer()) == getElementDimension(player) and ...
nilq/small-lua-stack
null
-- mod-version:2 -- lite-xl 2.0 local core = require "core" local config = require "core.config" local style = require "core.style" local StatusView = require "core.statusview" local scan_rate = 1 config.plugins.statusclock = { time_format = "%H:%M:%S", date_format = "%A, %d %B %Y" } local time_data = { time_te...
nilq/small-lua-stack
null
Tips = Object:extend() local radius = math.floor(base.guiFontHeight/3) function Tips:new(string, x, y, z, xMode, yMode) self.string = string self.x = 0 if x ~= nil then self.x = x end self.y = 0 if y ~= nil then self.y = y end self.z = 0 if z ~= nil then sel...
nilq/small-lua-stack
null
local M = {} local icons = require "config.icons" local error_red = "#F44747" local warning_orange = "#ff8800" local info_yellow = "#FFCC66" local hint_blue = "#4FC1FF" local perf_purple = "#7C3AED" function M.setup() require("todo-comments").setup { signs = true, keywords = { FIX = { icon = icons.ui...
nilq/small-lua-stack
null
print("-- 开始清理旧的文件 --") require "lfs" --递归查找 function findindir (path, wefind, r_table, intofolder) for file in lfs.dir(path) do if file ~= "." and file ~= ".." then local f = path..'\\'..file if string.find(f, wefind) ~= nil then table.inse...
nilq/small-lua-stack
null
-- Base16 Spaceduck color -- Author: Guillermo Rodriguez (pineapplegiant) -- to be use in your theme.lua -- symlink or copy to config folder `local color = require('color')` local M = {} M.base00 = "#000000" -- ---- M.base01 = "#5ccc96" -- --- M.base02 = "#b3a1e6" -- -- M.base03 = "#686f9a" -- - M.base04 = "#00a3cc"...
nilq/small-lua-stack
null
-- unit-test for the classrunner local ClassRunner = require 'classrunner' local LuaUnit = require 'luaunit' --TODO: test the (self) variable in test classes ---- STUFF ------------------------------------------------------------------- local a,b,c,d = 0,0,0,0 -- variables to show call frequency UnTestTiti = { ...
nilq/small-lua-stack
null
--[[ Lua side of the hotkey api. This primarily aims to interface tightly with the egosoft menu system, to leverage existing code for allowing players to customize hotkeys. Patches the OptionsMenu. Notes on edit boxes: The external hotkey detection has no implicit knowledge of the in-game context of the keys....
nilq/small-lua-stack
null
local keymap = vim.api.nvim_set_keymap local function set_keybindings() local noremap_silent = { noremap = true, silent = true } local remap_silent = { noremap = false, silent = true } local remap_nosilent = { noremap = false, silent = true } local keybindings = { -- {'mode', 'keybindings', 'co...
nilq/small-lua-stack
null
return { id = 2, type = 2, ip = "127.0.0.1", port = 60002, path = "db_svr", mysql = { { ip = "127.0.0.1", port = 3306, username = "testmn", password = "123456", db_name = "mn_login_db", db_type = 1, }, }, }
nilq/small-lua-stack
null
--[[ Copyright (c) 2011 Ted "IntelOrca" John 2013 Edvin "Lego3" Linge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the right...
nilq/small-lua-stack
null
local translate = {} translate.Beam = require('onmt.translate.Beam') translate.PhraseTable = require('onmt.translate.PhraseTable') translate.Translator = require('onmt.translate.Translator') return translate
nilq/small-lua-stack
null
-- -- buddies -- -- Copyright (c) 2015 Sheepolution -- -- This library is free software; you can redistribute it and/or modify it -- under the terms of the MIT license. See LICENSE for details. local buddies = {} local func = {} local superfunc = {} function buddies:__index(f) if type(f) == "string" then if f:sub...
nilq/small-lua-stack
null
local Dictionary = {} --- Merges key/value pairs from multiple dictionaries into one -- @param ... Tuple of dictionaries to merge function Dictionary.merge(...) local newDictionary = {} for _, dictionary in pairs({ ... }) do for key, value in pairs(dictionary) do newDictionary[key] = value end end return...
nilq/small-lua-stack
null
base_research = nil base_research = { { Name = "UtilityHealthUpgrade1", RequiredResearch = "", RequiredSubSystems = "Research", RequireTag = "VaygrUtility", Cost = 1400, Time = 120, D...
nilq/small-lua-stack
null
SWEP.Base = "weapon_twitch_base" if SERVER then AddCSLuaFile ("shared.lua") SWEP.HoldType = "smg" end SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.PrintName = "Twitch HL2 Pulse-Rifle" SWEP.Slot = 2 SWEP.IconLetter = "2" SWEP.IconLetterFont = "HL2SelectIcons" SWEP.ViewModel = "mod...
nilq/small-lua-stack
null
local helpers = require "spec.helpers" local cjson = require "cjson" describe("Plugin: proxy-cache-redis", function() local bp local proxy_client, admin_client, cache_key, plugin1, route1 setup(function() bp = helpers.get_db_utils(nil, nil, {"proxy-cache-redis"}) route1 = assert(bp.routes:insert { ...
nilq/small-lua-stack
null
-- Brian: This is a Lua file; make sure you're using the correct syntax. -- I've removed the Python defaults. VERSION = "1.0.0" function onBufferOpen(b) local ft = b:FileType() -- Brian, just return early. This thing is pretty screwed. return if ft == "go" then b:SetOption("tabstosp...
nilq/small-lua-stack
null
SceneObjectType={ Role=1,Monster=2,NPC=3, } SceneInfoKey = { EnterView=1, LeaveView=2, PosChange=3, TargetPos=4, JumpState=5, }
nilq/small-lua-stack
null
---------------------------------- -- Area: Meriphataud_Mountains_[S] -- NPC: Indescript Markings -- Type: Quest -- !pos -389 -9 92 97 ----------------------------------- local ID = require("scripts/zones/Meriphataud_Mountains_[S]/IDs") require("scripts/globals/keyitems") ----------------------------------- function ...
nilq/small-lua-stack
null
--Reinforcement of the Army's Troops --Scripted by TanakaKotoha function c101103088.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(101...
nilq/small-lua-stack
null
local t = Def.ActorFrame {}; -- P2 Judgement Labels -- P2 numbers t[#t+1] = Def.ActorFrame { InitCommand=cmd(addx,60;); LoadFont("_numbers2") .. { InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);horizalign,left;diffuse,PlayerColor(PLAYER_2);playcommand,"Set";); OnCommand=cmd(addx,SCREEN_WIDTH/2;sleep,0...
nilq/small-lua-stack
null
-- Lua local cb = require'diffview.config'.diffview_callback require'diffview'.setup()
nilq/small-lua-stack
null
require("deviap/core").load("all") -- Light it up! core.graphics.upperAmbient = colour(1, 1, 1) for x = -5, 5 do for y = -5, 5 do core.construct("block", { position = vector3(x*4, 0, y*4), scale = vector3(4, 0.4, 4), colour = colour.hex("f16161"), metalness ...
nilq/small-lua-stack
null
local folderName = ... local cosFix = LibStub("AceAddon-3.0"):NewAddon(folderName, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0") -- Allow access for other addons. _G.cosFix = cosFix local _G = _G local pairs = _G.pairs local strsplit = _G.strsplit local math_max = _G.math.max local math_min = _G.m...
nilq/small-lua-stack
null
--[[ FontLoader by NAKET Coder how it works: Say you have a new generation Fonts folder, which is something like... \Fonts \frutiger \_32pt \scooter \_36px numbers \_32px metal in your bganims, call Font(family, style) where: family = font family [e.g. "frutiger", "scooter"] style = font style [e.g. "32pt"...
nilq/small-lua-stack
null
slot0 = class("TechnologySettingsLayer", import("..base.BaseUI")) slot0.TEC_PAGE_TENDENCY = 1 slot0.TEC_PAGE_CATCHUP_TARGET1 = 2 slot0.TEC_PAGE_CATCHUP_TARGET2 = 3 slot0.TEC_PAGE_CATCHUP_ACT = 4 slot0.PANEL_INTO_TIME = 0.15 slot0.SELECT_TENDENCY_FADE_TIME = 0.3 slot0.SELECT_CHAR_LIGHT_FADE_TIME = 0.3 slot0.CATCHUP_VERS...
nilq/small-lua-stack
null
---@class ItemConfig.Item @ local Item = {} -------------------- -- Functions -------------------- ---@param Tags number @ (int) ---@return boolean @ function Item:HasTags(Tags) end ---@return boolean @ function Item:IsCollectible() end ---@return boolean @ function Item:IsNull() end ---@return boolean @ function ...
nilq/small-lua-stack
null
local playsession = { {"Krono", {293095}}, {"gearmach1ne", {394379}}, {"Scuideie-Guy", {253133}}, {"SLQ", {307844}}, {"Zorzzz", {376633}}, {"matam666", {141604}}, {"Daveyboy80", {5927}}, {"Axel_Henir", {19917}}, {"Aeropagus", {26176}}, {"N0lan", {118470}}, {"phanton5000", {60472}}, {"vince527", {218136}}, ...
nilq/small-lua-stack
null
local Cursor = required("Cursor") local DrawCommands = required("DrawCommands") local LayoutManager = required("LayoutManager") local Mouse = required("Mouse") local Region = required("Region") local Stats = required("Stats") local Style = required("Style") local text = required("text") local Window = required("Window"...
nilq/small-lua-stack
null
local t = Def.ActorFrame { Name = "PlayerInfoFrame", LoginMessageCommand = function(self) self:playcommand("Set") ms.ok("Login Successful") end, LogOutMessageCommand = function(self) self:playcommand("Set") end, LoginFailedMessageCommand = function(self) self:play...
nilq/small-lua-stack
null
describe("lredis.protocol module", function() local protocol = require "lredis.protocol" local function write_to_temp_file(str) local file = io.tmpfile() assert(file:write(str)) assert(file:flush()) assert(file:seek("set")) return file end -- Docs at http://redis.io/topics/protocol it("composes example f...
nilq/small-lua-stack
null
-- Disable haskell-vim omnifunc vim.g.haskellmode_completion_ghc = 0 wincent.vim.setlocal('omnifunc', 'necoghc#omnifunc')
nilq/small-lua-stack
null
local createEnum = import("../createEnum") return createEnum("ScaleType", { Stretch = 0, Slice = 1, Tile = 2, Fit = 3, Crop = 4, })
nilq/small-lua-stack
null
local default_style = data.raw["gui-style"].default local function color_graphics(posX, posY) return { type = "monolith", top_monolith_border = 2, right_monolith_border = 0, bottom_monolith_border = 0, left_monolith_border = 0, monolith_image = { filename = "__Enhanced_Map_Col...
nilq/small-lua-stack
null
local error = require('telescope._extensions.gradle.util').error local has_telescope, telescope = pcall(require, "telescope") if not has_telescope then error "This extension requires telescope.nvim (https://github.com/nvim-telescope/telescope.nvim)" end local cfg = nil -- List available gradle tasks and run the pi...
nilq/small-lua-stack
null
require ("util") local hit_effects = require ("__base__/prototypes/entity/hit-effects") local sounds = require("__base__/prototypes/entity/sounds") data:extend({ { type = "simple-entity-with-owner", render_layer = "lower-object", name = "wooden-billboard", icon = "__simple-billboard__/graphics/icons/w...
nilq/small-lua-stack
null
function main.get_sky(name) local sky = 1 table.foreach(skybox.skies, function(k, v) if v == name then sky = k end end) return sky end function main.clear_inv(inv) for _, s in ipairs(inv:get_list("main")) do inv:remove_item("main", s) end end function main.give_starter_items(inv) main.clear_inv(inv)...
nilq/small-lua-stack
null
package("exprtk") set_kind("library", {headeronly = true}) set_homepage("https://www.partow.net/programming/exprtk/index.html") set_description("C++ Mathematical Expression Parsing And Evaluation Library") set_license("MIT") add_urls("https://github.com/ArashPartow/exprtk.git") add_versions("2...
nilq/small-lua-stack
null
local Replicated = game:GetService("ReplicatedStorage") local Utility = Replicated.Utility local AntObject = {} AntObject.__index = AntObject local function Constructor(InstantietedBy) local Object = setmetatable({}, AntObject) Object.Locked = {} Object.Unlocked = {} Object.DataTypeLimitations = {} ...
nilq/small-lua-stack
null
local irc = require "ircclient" local assert = require "test.assert" local target = "foo!~bar@baz.quux" local col_int = "[B]foo[/B] [U]bar[/U] [COLOR=RED]baz[/COLOR]" local col_mirc = "\2foo\2 \31bar\31 \00304baz\15" assert.equal(irc.get_nick(target), "foo") assert.equal(irc.get_host(target), "!~bar@baz.quux") assert...
nilq/small-lua-stack
null
local L = LibStub("AceLocale-3.0"):GetLocale("Skada", false) local AceGUI = LibStub("AceGUI-3.0") -- Mode menu list sorted by category local function _modeMenu(window, level) local info = UIDropDownMenu_CreateInfo() local modes = Skada:GetModes() local categorized = {} for i, module in ipairs...
nilq/small-lua-stack
null
id = 'V-38542' severity = 'medium' weight = 10.0 title = 'The system must use a reverse-path filter for IPv4 network traffic when possible on all interfaces.' description = 'Enabling reverse path filtering drops packets with source addresses that should not have been able to be received on the interface they were recei...
nilq/small-lua-stack
null
{ vertex = { uniformBuffers = { matrices = { wvp = "mat4" } }, inputs = { sl_Position = "vec4", sl_TexCoord = "vec2" }, outputs = { uv = "vec2" }, code = [[ ...
nilq/small-lua-stack
null
workspace "Feijoa" architecture "x86_64" startproject "Sellowiana" configurations { "Debug", "Release", "Dist" } outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}" -- Include directories relative to root folder (solution directory) IncludeDir = {} IncludeDir["GLFW"] = "%{wks.location}/Feijoa/v...
nilq/small-lua-stack
null
local ABOUT = { NAME = "openLuup.userdata", VERSION = "2020.03.31", DESCRIPTION = "user_data saving and loading, plus utility functions used by HTTP requests", AUTHOR = "@akbooer", COPYRIGHT = "(c) 2013-2020 AKBooer", DOCUMENTATION = "https://github.com/akbooer/openLuup/tree/mast...
nilq/small-lua-stack
null
-- This script is for whatever I need to test in the moment print("Hi from test script") print(nbt[1].tagType)
nilq/small-lua-stack
null
object_tangible_collection_rare_pistol_jawa_ion = object_tangible_collection_shared_rare_pistol_jawa_ion:new { gameObjectType = 8211,} ObjectTemplates:addTemplate(object_tangible_collection_rare_pistol_jawa_ion, "object/tangible/collection/rare_pistol_jawa_ion.iff")
nilq/small-lua-stack
null
local function encode(opcode, payload) local len = #payload local frame = {} frame[#frame + 1] = string.char(bit.bor(0x80, opcode), bit.bor((len < 126) and len or ((len < 0x10000) and 126 or 127))) if len >= 0x10000 then frame[#frame + 1] = string.char(0, 0, 0, 0, -- 32 bit l...
nilq/small-lua-stack
null
AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") function ENT:Initialize() self:SetModel("models/props_combine/combine_teleportplatform.mdl") self:SetSolid(SOLID_BBOX) self:SetUseType(SIMPLE_USE) end function ENT:Use(acticator, caller) caller:SetPos(Vector(-1859, -981, 32)) call...
nilq/small-lua-stack
null
local openLevel = require "config.openLevel" local HeroLevelup = require "hero.HeroLevelup" local guideShaar = {} function guideShaar:Start() self:initData() self:initUi() end function guideShaar:initData() self.quest = module.QuestModule.Get(module.guideLayerModule.Type.LevelUp) self.flag = true end ...
nilq/small-lua-stack
null
local K, C, L, _ = unpack(select(2, ...)) if C["actionbar"].enable ~= true then return end local _G = _G local pairs = pairs local select = select local CreateFrame, UIParent = CreateFrame, UIParent local InCombatLockdown = InCombatLockdown local IsAltKeyDown, IsShiftKeyDown = IsAltKeyDown, IsShiftKeyDown -- Show emp...
nilq/small-lua-stack
null
--managing changes in the game state if GameStateManager == nil then _G.GameStateManager = class ({}) end settings = { updateRate = 1, randomAfterState = DOTA_GAMERULES_STATE_HERO_SELECTION } function GameStateManager:Init() local GameMode = GameRules:GetGameModeEntity() GameMode:SetContextThink("Update", functi...
nilq/small-lua-stack
null
--COMMAND TEMPLATE local Object = { name = "memusage", usage = "Returns memory used by Lua", cmdNames = {'mem','memusage'}, disabled = false } function Object.callback(self,args,rawarg) local used = math.floor(collectgarbage("count")/1000) args.msg:reply("Lua is using " .. used/GLOBAL_MAXMEM .. ...
nilq/small-lua-stack
null
local MILISECONDS_A_YEAR = 31536000000; --设置token过期时间 local setExpires = function(token, expires) -- 默认一年过期 -- 当前毫秒数+过期毫秒数 local expiresInMiliSeconds = expires if expiresInMiliSeconds == -1 then --[[ 语法: ZADD key [NX|XX] [CH] [INCR] score member [score member ...] XX: Only upd...
nilq/small-lua-stack
null
--- OUTDATED, USE PROMISES INSTEAD. --- OUTDATED, USE PROMISES INSTEAD. --- OUTDATED, USE PROMISES INSTEAD. --- OUTDATED, USE PROMISES INSTEAD. --- OUTDATED, USE PROMISES INSTEAD. local HttpService = game:GetService("HttpService") local function httpGet(URL) local success, response repeat success, response = pc...
nilq/small-lua-stack
null
#!/usr/bin/luatex --[[ prepcontour [Lua variant] - prepare contour lines (for pgfplots) Version: 1.4 (2021-02-22) Copyright (C) 2020-2021 Francesco Poli <invernomuto@paranoici.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
nilq/small-lua-stack
null
data:extend({ { type = "recipe", name = "wooden-repair-pack-1", energy_required = 0.5, localised_name = "Wooden repair pack", ingredients = { {"wood", 5}, {"iron-plate", 4} }, result = "repair-pack" }, { type = "recipe", name = "wooden-repair-pack-2", locali...
nilq/small-lua-stack
null
return setmetatable({}, { __call = function() exec.cmd = function(exe) local format, len, gsub, gmatch = string.format, string.len, string.gsub, string.gmatch local set = {} return setmetatable(set, { __call = function(_, a, ...) local args if a and type(a) == "string" then local ergs = ...
nilq/small-lua-stack
null
local replacements = require "src.replacements" -- local is_content_type = replacements.is_content_type local transform_body = replacements.transform_body -- data local filename = "test/testresponse.html" local replacement_patterns = { "https%:%/%/my%-internal%.server%:9999###https://nerdblog.steinkopf.net", ...
nilq/small-lua-stack
null
local BezierCurve = require(script.Parent.bezierCurve) local Path = {} Path.__index = Path function Path:length() local totalDistance = 0 for _, segment in ipairs(self.segments) do totalDistance = totalDistance + segment:length() end return totalDistance end --[[ t here is between [0...
nilq/small-lua-stack
null
test = require 'u-test' common = require 'common' function AchievementProgressNotifications_Handler() print ('AchievementProgressNotifications_Handler') XblAchievementsAddAchievementProgressChangeHandler() SetCheckHR(0) Sleep(5000) XblAchievementsUpdateAchievementAsync("2", 20) end function OnXblAchi...
nilq/small-lua-stack
null
-- Reload Config hs.loadSpoon("ReloadConfiguration") spoon.ReloadConfiguration:start() spoon.ReloadConfiguration:bindHotkeys({reloadConfiguration = {{"cmd", "alt", "ctrl"}, "R"}}) -- Toggle showing seconds in menubar lock hs.hotkey.bind({"cmd", "alt", "ctrl"}, "S", function() -- Get current state format = hs.execu...
nilq/small-lua-stack
null
-- player stuffs -- love.module shortcuts local la = love.audio local le = love.event local lf = love.filesystem local lg = love.graphics local li = love.image local lj = love.joystick local lk = love.keyboard local lm = love.mouse local ln = love.math local lp = love.physics local ls = love.system local ly = love.thr...
nilq/small-lua-stack
null
att.PrintName = "Homemade FCG" att.Icon = Material("entities/ammo_fcg_homemade.png") att.Description = "A homemade full-auto firemode conversion, with some strange modifications made to the firing bolt." att.Desc_Pros = { } att.Desc_Cons = { } att.AutoStats = true att.Slot = "fcg" att.Override_Firemodes = { ...
nilq/small-lua-stack
null
--[[--------------------------------------------------------------------------- Warmod Project Dev(s): x[N]ir, Hajt File: modules/player/hooks.lua Description: Client sided hooks --]]--------------------------------------------------------------------------- -- Connection flag warmod.connected = {} -- Muted fl...
nilq/small-lua-stack
null
-- We are using PCH, so you must disable PCH on the protobuf files, and enable generation on stdafx.cpp workspace "Plugin" configurations {"Debug", "Release"} platforms {"Win32", "Win64", "UnitTestWin32", "UnitTestWin64"} language "C++" project "Plugin" targetdir "bin/%{cfg.buildcfg}/%{cfg.platform}" t...
nilq/small-lua-stack
null
local penisx = -540 local penisy = -200 local penisSize = 1.85 local pf = 'bgs/normal/' local mf = 'veryBack' local curLight = 1; function onCreate() --getProperty('gf.', ) -- le bg fuckin shit if (songName == 'Ego') then pf = 'bgs/ego/'; mf = 'windows' else pf = 'bgs/normal/'; mf = 'veryBack' end for i=...
nilq/small-lua-stack
null
return { MainInterfaceFile = "interface.xui"; BundleDisplayName = "XUI 亮色主题示例"; Executable = "main.lua"; BundleIconFile = "appicon.png"; BundleVersion = "1.4.0"; MinimumXXTVersion = "1.2"; MinimumSystemVersion = "7.0"; -- MaximumSystemVersion = "11.1.2"; BundleInfoDictionaryVersion = "6.0"; --[[ SupportedReso...
nilq/small-lua-stack
null
return {'fje','fjes'}
nilq/small-lua-stack
null
ENT.Base = "base_gmodentity" ENT.Type = "anim" ENT.PrintName = "Storage Box (Public)" ENT.Author = "vin" ENT.Purpose = "" ENT.Instructions = "Press E" ENT.Category = "impulse" ENT.Spawnable = true ENT.AdminOnly = true ENT.HUDName = "Public storage locker" ENT.HUDDesc = "Deposit or withdraw legal items."
nilq/small-lua-stack
null
--unit/attack.lua version 42.06a local utils = require 'utils' validArgs = validArgs or utils.invert({ 'help', 'defender', 'attacker', 'target', 'attack', 'velocity', 'hitchance', 'weapon', 'delay', 'number', }) local args = utils.processArgs({...}, validArgs) if args.help then -- Help de...
nilq/small-lua-stack
null
----------------------------------------- -- ID: 5743 -- Item: marinara_pizza -- Food Effect: 3 hours, all Races ----------------------------------------- -- HP +20 -- Attack +20% (cap 50 @ 250 base attack) -- Accuracy +10% (54) -- Undead Killer ----------------------------------------- require("scripts/globals/status"...
nilq/small-lua-stack
null
-------------------------------------------------------------------------------- -- ДУРА (Дополнительная Универсальная Радиоаппаратура) -------------------------------------------------------------------------------- Metrostroi.DefineSystem("DURA") TRAIN_SYSTEM.DontAccelerateSimulation = true function TRAIN_SYST...
nilq/small-lua-stack
null
require "lfs" infiles = {} fileindex = 0 for f in lfs.dir(".") do if f:match(".woz$") then infiles[#infiles + 1] = f end end table.sort(infiles) function calc(line) return line % 8 * 1024 + math.floor(line / 64) * 40 + math.floor((line%64) / 8) * 128 + 8192 end function textcalc(line) return calc(line * ...
nilq/small-lua-stack
null
local create_room_server_connector = require "uniconn/create_room_server_connector" -- create_connector return function(door_host, is_secure, web_server_port, socket_server_port, disconnected_handler) local connector = create_room_server_connector(socket_server_port, disconnected_handler) local url if is_secure ==...
nilq/small-lua-stack
null
require 'base' class = require 'class' require 'rectangle' vector = require 'vector' progressbar = class { function(self, x, y, w, h, progress) self.progress = progress self.progressupdate = false self.background = {255, 255, 255, 255} self.foreground = {255, 0, 0, 255} self.start = vector(x, y + h/2) sel...
nilq/small-lua-stack
null
local BasePlugin = require "kong.plugins.base_plugin" local RoutesAuditHandler = BasePlugin:extend() RoutesAuditHandler.PRIORITY = 10 function RoutesAuditHandler:new() RoutesAuditHandler.super.new(self, "routes-audit") end function RoutesAuditHandler:init_worker() RoutesAuditHandler.super.init_worker(self) lo...
nilq/small-lua-stack
null