repo_name stringlengths 6 69 | path stringlengths 6 178 | copies stringclasses 278
values | size stringlengths 4 7 | content stringlengths 671 917k | license stringclasses 15
values |
|---|---|---|---|---|---|
HenrytheSlav/OpenRA | lua/sandbox.lua | 84 | 5098 | local sandbox = {
_VERSION = "sandbox 0.5",
_DESCRIPTION = "A pure-lua solution for running untrusted Lua code.",
_URL = "https://github.com/kikito/sandbox.lua",
_LICENSE = [[
MIT LICENSE
Copyright (c) 2013 Enrique García Cota
Permission is hereby granted, free of charge, to an... | gpl-3.0 |
jxlczjp77/skynet | lualib/http/httpd.lua | 101 | 3708 | local internal = require "http.internal"
local table = table
local string = string
local type = type
local httpd = {}
local http_status_msg = {
[100] = "Continue",
[101] = "Switching Protocols",
[200] = "OK",
[201] = "Created",
[202] = "Accepted",
[203] = "Non-Authoritative Information",
[204] = "No Content",... | mit |
gameover5545/maxrobot | plugins/all.lua | 1321 | 4661 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
Madex234/TeleSeed | plugins/all.lua | 1321 | 4661 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
tederis/mta-resources | snowmode/projection.lua | 1 | 10173 | --if true then return end
local sw, sh = guiGetScreenSize ( )
local shader
local screenSource = dxCreateScreenSource ( sw, sh )
local streamedInProjectors = { }
local sectorMatrix = {
{ -1, 1 }, { 0, 1 }, { 1, 1 },
{ -1, 0 }, { 0, 0 }, { 1, 0 },
{ -1, -1 }, { 0, -1 }, { 1, -1 }
}
streamedInSectors... | gpl-3.0 |
xboi209/pvpgn | lua/include/string.lua | 7 | 1737 | --[[
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
This file is a part of the PvPGN Project http://pvpgn.pro
Licensed under the same terms as Lua itself.
]]--
-- Split text into table by delimeter
-- Usage example: string.split("one,two",",")
function string:split(str, sep)
str = str or '%s+'
local st, g ... | gpl-2.0 |
sinaghm/newtabchi | tabchi.lua | 1 | 31480 | #start Tabchi Cli Or Api V5.3 :)
tabchi = dofile('./funcation.lua')
--------------------------------
tabchi_id = tabchi-id
---------------------------------
json = dofile('./libs/JSON.lua')
---------------------------------
serpent = dofile("./libs/serpent.lua")
------~~~~~~~~~~~~~~~~
http = require "socket.http"
-----... | gpl-3.0 |
songweihang/knight | admin/denycc/store.lua | 1 | 1377 | local cjson = require('cjson.safe')
local jencode = cjson.encode
local system_conf = require "config.init"
local denycc_rate_conf = system_conf.denycc_rate_conf
local ngxshared = ngx.shared
local denycc_conf = ngxshared.denycc_conf
local redis_conf = system_conf.redisCo... | mit |
Nether-Machine/NetherMachine | rotations/warrior/protection3.lua | 1 | 21395 | -- NetherMachine Rotation
-- Profile Created by NetherMan
-- Custom Warrior Protection - WoD 6.1.2
-- Created on 05/08/15
-- Updated on 05/11/2015 @ 20:32
-- Version 1.0.2
-- Status: Functional - Beta Stage [ Estimated Completion: ~10% ]
--[[ Notes: Profile developed to match SimCraft T17-Heroic Action Rotation Lists &... | agpl-3.0 |
htx/mmoserver | data/script/TutorialPart_2_9.lua | 5 | 1099 | -- TutorialPart_2_9
-- Get access to Tutorial via ScriptEngine
local script = LuaScriptEngine.getScriptObj();
local SE = ScriptEngine:Init();
local tutorial = SE:getTutorial(script);
-- Verify correct state
local state = tutorial:getState();
-- wait for client to become ready.
while tutorial:getReady() == false do
... | gpl-3.0 |
ArmanIr/Telegrambotarman | plugins/modaration2.lua | 4 | 11067 | local function kick_by_reply_callback(extra, success, result)
if is_administrator(result.from.id) then
send_msg(extra, "You can't kick admin!", ok_cb, false)
else
local del = chat_del_user("chat#id"..result.to.id, "user#id"..result.from.id, ok_cb, false)
if del == false then
send_msg(extra, "Kicki... | gpl-2.0 |
coder-han/hugula | Client/tools/netProtocal/NetProtocalParserCode.lua | 8 | 3668 | ------------------- NetProtocalPaser---------------
local NetAPIList = NetAPIList
NetProtocalPaser = {}
function NetProtocalPaser:parsestring(msg, key, parentTable)
parentTable[key] = msg:ReadString()
end
function NetProtocalPaser:parseinteger(msg, key, parentTable)
parentTable[key] = msg:ReadInt()
e... | mit |
MidflightDigital/ddrsn3-theme | DDR SN3/BGAnimations/ScreenWithMenuElements background/_SN3V2.lua | 2 | 4534 | local t = Def.ActorFrame{
};
local p = {
red = color("1,0,0,0.812"),
green = color("0,1,0,0.812"),
blue = color("0,0,1,0.812"),
yellow = color("1,1,0,0.812"),
pink = color("1,0,1,0.812"),
cyan = color("0,1,1,0.812")
}
local colorPatterns =
{
--first pattern block: YRPBCG with different start indices
... | mit |
M4STERANGEL/M4STER_Bot | plugins/urbandictionary.lua | 16 | 1309 | local command = 'urbandictionary <query>'
local doc = [[```
/urbandictionary <query>
Returns a definition from Urban Dictionary.
Aliases: /ud, /urban
```]]
local triggers = {
'^/urbandictionary[@'..bot.username..']*',
'^/ud[@'..bot.username..']*$',
'^/ud[@'..bot.username..']* ',
'^/urban[@'..bot.username..']*'
}
... | gpl-3.0 |
To0fan/ali | plugins/owners.lua | 20 | 23763 | local function lock_group_namemod(msg, data, target)
local group_name_set = data[tostring(target)]['settings']['set_name']
local group_name_lock = data[tostring(target)]['settings']['lock_name']
if group_name_lock == 'yes' then
return 'Group name is already locked'
else
data[tostring(target)]['settings'... | gpl-2.0 |
hfjgjfg/ssyy | plugins/admin.lua | 230 | 6382 | local function set_bot_photo(msg, success, result)
local receiver = get_receiver(msg)
if success then
local file = 'data/photos/bot.jpg'
print('File downloaded to:', result)
os.rename(result, file)
print('File moved to:', file)
set_profile_photo(file, ok_cb, false)
send_large_msg(rec... | gpl-2.0 |
Nether-Machine/NetherMachine | rotations/rogue/subtlety.lua | 1 | 1363 | -- SPEC ID 261
NetherMachine.rotation.register(261, {
--------------------
-- Start Rotation --
--------------------
-- Interrupts
{ "Kick", "modifier.interrupts" },
-- Buffs
{ "Deadly Poison", {
"!player.buff(Deadly Poison)",
"!player.moving",
}},
{ "Leeching Poison", "!player.buf... | agpl-3.0 |
nabilbendafi/haka | src/haka/test/token-grammar-coroutine.lua | 2 | 1113 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local class = require('class')
require('protocol/ipv4')
local tcp_connection = require('protocol/tcp_connection')
lo... | mpl-2.0 |
b51/uikidcm | Player/Motion/keyframes/km_WebotsNao_KickForwardRight.lua | 19 | 5537 | local mot = {};
mot.servos = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22};
mot.keyframes = {
{
angles = {-0.052, 0.051, 0.911, 0.661, -0.512, -0.827, -0.232, -0.011, -0.387, 1.355, -0.779, 0.048, -0.232, -0.023, -0.357, 1.338, -0.792, 0.003, 1.226, -0.457, 1.300, 0.391, },
stiffness = {0.900, 0.... | gpl-3.0 |
MRAHS/PRIDE-bot | plugins/all.lua | 11 | 4659 | do
data = load_data(_config.moderation.data)
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print... | gpl-2.0 |
notcake/wire | lua/weapons/gmod_tool/stools/wire_namer.lua | 9 | 1584 | TOOL.Category = "Tools"
TOOL.Name = "Namer"
TOOL.Command = nil
TOOL.ConfigName = ""
TOOL.Tab = "Wire"
if ( CLIENT ) then
language.Add( "Tool.wire_namer.name", "Naming Tool" )
language.Add( "Tool.wire_namer.desc", "Names components." )
language.Add( "Tool.wire_namer.0", "Primary: Set name\nSecondary:... | apache-2.0 |
b51/uikidcm | Player/Test/test_new_walk.lua | 3 | 7918 | module(... or "", package.seeall)
require('unix')
webots = false;
darwin = false;
-- mv up to Player directory
unix.chdir('~/Player');
local cwd = unix.getcwd();
-- the webots sim is run from the WebotsController dir (not Player)
if string.find(cwd, "WebotsController") then
webots = true;
cwd = cwd.."/Player"
... | gpl-3.0 |
generalwrex/spacebuild | lua/entities/other_screen/cl_init.lua | 2 | 10346 | include('shared.lua')
language.Add("other_screen", "Life Support Screen")
local MainFrames = {}
function ENT:Initialize()
self.resources = {}
end
local function OpenMenu(um)
local ent = um:ReadEntity()
if not ent then return end
if MainFrames[ent:EntIndex()] and MainFrames[ent:EntIndex()]:IsActive() ... | apache-2.0 |
HumanChan/QuadTreeTest | src/framework/cc/ui/UIStretch.lua | 19 | 3491 |
--[[
Copyright (c) 2011-2014 chukong-inc.com
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 rights
to use, copy, modify, merge, publish, di... | mit |
Kkthnx-WoW/KkthnxUI | KkthnxUI/Libraries/oUF/colors.lua | 2 | 8182 | local parent, ns = ...
local oUF = ns.oUF
local Private = oUF.Private
local frame_metatable = Private.frame_metatable
local colors = {
smooth = {
1, 0, 0,
1, 1, 0,
0, 1, 0
},
health = {49 / 255, 207 / 255, 37 / 255},
disconnected = {.6, .6, .6},
tapped = {.6, .6, .6},
runes = {
{247 / 255, 65 / 255, 57 ... | mit |
williamrussellajb/ESOPublicAddons | LuminaryLib/libs/LibStub.lua | 10 | 1568 | -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
-- LibStub developed for World of Warcraft by above members of the WowAce commu... | bsd-3-clause |
williamrussellajb/ESOPublicAddons | Luminary_Actionbars/libs/LibStub.lua | 10 | 1568 | -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
-- LibStub developed for World of Warcraft by above members of the WowAce commu... | bsd-3-clause |
grongor/school_rfid | lib/nmap-6.40/nselib/rdp.lua | 2 | 10751 | ---
-- A minimal RDP (Remote Desktop Protocol) library. Currently has functionality to determine encryption
-- and cipher support.
--
--
-- @author "Patrik Karlsson <patrik@cqure.net>"
-- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html
--
local bin = require("bin")
local nmap = require("nmap")
local ... | gpl-2.0 |
hynnet/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/lua/socket/ftp.lua | 144 | 9120 | -----------------------------------------------------------------------------
-- FTP support for the Lua language
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
-----------------------------------------------------------------------------
-------------------... | gpl-2.0 |
hawkthorne/hawkthorne-server-lua | src/items/recipes.lua | 2 | 1039 | -----------------------------------------
-- recipes.lua
-- Contains all the crafting recipies that the player can use
-- Created by HazardousPeach
-----------------------------------------
return {
{
{ type='material', name='rock' },
{ type='material', name='stick' },
{ type='weapon', name... | mit |
hynnet/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/lua/ltn12.lua | 127 | 8177 | -----------------------------------------------------------------------------
-- LTN12 - Filters, sources, sinks and pumps.
-- LuaSocket toolkit.
-- Author: Diego Nehab
-- RCS ID: $Id: ltn12.lua,v 1.31 2006/04/03 04:45:42 diego Exp $
-----------------------------------------------------------------------------
-------... | gpl-2.0 |
FalacerSelene/vim-commentable | test/lua-modules/utils.lua | 1 | 4139 | local M = {}
local function maybe_require (modname)
local mod = nil
pcall(function () mod = require(modname) end)
return mod
end
local lfs = maybe_require('lfs')
--[========================================================================]--
--[ extendtable (first, second) {{{ ... | unlicense |
chrisballinger/ChatSecure-Mac | LuaService/prosody/lib/prosody/util/pluginloader.lua | 3 | 1717 | -- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local dir_sep, path_sep = package.config:match("^(%S+)%s(%S+)");
local plugin_dir = {};
for path in (CFG_... | mpl-2.0 |
ZeeBeast/AeiaOTS | data/npc/scripts/runes.lua | 5 | 8209 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCre... | agpl-3.0 |
tmbr54/Kingmaker | game/dota_addons/castle_wars/scripts/vscripts/buildings/race6/upgrade_to_special_1.lua | 1 | 1382 | --Undead Special Spawner
function cast_upgrade(event)
local iPlayerID = event.caster:GetMainControllingPlayer()
--print("iPlayerID", iPlayerID)
local hero = PlayerResource:GetSelectedHeroEntity(iPlayerID)
--print("hero name: ",PlayerResource:GetSelectedHeroName(iPlayerID))
local iTeamNumber = hero:GetTeamNumber(... | apache-2.0 |
aj-gh/pdns | pdns/dnsdistconf.lua | 9 | 4478 | -- == Generic Configuration ==
-- only accept queries (Do53, DNSCrypt, DoT or DoH) from a few subnets
-- see https://dnsdist.org/advanced/acl.html for more details
-- please be careful when dnsdist is deployed in front of a server
-- server granting access based on the source IP, as all queries will
-- seem to origin... | gpl-2.0 |
notcake/wire | lua/wire/stools/gpu.lua | 9 | 7423 | WireToolSetup.setCategory( "Chips, Gates", "Visuals/Screens", "Advanced" )
WireToolSetup.open( "gpu", "GPU", "gmod_wire_gpu", nil, "GPUs" )
if CLIENT then
language.Add("Tool.wire_gpu.name", "GPU Tool (Wire)")
language.Add("Tool.wire_gpu.desc", "Spawns a graphics processing unit")
language.Add("Tool.wire_gpu.0", ... | apache-2.0 |
jameshegarty/rigel | misc/compare/hist.lua | 1 | 1504 | require "comparecommon"
if type(arg[2])~="string" then
print("usage: hist.lua image.raw image.metadata.lua buckets")
os.exit(1)
end
dataPtr, metadata, pixelCount = loadRigelImage(arg[1],arg[2])
-- build histogram
local buckets = tonumber(arg[3])
--print("BUCKETS",buckets)
local maxValue, minValue
local sum = 0
... | mit |
notcake/wire | lua/entities/gmod_wire_egp/lib/init.lua | 18 | 1289 | EGP = {}
--------------------------------------------------------
-- Include all other files
--------------------------------------------------------
function EGP:Initialize()
local Folder = "entities/gmod_wire_egp/lib/egplib/"
local entries = file.Find( Folder .. "*.lua", "LUA")
for _, entry in ipairs( entries ) ... | apache-2.0 |
ZeeBeast/AeiaOTS | data/spells/scripts/newspells/d250.lua | 1 | 4755 | -- SpellCreator generated.
-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_POFF)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombat... | agpl-3.0 |
mobinantispam/botuzz | plugins/gnuplot.lua | 622 | 1813 | --[[
* Gnuplot plugin by psykomantis
* dependencies:
* - gnuplot 5.00
* - libgd2-xpm-dev (on Debian distr) for more info visit: https://libgd.github.io/pages/faq.html
*
]]
-- Gnuplot needs absolute path for the plot, so i run some commands to find where we are
local outputFile = io.popen("pwd","r")
io.input(outputFile... | gpl-2.0 |
m13790115/selfi | plugins/google.lua | 3 | 1060 | local function googlethat(query)
local api = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&"
local parameters = "q=".. (URL.escape(query) or "")
-- Do the request
local res, code = https.request(api..parameters)
if code ~=200 then return nil end
local data = json:decode(res)
local r... | gpl-2.0 |
mobinantispam/botuzz | plugins/quotes.lua | 651 | 1630 | local quotes_file = './data/quotes.lua'
local quotes_table
function read_quotes_file()
local f = io.open(quotes_file, "r+")
if f == nil then
print ('Created a new quotes file on '..quotes_file)
serialize_to_file({}, quotes_file)
else
print ('Quotes loaded: '..quotes_file)
f... | gpl-2.0 |
ga526321/prat | modules/ChannelSticky.lua | 2 | 11429 | ---------------------------------------------------------------------------------
--
-- Prat - A framework for World of Warcraft chat mods
--
-- Copyright (C) 2006-2007 Prat Development Team
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public Lice... | gpl-3.0 |
maciek134/Logistics-Railway | stdlib/entity/entity.lua | 5 | 3482 | --- Entity module
-- @module entity
require 'stdlib/core'
require 'stdlib/surface'
require '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 Entity.to_selection_area(... | mit |
ahmedtaleb93/ahmed.t.h | plugins/addsudo.lua | 6 | 1411 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY jOker ▀▄ ▄▀
▀▄ ▄▀ BY joker (@fuck_8_you) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY joker ▀▄ ▄▀
▀▄ ▄▀ broadcast : اضف مطور ▀▄ ▄▀
▀▄▀... | gpl-3.0 |
aajjbb/lain | util/menu_iterator.lua | 2 | 4997 | --[[
Licensed under GNU General Public License v2
* (c) 2017, Simon Désaulniers <sim.desaulniers@gmail.com>
* (c) 2017, Uli Schlachter
* (c) 2017, Jeferson Siqueira <jefersonlsiq@gmail.com>
--]]
-- Menu iterator with Naughty notifications
-- lain.util.menu_iterator
local naughty = require("na... | gpl-2.0 |
sjznxd/lc-20121230 | modules/admin-mini/luasrc/model/cbi/mini/luci.lua | 81 | 1335 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
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
h... | apache-2.0 |
gdevillele/dockercraft | world/Plugins/APIDump/Hooks/OnKilling.lua | 36 | 1190 | return
{
HOOK_KILLING =
{
CalledWhen = "A player or a mob is dying.",
DefaultFnName = "OnKilling", -- also used as pagename
Desc = [[
This hook is called whenever a {{cPawn|pawn}}'s (a player's or a mob's) health reaches zero. This
means that the pawn is about to be killed, unless a plugin "revives" them... | apache-2.0 |
alirezaSO/cpumb | plugins/Dictionary.lua | 58 | 1663 |
--[[
-- Translate text using Google Translate.
-- http://translate.google.com/translate_a/single?client=t&ie=UTF-8&oe=UTF-8&hl=en&dt=t&tl=en&sl=auto&text=hello
--]]
do
function translate(source_lang, target_lang, text)
local path = "http://translate.google.com/translate_a/single"
-- URL query parameters
local p... | gpl-2.0 |
ibr773/TPBOT | plugins/kickall.lua | 2 | 1742 | --[[
_____ ____ ____ ___ _____
|_ _| _ \ | __ ) / _ \_ _|
| | | |_) | | _ \| | | || |
| | | __/ | |_) | |_| || |
|_| |_| |____/ \___/ |_|
KASPER TP (BY @kasper_dev)
_ __ _ ____ ____ _____ ____ _____ ____
| |/ / / \ / ___|| _ \| ... | gpl-2.0 |
Bobbyjoness/Ben10Game | conf.lua | 1 | 3451 | function love.conf(t)
t.identity = "Ben10Game" -- The name of the save directory (string)
t.version = "0.10.1" -- The LÖVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.accelerometerjoystick = true ... | mit |
LazyZhu/openwrt-luci-trunk-mod | applications/luci-app-radicale/luasrc/model/cbi/radicale.lua | 39 | 27698 | -- Copyright 2015 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- Licensed under the Apache License, Version 2.0
local NXFS = require("nixio.fs")
local DISP = require("luci.dispatcher")
local DTYP = require("luci.cbi.datatypes")
local HTTP = require("luci.http")
local UTIL = require("luci.ut... | apache-2.0 |
Sewerbird/Helios2400 | src/AssetLoader.lua | 1 | 5065 | require "lib/Tserial"
inspect = require 'lib/inspect'
local anim8 = require "lib/anim8"
local class = require 'lib/30log'
local Sprite = require 'src/datatype/Sprite'
local Animation = require 'src/datatype/Animation'
local AssetLoader = class("AssetLoader", {
assets = {},
specs = {},
rootPath = "",
errorPrefix = ... | mit |
LazyZhu/openwrt-luci-trunk-mod | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua | 29 | 3928 | -- Copyright 2010 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local fs = require "nixio.fs"
local util = require "nixio.util"
local has_fscheck = fs.access("/usr/sbin/e2fsck")
local block = io.popen("block info", "r")
local ln, dev, devices = nil, nil, {}
repeat
ln =... | apache-2.0 |
mraosee/AOSEE_H3 | plugins/lock-bot.lua | 1 | 2914 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY AOSEE ▀▄ ▄▀
▀▄ ▄▀ BY AOSEE (@AOSEE_THT) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY AOSEE ▀▄ ▄▀
▀▄ ▄▀ ANTI BOT : منع بوتات ▀▄ ▄▀
▀▄▀▀▄... | gpl-2.0 |
sose12/AOS_SHARO56 | plugins/getlink.lua | 4 | 28101 | --[[
▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀
▀▄ ▄▀ ▀▄ ▄▀
▀▄ ▄▀ BY faeder ▀▄ ▄▀
▀▄ ▄▀ BY faeder (@xXxDev_iqxXx) ▀▄ ▄▀
▀▄ ▄▀ JUST WRITED BY faeder ▀▄ ▄▀
▀▄ ▄▀ A SPECiAL LINK : الرابط خاص ▀▄ ▄▀
▀▄▀... | gpl-2.0 |
oskar456/packages | net/dynapoint/src/dynapoint.lua | 20 | 6015 | #!/usr/bin/lua
--[[
Copyright (C) 2016 Tobias Ilte <tobias.ilte@campus.tu-berlin.de>
This program 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
(at your option) any later v... | gpl-2.0 |
Botnexxx/aryanalireza | plugins/inpm.lua | 243 | 3007 | do
local function pairsByKeys (t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
PenguinToast/PenguinGUI | penguingui/HorizontalLayout.lua | 1 | 1977 | --- Lays out components horizontally.
-- @classmod HorizontalLayout
-- @usage
-- -- Create a horizontal layout manager with padding of 2.
-- local layout = HorizontalLayout(2)
HorizontalLayout = class()
--- Padding between contained components.
HorizontalLayout.padding = nil
--- Vertical alignment of contained compone... | apache-2.0 |
gdevillele/dockercraft | world/Plugins/Core/spawn.lua | 5 | 2174 | function HandleSpawnCommand(Split, Player)
local WorldIni = cIniFile()
WorldIni:ReadFile(Player:GetWorld():GetIniFileName())
local SpawnX = WorldIni:GetValue("SpawnPosition", "X")
local SpawnY = WorldIni:GetValue("SpawnPosition", "Y")
local SpawnZ = WorldIni:GetValue("SpawnPosition", "Z")
local flag = 0
if... | apache-2.0 |
auntieNeo/asterisk-testsuite | tests/channels/SIP/handle_response_refer/test.lua | 5 | 3276 | require "watcher"
function sipp_exec(scenario, name, host, port)
host = host or "127.0.0.1"
port = port or "5060"
local inf = "data.csv"
local p = proc.exec_io("sipp",
"127.0.0.1",
"-m", "1",
"-sf", scenario,
"-inf", "sipp/" .. inf,
"-infindex", inf, "0",
"-i", host,
"-p", port,
"-timeout", "30",
"-timeou... | gpl-2.0 |
sose12/AOS_SHARO56 | plugins/inpm.lua | 4 | 9512 | local function pre_process(msg)
local to = msg.to.type
local service = msg.service
if to == 'user' and msg.fwd_from then
if not is_support(msg.from.id) and not is_admin1(msg) then
return
end
local user = 'user#id'..msg.from.id
local from_id = msg.fwd_from.peer_id
if msg.fwd_from.first_name then
from_f... | gpl-2.0 |
ibr773/TPBOT | plugins/anti_spam.lua | 2 | 7100 | --[[
_____ ____ ____ ___ _____
|_ _| _ \ | __ ) / _ \_ _|
| | | |_) | | _ \| | | || |
| | | __/ | |_) | |_| || |
|_| |_| |____/ \___/ |_|
KASPER TP (BY @kasper_dev)
_ __ _ ____ ____ _____ ____ _____ ____
| |/ / / \ / ___|| _ \| ... | gpl-2.0 |
andyvand/cardpeek | dot_cardpeek_dir/scripts/calypso/c250n901.lua | 17 | 4373 | --
-- This file is part of Cardpeek, the smartcard reader utility.
--
-- Copyright 2009-2013 by 'L1L1'
--
-- Cardpeek 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
-- (a... | gpl-3.0 |
akaStiX/premake-core | tests/actions/vstudio/vc2010/test_imagexex_settings.lua | 16 | 1100 | --
-- tests/actions/vstudio/vc2010/test_compile_settings.lua
-- Validate Xbox 360 XEX image settings in Visual Studio 2010 C/C++ projects.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_vs2010_imagexex_settings")
local vc2010 = premake.vstudio.vc2010
local pr... | bsd-3-clause |
alcherk/mal | lua/step7_quote.lua | 40 | 4344 | #!/usr/bin/env lua
local table = require('table')
local readline = require('readline')
local utils = require('utils')
local types = require('types')
local reader = require('reader')
local printer = require('printer')
local Env = require('env')
local core = require('core')
local List, Vector, HashMap = types.List, typ... | mpl-2.0 |
nuko8/awesome | lib/gears/filesystem.lua | 2 | 5618 | ---------------------------------------------------------------------------
--- Filesystem module for gears
--
-- @module gears.filesystem
---------------------------------------------------------------------------
-- Grab environment we need
local Gio = require("lgi").Gio
local gstring = require("gears.string")
local... | gpl-2.0 |
Duesterwald/Generals | lua/misc.lua | 1 | 2006 | <<
map_size = wesnoth.get_variable("GN_LOCAL_MAP_SIZE")
global_map_size = {wesnoth.get_map_size()}
hex_area = 3 * (map_size * map_size + map_size)
num_villages = hex_area * wesnoth.get_variable("GN_LOCAL_VILLAGE_DENSITY") / 1000
keep_size = wesnoth.get_variable("GN_LOCAL_KEEP_SIZE")
function round(x)
ret... | gpl-2.0 |
smartwifi/stores-rd | meshdesk/MESHdesk/libs/rdSystem.lua | 1 | 4400 | require( "class" )
-------------------------------------------------------------------------------
-- Class used to set up the system settings handed from the config server -----
-- For now it only is the system password and hostname ------------------------
-- It will only do something if there was a change ---------... | gpl-2.0 |
LuttyYang/luci | applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/nut.lua | 18 | 2897 | -- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.nut",package.seeall)
function rrdargs( graph, plugin, plugin_instance, dtype )
local voltages = {
title = "%H: Voltages on UPS \"%pi\"",
vlabel = "V",
number_format = "%5.1lfV",
data = {
instances = {
... | apache-2.0 |
gdevillele/dockercraft | world/Plugins/APIDump/Hooks/OnEntityAddEffect.lua | 36 | 1593 | return
{
HOOK_ENTITY_ADD_EFFECT =
{
CalledWhen = "An entity effect is about to get added to an entity.",
DefaultFnName = "OnEntityAddEffect", -- also used as pagename
Desc = [[
This hook is called whenever an entity effect is about to be added to an entity. The plugin may
disallow the addition by returni... | apache-2.0 |
LuttyYang/luci | applications/luci-app-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/widget.lua | 68 | 1039 | -- Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
-- Licensed to the public under the Apache License 2.0.
local uci = require "luci.model.uci".cursor()
local dsp = require "luci.dispatcher"
local utl = require "luci.util"
local widget = uci:get("freifunk-widgets", arg[1], "template")
local title = uci:get("f... | apache-2.0 |
valkjsaaa/sl4a | lua/src/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | apache-2.0 |
DeNA/redis | deps/lua/test/sort.lua | 889 | 1494 | -- two implementations of a sort function
-- this is an example only. Lua has now a built-in function "sort"
-- extracted from Programming Pearls, page 110
function qsort(x,l,u,f)
if l<u then
local m=math.random(u-(l-1))+l-1 -- choose a random pivot in range l..u
x[l],x[m]=x[m],x[l] -- swap pivot to first posit... | bsd-3-clause |
nuko8/awesome | tests/examples/wibox/awidget/prompt/highlight.lua | 5 | 2543 | local parent = ... --DOC_NO_USAGE --DOC_HIDE
local wibox = require( "wibox" ) --DOC_HIDE
local awful = { prompt = require("awful.prompt") }--DOC_HIDE
local beautiful = require( "beautiful" ) --DOC_HIDE
local amp = "&"..string.char(0x3B)
local quot = """..string.char(0x3B)
local atext... | gpl-2.0 |
sjznxd/lc-20121230 | applications/luci-statistics/luasrc/model/cbi/luci_statistics/rrdtool.lua | 80 | 3431 | --[[
Luci configuration model for statistics - collectd rrdtool plugin configuration
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
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 Licen... | apache-2.0 |
mathiasDJ/OpenComputers-Projects | Big Reactor/client.lua | 1 | 4192 | local component = require("component")
local event = require("event")
local keyboard = require("keyboard")
local serialization = require("serialization")
local term = require("term")
local visual = require("reactorVisual")
local modem
local getServerTimerID
local serverAdress
local port = 54598
local updateSpeed = 1... | gpl-2.0 |
liangxiegame/BitCasual | Client/src/framework/crypto.lua | 20 | 4963 | --[[
Copyright (c) 2011-2014 chukong-inc.com
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 rights
to use, copy, modify, merge, publish, dis... | mit |
sjznxd/lc-20121230 | applications/luci-diag-devinfo/luasrc/controller/luci_diag/netdiscover_common.lua | 76 | 3146 | --[[
Luci diag - Diagnostics controller module
(c) 2009 Daniel Dickinson
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
]]--
module("luci.cont... | apache-2.0 |
sjznxd/lc-20121230 | applications/luci-firewall/luasrc/model/cbi/firewall/forwards.lua | 85 | 3942 | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
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
htt... | apache-2.0 |
gdevillele/dockercraft | world/Plugins/Core/web_players.lua | 6 | 12958 |
-- web_players.lua
-- Implements the Players tab in the webadmin
local ins = table.insert
local con = table.concat
--- Enumerates all players currently connected to the server
-- Returns an array-table in which each item has PlayerName, PlayerUUID and WorldName
local function EnumAllPlayers()
local res = {... | apache-2.0 |
nimaghorbani/dozdi10 | plugins/Moderation.lua | 4 | 10016 | do
local function check_member(cb_extra, success, result)
local receiver = cb_extra.receiver
local data = cb_extra.data
local msg = cb_extra.msg
for k,v in pairs(result.members) do
local member_id = v.id
if member_id ~= our_id then
local username = v.username
data[tostring(m... | gpl-2.0 |
connectFree/lev | lib/lev/querystring.lua | 1 | 1891 | --[[
Copyright 2012 The Luvit Authors.
Copyright 2012 connectFree k.k. and the lev 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/... | apache-2.0 |
aajjbb/lain | layout/centerwork.lua | 2 | 7866 | --[[
Licensed under GNU General Public License v2
* (c) 2018, Eugene Pakhomov
* (c) 2016, Henrik Antonsson
* (c) 2015, Joerg Jaspert
* (c) 2014, projektile
* (c) 2013, Luca CPZ
* (c) 2010-2012, Peter Hofmann
--]]
local floor, max, mouse, mousegrabber,... | gpl-2.0 |
PedroAlvesV/LuaMidi | src/LuaMidi/bit/numberlua.lua | 1 | 13400 | --[[
LUA MODULE
bit.numberlua - Bitwise operations implemented in pure Lua as numbers,
with Lua 5.2 'bit32' and (LuaJIT) LuaBitOp 'bit' compatibility interfaces.
SYNOPSIS
local bit = require 'bit.numberlua'
print(bit.band(0xff00ff00, 0x00ff00ff)) --> 0xffffffff
-- Interface providing strong Lua 5.2 '... | mit |
sjznxd/lc-20121230 | applications/luci-radvd/luasrc/model/cbi/radvd/dnssl.lua | 82 | 2276 | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
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
$Id: rdnss.lu... | apache-2.0 |
akaStiX/premake-core | tests/api/test_string_kind.lua | 9 | 1397 | --
-- tests/api/test_string_kind.lua
-- Tests the string API value type.
-- Copyright (c) 2012 Jason Perkins and the Premake project
--
T.api_string_kind = {}
local suite = T.api_string_kind
local api = premake.api
--
-- Setup and teardown
--
function suite.setup()
api.register {
name = "testapi",
kind ... | bsd-3-clause |
ga526321/prat | modules/Experimental.lua | 2 | 1316 | Prat:AddModuleToLoad(function()
local PRAT_MODULE = Prat:RequestModuleName("Experimental")
if PRAT_MODULE == nil then
return
end
PE = Prat:NewModule(PRAT_MODULE, "AceHook-3.0")
function PE:OnModuleEnable()
CHAT_CONFIG_CHAT_RIGHT[7] = {
text = CHAT_MSG_WHISPER_INFORM,
type = "WHISPER_INFORM",
che... | gpl-3.0 |
aqasaeed/creed | plugins/welcome.lua | 190 | 3526 | local add_user_cfg = load_from_file('data/add_user_cfg.lua')
local function template_add_user(base, to_username, from_username, chat_name, chat_id)
base = base or ''
to_username = '@' .. (to_username or '')
from_username = '@' .. (from_username or '')
chat_name = string.gsub(chat_name, '_', ' ') or ''
c... | gpl-2.0 |
LazyZhu/openwrt-luci-trunk-mod | applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua | 68 | 2502 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.sys")
local devices = luci.sys.net.devices()
m = Map("luci_statistics",
translate("Netlink Plugin Configuration"),
translate(
"The netlink plugin collects extended informa... | apache-2.0 |
thinkry/some-mmorpg | 3rd/skynet/lualib/snax/gateserver.lua | 1 | 3433 | -- 官方提供的gateserver
-- 这里注册了PTYPE_SOCKET类型消息的处理函数,所以socket消息会通过netpack.filter处理后,交给MSG来处理
-- 这里的MSG主要做了连接数管理、nodelay管理、有多个消息时调用多次这些“额外操作”,让handler更简化了
local skynet = require "skynet"
local netpack = require "netpack"
local socketdriver = require "socketdriver"
local gateserver = {}
local socket -- listen socket
local... | mit |
liangxiegame/BitCasual | Client/src/app/utils/QTimer.lua | 1 | 1851 | --[[
定时器类
]]
QTimer = {
m_scheduler = cc.Director:getInstance():getScheduler(),
m_timers = {}
}
--[[
启动定时器
@param callback 回调方法
@param interval 间隔
@param runCount 运行次数
@param data 数据
@return timerId
]]
function QTimer:start(callback, interval, runCount, data)
local timerId
local onTick = function(... | mit |
LuttyYang/luci | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/proto_ahcp.lua | 84 | 2006 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
local map, section, net = ...
local device, apn, service, pincode, username, password
local ipv6, maxwait, defaultroute, metric, peerdns, dns,
keepalive_failure, keepalive_interval, demand
mca = s:tabop... | apache-2.0 |
MustaphaTR/MustaphaTR-s-D2K-Mod | mods/mtrsd2k/maps/ordos-04/ordos04.lua | 1 | 5415 | Base =
{
Harkonnen = { HRefinery, SHeavyFactory, SLightFactory, HGunTurret1, HGunTurret2, HGunTurret3, HGunTurret4, HGunTurret5, SBarracks, HPower1, HPower2, HPower3, HPower4 },
Smugglers = { SOutpost, SHeavyFactory, SLightFactory, SGunTurret1, SGunTurret2, SGunTurret3, SGunTurret4, SBarracks, SPower1, SPower2, SPow... | gpl-3.0 |
dev-Maximus/ProtectionTeam | libs/lua-redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | gpl-3.0 |
sose12/AOS_SHARO56 | libs/lua-redis.lua | 580 | 35599 | local redis = {
_VERSION = 'redis-lua 2.0.4',
_DESCRIPTION = 'A Lua client library for the redis key value storage system.',
_COPYRIGHT = 'Copyright (C) 2009-2012 Daniele Alessandri',
}
-- The following line is used for backwards compatibility in order to keep the `Redis`
-- global module name. Using... | gpl-2.0 |
viszkoktamas/OpenRA | lua/sandbox.lua | 84 | 5098 | local sandbox = {
_VERSION = "sandbox 0.5",
_DESCRIPTION = "A pure-lua solution for running untrusted Lua code.",
_URL = "https://github.com/kikito/sandbox.lua",
_LICENSE = [[
MIT LICENSE
Copyright (c) 2013 Enrique García Cota
Permission is hereby granted, free of charge, to an... | gpl-3.0 |
ahmedtaleb93/ahmed.t.h | plugins/all.lua | 16 | 4339 | do
local function get_msgs_user_chat(user_id, chat_id)
local user_info = {}
local uhash = 'user:'..user_id
local user = redis:hgetall(uhash)
local um_hash = 'msgs:'..user_id..':'..chat_id
user_info.msgs = tonumber(redis:get(um_hash) or 0)
user_info.name = user_print_name(user)..' ['..user_id..']'
return u... | gpl-3.0 |
thinkry/some-mmorpg | 3rd/skynet/lualib/http/httpd.lua | 101 | 3708 | local internal = require "http.internal"
local table = table
local string = string
local type = type
local httpd = {}
local http_status_msg = {
[100] = "Continue",
[101] = "Switching Protocols",
[200] = "OK",
[201] = "Created",
[202] = "Accepted",
[203] = "Non-Authoritative Information",
[204] = "No Content",... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.