repo_name
stringlengths
6
78
path
stringlengths
4
206
copies
stringclasses
281 values
size
stringlengths
4
7
content
stringlengths
625
1.05M
license
stringclasses
15 values
moodlIMyIl/DEVTSHAKE
libs/serpent.lua
656
7877
local n, v = "serpent", 0.28 -- (C) 2012-15 Paul Kulchenko; MIT License local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} local badtype = {thread = true, userdata = true, cdata = true} lo...
gpl-2.0
kyuu/dynrpg-rpgss
assets/Scripts/extensions/textbox/TextBox.lua
1
6560
require "system" require "utility" require "extensions.cache" TextBox = class { __name = "TextBox", palette = { 0xFFFFFFFF, -- 1st color: white 0xFF0000FF, -- 2nd color: red 0x008000FF, -- 3rd color: green 0x0000FFFF, -- 4th color: blue 0xFFFF00FF -- 5th color: yel...
mit
JOVETEAM/tabchi
base.lua
2
1256
serpent = (loadfile "serpent.lua")() tdcli = dofile('tdcli.lua') redis = (loadfile "redis.lua")() tabchi_id = "TABCHI-ID" function vardump(value) return serpent.block(value,{comment=false}) end function reload() tabchi = dofile("tabchi.lua") end function dl_cb (arg, data) end reload() function tdcli_update_cal...
gpl-3.0
jcmarsh/opera
hex_tile.lua
1
7648
Hex = {orig_x = 0, orig_y = 0, width = 104, height = 90, index = 0, color = {r = 220, g = 0, b = 0}, center = {r = 255, g = 255, b = 0}, tris = {}, revealed = false, hex_type = {}} function Hex:new(o) o = o or {} setmetatable(o, self) self.__index = self return o end function Hex:initTris() ext...
gpl-3.0
meirfaraj/tiproject
finance/src/proba/i18n.lua
1
2387
-------------------------------------------------------------------------- -- Local dependents -- -------------------------------------------------------------------------- require("std/symbols") require("std/i18n") ABOUT_TITLE_ID = 1 ABOUT_ID = 2 ERROR_TITLE_ID = ...
apache-2.0
shadoalzupedy/shadow
bot/seedbot.lua
22
14096
package.path = package.path .. ';.luarocks/share/lua/5.2/?.lua' ..';.luarocks/share/lua/5.2/?/init.lua' package.cpath = package.cpath .. ';.luarocks/lib/lua/5.2/?.so' require("./bot/utils") local f = assert(io.popen('/usr/bin/git describe --tags', 'r')) VERSION = assert(f:read('*a')) f:close() -- This function is ...
gpl-2.0
mana/manaserv
example/scripts/damage.lua
3
1468
--[[ Offers damage functions --]] local monster_class_damage_functions = {} function MonsterClass:on_damaged(func) monster_class_damage_functions[self] = func end -- damage is a table with these keys: -- base, delta, chance_to_hit function Entity:damage(source, damage) local hp_loss = math.random(damage.b...
gpl-2.0
sartura/packages
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/ltq-dsl.lua
16
3707
local ubus = require "ubus" local function scrape() local dsl_line_attenuation = metric("dsl_line_attenuation_db", "gauge") local dsl_signal_attenuation = metric("dsl_signal_attenuation_db", "gauge") local dsl_snr = metric("dsl_signal_to_noise_margin_db", "gauge") local dsl_aggregated_transmit_power = metric("...
gpl-2.0
shadoalzupedy/shadow
plugins/lock_badword.lua
17
1307
--[[ # #ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ #:(( # For More Information ....! # Developer : Aziz < @TH3_GHOST > # our channel: @DevPointTeam # Version: 1.1 #:)) #ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ # ]] lo...
gpl-2.0
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/mapstop100/mapstop100_c.lua
3
20129
MapList = {} -- All maps on the server Map100 = {} -- All nominated maps MapsList = {} -- All maps on the server, detailed VoterList = {} -- All voters, detailed GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, gridlist = {}, combobox = {}, image = {...
mit
HEYAHONG/nodemcu-firmware
tests/NTest_tmr.lua
6
2261
local N = ... N = (N or require "NTest")("tmr") N.testasync('SINGLE alarm', function(next) local t = tmr.create(); local count = 0 t:alarm(200, tmr.ALARM_SINGLE, function() count = count + 1 ok(count <= 1, "only 1 invocation") next() end) ok(true, "sync end") end) N.testasync('SEMI ...
mit
elmindreda/bgfx
scripts/bgfx.lua
13
4430
-- -- Copyright 2010-2016 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- function bgfxProject(_name, _kind, _defines) project ("bgfx" .. _name) uuid (os.uuid("bgfx" .. _name)) kind (_kind) if _kind == "SharedLib" then defines { "BGFX_SHARED...
bsd-2-clause
adib1380/antispam
plugins/rss.lua
700
5434
local function get_base_redis(id, option, extra) local ex = '' if option ~= nil then ex = ex .. ':' .. option if extra ~= nil then ex = ex .. ':' .. extra end end return 'rss:' .. id .. ex end local function prot_url(url) local url, h = string.gsub(url, "http://", "") local...
gpl-2.0
LuaDist2/rpi-gpio
lua/scripts/test_switches.lua
3
1444
#!/usr/bin/lua local GPIO=require "GPIO" -- based on the sample at http://blog.oscarliang.net/use-gpio-pins-on-raspberry-pi/ GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(0) GPIO.setup(16, GPIO.IN) GPIO.setup(18, GPIO.IN) GPIO.setup(11, GPIO.OUT) GPIO.setup(13, GPIO.OUT) GPIO.setup(15, GPIO.OUT) GPIO.output(11, GPIO....
mit
parsanoe160/aqil1381
libs/dateparser.lua
114
6213
local difftime, time, date = os.difftime, os.time, os.date local format = string.format local tremove, tinsert = table.remove, table.insert local pcall, pairs, ipairs, tostring, tonumber, type, setmetatable = pcall, pairs, ipairs, tostring, tonumber, type, setmetatable local dateparser={} --we shall use the host OS's...
agpl-3.0
hussian1997/bot_Iraq1997
plugins/ar-h2.lua
2
2150
--[[ ▀▄ ▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀▄▀▄▄▀▀▄▄▀▀▄▄▀▀▄▄▀▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ BY(@AHMED_ALOBIDE) ▀▄ ▄▀ ▀▄ ▄▀ BY(@hussian_9) ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ▀▄ ▄▀ ( لاوامر 2) ▀▄ ▄▀ ▀▄▀...
gpl-2.0
opentechinstitute/luci
applications/luci-wol/luasrc/model/cbi/wol.lua
37
2522
--[[ 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 ]]-- local sy...
apache-2.0
FreeScienceCommunity/PLPlot
examples/lua/x18.lua
1
3787
--[[ 3-d line and point plot demo. Adapted from x08c.c. Copyright (C) 2008 Werner Smekal This file is part of PLplot. PLplot is free software you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation either version 2 o...
lgpl-2.1
victorbriz/rethinkdb
external/v8_3.30.33.16/tools/gcmole/gccause.lua
157
2313
-- Copyright 2011 the V8 project authors. All rights reserved. -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are -- met: -- -- * Redistributions of source code must retain the above copyright -- notice, this list of ...
agpl-3.0
JOVETEAM/tabchi
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
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/tests/lua-tests/src/VideoPlayerTest/VideoPlayerTest.lua
6
6001
local visibleRect = cc.Director:getInstance():getOpenGLView():getVisibleRect() local centerPos = cc.p(visibleRect.x + visibleRect.width / 2,visibleRect.y + visibleRect.height /2) local function VideoPlayerTest() local layer = cc.Layer:create() --createTestLayer("VideoPlayerTest", "") titleLabel = cc.Label:cr...
mit
weizhenwei/wireshark
test/lua/tvb.lua
32
30608
---------------------------------------- -- script-name: tvb.lua -- This tests the Tvb/TvbRange and proto_add_XXX_item API. ---------------------------------------- ------------- general test helper funcs ------------ local FRAME = "frame" local OTHER = "other" local total_tests = 0 local function getTotal() retu...
gpl-2.0
Winless/NPLRuntime
Client/trunk/externals/bullet3/build3/premake4.lua
6
4628
solution "0_Bullet3Solution" local osversion = os.getversion() print(string.format(" %d.%d.%d (%s)", osversion.majorversion, osversion.minorversion, osversion.revision, osversion.description)) -- Multithreaded compiling if _ACTION == "vs2010" or _ACTION=="vs2008" then buildoptions { "/MP" } e...
gpl-2.0
chris-wood/RIOT
dist/tools/wireshark_dissector/riot.lua
21
2130
-- RIOT native support for Wireshark -- A Lua implementation for dissection of RIOT native packets in wireshark -- @Version: 0.0.1 -- @Author: Martine Lenders -- @E-Mail: mlenders@inf.fu-berlin.de do --Protocol name "RIOT" local p_riot = Proto("RIOT", "RIOT native packet") --Protocol Fields local f_le...
lgpl-2.1
cyanskies/OpenRA
mods/cnc/maps/nod05/nod05.lua
10
10833
NodUnitsVehicle = { 'bike', 'bike', 'bggy', 'ltnk', 'bike', 'bike' } NodUnitsRocket = { 'e1', 'e1', 'e1', 'e1' } NodUnitsGunner = { 'e3', 'e3', 'e3', 'e3' } GDIReinforceUnits = { 'e2', 'e2', 'e2', 'e2', 'e2' } Gdi1Units = { ['e1'] = 3, ['e2'] = 1 } Gdi2Units = { ['e1'] = 2, ['e2'] = 1 } Gdi3Units = { ['jeep'] = 1 } Gd...
gpl-3.0
SiENcE/APE
ui_scripts/ui_shape.lua
2
4330
local l_gfx = love.graphics -- these are various UI shapes Rectangle = {} Rectangle.__index = Rectangle Rectangle.ident = "ui_rectangle" Rectangle.name = "Rectangle" Rectangle.centerOnPos = false function Rectangle:new(name) local self = {} setmetatable(self,Rectangle) self.mode = "fill" if name ~= nil then self...
mit
LuaDist2/oil
lua/oil/corba/intercepted/Requester.lua
6
6750
local select = select local unpack = unpack local oo = require "oil.oo" local giop = require "oil.corba.giop" local Requester = require "oil.corba.giop.Requester" --[[VERBOSE]] local verbose = require "oil.verbose" module "oil.corba.intercepted.Requester" oo.class(_M, Requeste...
mit
cleme1mp/dotfiles
hammerspoon/modes/cheatsheet.lua
1
7833
------------------------------------------------------------------------ --/ Cheatsheet Copycat /-- ------------------------------------------------------------------------ --commandEnum = { -- [0] = '⌘', -- [1] = '⇧ ⌘', -- [2] = '⌥ ⌘', -- [3] = '⌥ ⇧ ⌘', -- [4] = '⌃ ⌘', -- [5]...
mit
osa1/language-lua
lua-5.3.1-tests/tpack.lua
5
10371
-- $Id: tpack.lua,v 1.10 2014/12/26 17:20:53 roberto Exp $ local pack = string.pack local packsize = string.packsize local unpack = string.unpack print "testing pack/unpack" -- maximum size for integers local NB = 16 local sizeshort = packsize("h") local sizeint = packsize("i") local sizelong = packsize("l") local ...
bsd-3-clause
mobarski/sandbox
scite/old/wscite_zzz/lexers/notused/faust.lua
5
1627
-- Copyright 2015-2017 David B. Lamkins <david@lamkins.net>. See LICENSE. -- Faust LPeg lexer, see http://faust.grame.fr/ local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'faust'} -- Whitespace. local ws = token(l.WHITESPACE, l.space...
mit
AliKhodadad/zed-spam
plugins/meme.lua
637
5791
local helpers = require "OAuth.helpers" local _file_memes = './data/memes.lua' local _cache = {} local function post_petition(url, arguments) local response_body = {} local request_constructor = { url = url, method = "POST", sink = ltn12.sink.table(response_body), headers = {}, red...
gpl-2.0
adib1380/antispam
plugins/search_youtube.lua
674
1270
do local google_config = load_from_file('data/google.lua') local function httpsRequest(url) print(url) local res,code = https.request(url) if code ~= 200 then return nil end return json:decode(res) end local function searchYoutubeVideos(text) local url = 'https://www.googleapis.com/youtube/v3/search?' u...
gpl-2.0
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/gcshop/items/items_gui.lua
1
11334
------------------------------------- -- Code generated by DKR QT to Lua 0.1.7 -- -- Source: items.ui -- -- Date: 20/12/2012 - 01:19:10 -- ------------------------------------- function build_itemsWidget(parent, offsetX, offsetY) local gui = {} gui._placeHolders = {} local widgetWidth, widgetHeight = 780, 105...
mit
adamflott/wargus
scripts/menus/replay.lua
1
2135
function RunReplayGameMenu() local menu = WarMenu(nil, panel(5), false) menu:setSize(352, 352) menu:setPosition((Video.Width - 352) / 2, (Video.Height - 352) / 2) menu:setDrawMenusUnder(true) menu:addLabel(_("Select Game"), 352 / 2, 11) local browser = menu:addBrowser("~logs/", "%.log%.?g?z?$", (352 -...
gpl-2.0
stubbfel/blob2wireshark
src/b2ws-plugin/b2ws_const.lua
1
1629
module("b2ws_const") B2WS_PLUGIN_PATH = "plugins/b2ws-plugin/" B2WS_IMPORT_BLOB_FILE = "b2ws_import.lua" B2WS_CREATE_SNIPPET_FILE = "b2ws_snippet.lua" B2WS_UTIL_FILE = "b2ws_util.lua" B2WS_DISSECTOR_TEMPLATE_FILE = "b2ws_dissector.template" B2WS_DISSECTOR_EXTENSION= ".dissector.lua" B2WS_PLUGIN_CONFIG_FILE_NAME = "b2ws...
mit
UB12/y_r
plugins/boobs.lua
731
1601
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
mehrdadneyazy78/-S-Bot
plugins/boobs.lua
731
1601
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
ioiasff/khp
plugins/boobs.lua
731
1601
do -- Recursive function local function getRandomButts(attempt) attempt = attempt or 0 attempt = attempt + 1 local res,status = http.request("http://api.obutts.ru/noise/1") if status ~= 200 then return nil end local data = json:decode(res)[1] -- The OpenBoobs API sometimes returns an empty array if no...
gpl-2.0
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/hdwheels/script.lua
1
1796
function replaceModel() dff = engineLoadDFF ( "wheels/wheel_or1.dff", 1025 ) engineReplaceModel ( dff, 1025 ) dff = engineLoadDFF ( "wheels/wheel_sr6.dff", 1073 ) engineReplaceModel ( dff, 1073 ) dff = engineLoadDFF ( "wheels/wheel_sr3.dff", 1074 ) engineReplaceModel ( dff, 1074 ) dff = engineLo...
mit
wangfakang/lua-resty-http
lib/resty/http.lua
6
21361
local http_headers = require "resty.http_headers" local ngx_socket_tcp = ngx.socket.tcp local ngx_req = ngx.req local ngx_req_socket = ngx_req.socket local ngx_req_get_headers = ngx_req.get_headers local ngx_req_get_method = ngx_req.get_method local str_gmatch = string.gmatch local str_lower = string.lower local str_u...
bsd-2-clause
ZeroNoFun/Gmod-Aperture-science-laboratories
lua/entities/ent_portal_floor_turret.lua
2
1889
AddCSLuaFile( ) ENT.Base = "gasl_turret_base" ENT.PrintName = "Default Turret" ENT.Category = "Aperture Science" ENT.Spawnable = true ENT.RenderGroup = RENDERGROUP_BOTH ENT.AutomaticFrameAdvance = true function ENT:SpawnFunction( ply, trace, ClassName ) if ( !APERTURESCIENCE.ALLOWING.turret && !ply:IsSuperA...
mit
opentechinstitute/luci
libs/nixio/axTLS/www/lua/download.lua
180
1550
#!/usr/local/bin/lua require"luasocket" function receive (connection) connection:settimeout(0) local s, status = connection:receive (2^10) if status == "timeout" then coroutine.yield (connection) end return s, status end function download (host, file, outfile) --local f = assert (io.open (outfile, "w")) loc...
apache-2.0
Shell64/LuaWebserver2
Webserver/Source/Methods/HEAD.lua
1
7208
local HTTP = HTTP local function NotFound(URL) URL = "/" .. URL return [[ <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title></title> </head> <body> <h1 style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; let...
lgpl-2.1
ludamad/hashkat
src/dependencies/lua-repl/t/plugin-basic-tests.lua
3
3342
local repl = require 'repl' local utils = require 'test-utils' pcall(require, 'luarocks.loader') require 'Test.More' plan(21) local clone = repl:clone() do -- basic tests {{{ local loaded clone:loadplugin(function() loaded = true end) ok(loaded) error_like(function() clone:loadplugin(function()...
gpl-3.0
JarnoVgr/Mr.Green-MTA-Resources
resources/[race]/race/fixedvehiclecolors.lua
4
1323
g_FixedColorVehicles = { [416] = {1, 3, 0, 0}, [433] = {43, 0, 0, 0}, [438] = {6, 76, 0, 0}, [406] = {1, 1, 0, 0}, [407] = {3, 1, 0, 0}, [486] = {1, 1, 0, 0}, [427] = {0, 1, 0, 0}, [490] = {0, 0, 0, 0}, [425] = {43, 0, 0, 0}, [470] = {43, 0, 0, 0}, [430] = {46, 26, 0, 0}, [448] = {3, 6, 0, 0}, [464] = {14,...
mit
mehrdadneyazy78/-S-Bot
plugins/get.lua
613
1067
local function get_variables_hash(msg) if msg.to.type == 'chat' then return 'chat:'..msg.to.id..':variables' end if msg.to.type == 'user' then return 'user:'..msg.from.id..':variables' end end local function list_variables(msg) local hash = get_variables_hash(msg) if hash then local names =...
gpl-2.0
lizh06/premake-core
src/base/validation.lua
7
5343
--- -- base/validation.lua -- -- Verify the contents of the project object before handing them off to -- the action/exporter. -- -- Copyright (c) 2002-2015 Jason Perkins and the Premake project --- premake.validation = {} local m = premake.validation local p = premake m.elements = {} --- -- Validate the global...
bsd-3-clause
46bit/turtles
bit_excavate.lua
1
10361
local tArgs = { ... } -- Excavates holes with a mining turtle. -- pastebin get V2pQK64w github -- github get 46bit turtles master bit_excavate.lua bit_excavate -- bit_excavate 6 15 10 -- Digs a 6-wide, 15-deep hole in a line 10 times, forming a 6-wide 60-long 15-deep chamber. -- x,z are on the horizontal plane ...
mit
oktayari/sipml5
asterisk/etc/extensions.lua
317
5827
CONSOLE = "Console/dsp" -- Console interface for demo --CONSOLE = "DAHDI/1" --CONSOLE = "Phone/phone0" IAXINFO = "guest" -- IAXtel username/password --IAXINFO = "myuser:mypass" TRUNK = "DAHDI/G2" TRUNKMSD = 1 -- TRUNK = "IAX2/user:pass@provider" -- -- Extensions are expected to be defined in a global table ...
bsd-3-clause
cyberz-eu/octopus
extensions/shop/src/controller/catalog/CategoryPageController.lua
1
3171
local json = require "json" local parse = require "parse" local property = require "property" local localization = require "localization" local database = require "database" local exception = require "exception" local exceptionHandler = require "exceptionHandler" local util = require "util" local localeService ...
bsd-2-clause
FreeScienceCommunity/PLPlot
examples/lua/x00.lua
1
1525
--[[ Simple demo of a 2D line plot. Copyright (C) 2011 Alan W. Irwin Copyright (C) 2012 Andrew Ross This file is part of PLplot. PLplot is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation;...
lgpl-2.1
meirfaraj/tiproject
finance/src/finance/i18n/fr.lua
1
11850
-- replace xxx Faraj Meir -- replace yyy meirfaraj@gmail.com FR = 2 addLocale(FR,"fr", "français") addTextLocale(ABOUT_TITLE_ID,FR,"A propos de finance :") addTextLocale(ABOUT_ID,FR,[[Finance v1.0 -------------------- xxx Merci à : Jim Bauwens, Adrien "Adriweb" Bertrand (inspiré de FormulaPro). Licence LGPL3. Locale:...
apache-2.0
ashkanpj/fire
plugins/webshot.lua
919
1473
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
hfjgjfg/amir2
plugins/webshot.lua
919
1473
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
Shell64/LuaWebserver2
Webserver/Libraries/SHA1/SHA1.lua
1
2864
------------------------------------------------- --- *** SHA-1 algorithm for Lua *** --- ------------------------------------------------- --- Author: Martin Huesser --- --- Date: 2008-06-16 --- --- License: You may use this code in your --- --- project...
lgpl-2.1
daurnimator/lua-http
spec/h2_connection_spec.lua
1
8934
describe("http2 connection", function() local h2_connection = require "http.h2_connection" local new_headers = require "http.headers".new local cqueues = require "cqueues" local ca = require "cqueues.auxlib" local cc = require "cqueues.condition" local ce = require "cqueues.errno" local cs = require "cqueues.soc...
mit
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/scoreboard/dxscoreboard_rt.lua
3
6702
-- -- dxscoreboard_rt.lua -- -- Scoreboard render target support stuff -- local rt local lastUpdateTime = 0 -- drawScoreboard -- Do things depending on things function drawScoreboard() cursorCache = {} if #savedRowsNext > 0 then savedRows = savedRowsNext savedRowsNext = {} end if not scoreboardDrawn then ...
mit
minecraftgame-andrd/minecraftgame
plugins/loc.lua
185
1565
-- Implement a command !loc [area] which uses -- the static map API to get a location image -- Not sure if this is the proper way -- Intent: get_latlong is in time.lua, we need it here -- loadfile "time.lua" -- Globals -- If you have a google api key for the geocoding/timezone api do local api_key = nil local base_...
gpl-2.0
UB12/y_r
plugins/moderation.lua
336
9979
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
cyberz-eu/octopus
extensions/shop/src/module/PriceService.lua
1
6073
local exception = require "exception" local userService = require "userService" local countryService = require "countryService" local function currencyToCurrencyRate (from ,to) if from == "BGN" and to == "EUR" then return 0.51 elseif from == "BGN" and to == "GBP" then return 0.37 elseif from == "EU...
bsd-2-clause
opentechinstitute/luci
applications/luci-diag-devinfo/luasrc/model/cbi/luci_diag/smap_devinfo.lua
141
1038
--[[ smap_devinfo - SIP Device Information (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 $Id$ ]]-- require("luci.i18n") re...
apache-2.0
ncarlson/eiga
jit/dis_x86.lua
3
29330
---------------------------------------------------------------------------- -- LuaJIT x86/x64 disassembler module. -- -- Copyright (C) 2005-2011 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h --------------------------------------------------------------------------...
mit
tianxiawuzhei/cocos-quick-cpp
publibs/libzq/auto_buildings/api/ZQPlistManage.lua
2
2988
-------------------------------- -- @module ZQPlistManage -- @parent_module zq -------------------------------- -- -- @function [parent=#ZQPlistManage] alias -- @param self -- @param #cc.Value plist -- @param #string key -- @return ZQPlistManage#ZQPlistManage self (return value: zq.ZQPlistManage) ---------...
mit
uonline/debut
src/day2/act5/stage4/stage4.room.lua
1
2825
-- Перходы -- Переход на 5 этаж tower_stage4_to_stage5 = vroom('Лестница', 'tower_stage5') tower_stage4_to_stage5:disable() -- Возврат на второй этаж tower_stage4_back_to_stage2 = room { nam = 'Лестница'; enter = function() -- Включаем признак начала нового цикла прохождения по этажам _tower_stage2_new_loop_puzz...
gpl-3.0
ZeroNoFun/Gmod-Aperture-science-laboratories
lua/effects/fizzler_dissolve.lua
2
1875
function EFFECT:Init( data ) self.eEntity = data:GetEntity() if ( !self.eEntity:IsValid() ) then return end self.Emitter = ParticleEmitter( self.eEntity:GetPos() ) local min, max = self.eEntity:GetModelBounds() local randVec = Vector( math.Rand( min.x, max.x ), math.Rand( min.y, max.y ), math.Rand( min.z, max...
mit
ioiasff/khp
plugins/minecraft.lua
624
2605
local usage = { "!mine [ip]: Searches Minecraft server on specified ip and sends info. Default port: 25565", "!mine [ip] [port]: Searches Minecraft server on specified ip and port and sends info.", } local ltn12 = require "ltn12" local function mineSearch(ip, port, receiver) --25565 local responseText = "" l...
gpl-2.0
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/tests/lua-tests/src/Physics3DTest/Physics3DTest.lua
6
28425
local START_POS_X = -0.5 local START_POS_Y = -2.5 local START_POS_Z = -0.5 local ARRAY_SIZE_X = 4 local ARRAY_SIZE_Y = 3 local ARRAY_SIZE_Z = 4 ---------------------------------------- ----Physics3DTestDemo ---------------------------------------- local Physics3DTestDemo = class("Physics3DTestDemo", function () -...
mit
TeleDALAD/m
plugins/arabic_lock.lua
30
1090
antiarabic = {}-- An empty table for solving multiple kicking problem do local function run(msg, matches) if is_momod(msg) then -- Ignore mods,owner,admins return end local data = load_data(_config.moderation.data) if data[tostring(msg.to.id)]['settings']['lock_arabic'] then if data[tostring(msg.to.id...
gpl-2.0
FarGroup/FarManager
enc/tools/lua/lua/lxsh/highlighters/init.lua
3
5924
--[[ Infrastructure to make it easier to define syntax highlighters. Author: Peter Odding <peter@peterodding.com> Last Change: September 29, 2011 URL: http://peterodding.com/code/lua/lxsh/ The syntax highlighters in the LXSH module decorate the token streams produced by the lexers with the following additional...
bsd-3-clause
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/tests/lua-tests/src/PhysicsTest/PhysicsTest.lua
1
77040
local size = cc.Director:getInstance():getWinSize() local MATERIAL_DEFAULT = cc.PhysicsMaterial(0.1, 0.5, 0.5) local curLayer = nil local STATIC_COLOR = cc.c4f(1.0, 0.0, 0.0, 1.0) local DRAG_BODYS_TAG = 0x80 local function range(from, to, step) step = step or 1 return function(_, lastvalue) local nextvalue = l...
mit
luanorlandi/Swift-Space-Battle
src/player/data.lua
2
2710
PlayerData = {} PlayerData.__index = PlayerData function PlayerData:new() local P = {} setmetatable(P, PlayerData) P.active = true P.lives = 3 P.score = 0 P.combo = 1 P.alive = true -- save ship aim -- when use a life, will restore the same aim P.aim = Vector:new(0, 1) -- up return P end functio...
gpl-3.0
abaez/ta-moonscript
moonscript.lua
2
5903
--- Moonscript LPeg lexer. -- See @{README.md} for details on usage. Used Mitchell's lua and original -- Leaf's moonscript lexer for reference. -- @author [Alejandro Baez](https://twitter.com/a_baez) -- @copyright 2016 -- @license MIT (see LICENSE) -- @module moonscript local l = require("lexer") local token, word_mat...
mit
mess-gd/InterruptAnnouncer
InterruptAnnouncer.lua
1
8562
------------------------------------------------- -- Interrupt Announcer for WoW 1.12.1 ------------------------------------------------- -- Currently not intended for pure silences, -- stuns, etc. ------------------------------------------------- INTANN = {} INTANN.Version = { ["MAJOR"] = 0, ["MINOR"] = 1 } ...
gpl-3.0
nmeyerhans/packages
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/bmx7.lua
76
2091
#!/usr/bin/lua local json = require "cjson" local function interpret_suffix(rate) if rate ~= nil then local value = string.sub(rate, 1, -2) local suffix = string.sub(rate, -1) if suffix == "K" then return tonumber(value) * 10^3 end if suffix == "M" then return tonumber(value) * 10^6 end if suffi...
gpl-2.0
12-South-Studios/realmmud
Data/baroch/items_container.lua
1
1263
-- BAROCH/ITEMS_CONTAINER.LUA -- This is the items-subfile for the Vale of Baroch -- Revised: 2012.04.02 -- Author: Jason Murdick f = loadfile(GetAppSetting("dataPath") .. "\\modules\\module_base.lua")(); f = loadfile(GetAppSetting("dataPath") .. "\\modules\\module_items.lua")(); -- First, make sure I have the zone z...
gpl-2.0
lizh06/premake-core
src/actions/vstudio/vs200x_vcproj_user.lua
19
2597
-- -- vs200x_vcproj_user.lua -- Generate a Visual Studio 2002-2008 C/C++ project .user file -- Copyright (c) 2011-2015 Jason Perkins and the Premake project -- local p = premake local m = p.vstudio.vc200x -- -- Generate a Visual Studio 200x C++ user file, with support for the new platforms API. -- ...
bsd-3-clause
yueyoum/uwsgi
tests/websockets_echo.lua
27
1867
#!./uwsgi --https :8443,foobar.crt,foobar.key --http-modifier1 6 --http-raw-body --threads 100 --lua tests/websockets_echo.lua function app(env) local function html() coroutine.yield(string.format([[ <html> <head> <script language="Javascript"> var s = new WebSocket("%s://%s...
gpl-2.0
cyberz-eu/octopus
extensions/core/src/persistence.lua
1
5979
-- Internal persistence library --[[ Provides ]] -- persistence.store(path, ...): Stores arbitrary items to the file at the given path -- persistence.load(path): Loads files that were previously stored with store and returns them -- persistence.sync(path, ...): The same as persistence.store but first creates PART file...
bsd-2-clause
tianxiawuzhei/cocos-quick-cpp
auto_buildings/api/ZQAppEvent.lua
2
1256
-------------------------------- -- @module ZQAppEvent -- @extend ZQScriptHandler -- @parent_module zq -------------------------------- -- -- @function [parent=#ZQAppEvent] androidShouldReset -- @param self -- @return ZQAppEvent#ZQAppEvent self (return value: zq.ZQAppEvent) --------------------------------...
mit
Telecat-full/-Telecat-Full
plugins/webshot.lua
2
1513
local helpers = require "OAuth.helpers" local base = 'https://screenshotmachine.com/' local url = base .. 'processor.php' local function get_webshot_url(param) local response_body = {} local request_constructor = { url = url, method = "GET", sink = ltn12.sink.table(response_body), header...
gpl-2.0
darkdukey/sdkbox-facebook-sample-v2
samples/Lua/TestLua/Resources/luaScript/RotateWorldTest/RotateWorldTest.lua
8
3356
local size = CCDirector:sharedDirector():getWinSize() local function CreateSpriteLayer() local layer = CCLayer:create() local x, y x = size.width y = size.height local sprite = CCSprite:create(s_pPathGrossini) local spriteSister1 = CCSprite:create(s_pPathSister1) local spriteSister2 = CCSprite...
mit
uonline/debut
src/day1/act1/fields/warren.person.lua
1
3023
warren = obj { nam = 'Уорри Ростовщик'; dsc = [[ {Уорри} сидит на крыльце своего дома и, ссутулившись, раскуривает трубку. Ты уверен, даже боги не знают, чем именно он её забивает. Ты решился попробовать одно из зелий Уорри лишь однажды -- и после этого понял, почему он так мало спит. ]]; act = function() ...
gpl-3.0
sansoeuvre/sansoeuvre.github.io
_draft/config/linux/kal/rc.lua
1
23294
-- If LuaRocks is installed, make sure that packages installed through it are -- found (e.g. lgi). If LuaRocks is not installed, do nothing. pcall(require, "luarocks.loader") -- Standard awesome library local gears = require("gears") local awful = require("awful") require("awful.autofocus") -- Widget and layout librar...
mit
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/snow/c_snow_ground.lua
3
8960
-- -- c_snow_ground.lua -- local helpMessage = "F12 to turn off ground snow" local helpMessageTime = 4000 local helpMessageY = 0.2 local bEffectEnabled local noiseTexture local snowShader local treeShader local naughtyTreeShader ---------------------------------------------------------------- ----------------------...
mit
satanevil/copy-creed
bot/utils.lua
646
23489
URL = require "socket.url" http = require "socket.http" https = require "ssl.https" ltn12 = require "ltn12" serpent = require "serpent" feedparser = require "feedparser" json = (loadfile "./libs/JSON.lua")() mimetype = (loadfile "./libs/mimetype.lua")() redis = (loadfile "./libs/redis.lua")() JSON = (loadfile "./libs/...
gpl-2.0
opentechinstitute/luci
protocols/hso/luasrc/model/cbi/admin_network/proto_hso.lua
14
4573
--[[ LuCI - Lua Configuration Interface Copyright 2015 Stanislas Bertrand <stanislasbertrand@gmail.com> 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 ...
apache-2.0
Arashbrsh/a1wez-
plugins/twitter_send.lua
627
1555
do local OAuth = require "OAuth" local consumer_key = "" local consumer_secret = "" local access_token = "" local access_token_secret = "" local client = OAuth.new(consumer_key, consumer_secret, { RequestToken = "https://api.twitter.com/oauth/request_token", AuthorizeUser = {"https://api.twitter.com/oauth/autho...
gpl-2.0
daurnimator/lua-http
spec/tls_spec.lua
1
1694
describe("http.tls module", function() local tls = require "http.tls" local cqueues = require "cqueues" local ca = require "cqueues.auxlib" local cs = require "cqueues.socket" local openssl_ctx = require "openssl.ssl.context" local openssl_pkey = require "openssl.pkey" local openssl_x509 = require "openssl.x509"...
mit
MonaSolutions/MonaServer
FunctionalTests/www/FunctionalTests/LUATests/Serializers/main.lua
7
2010
local _dateTime = {__time=1412082917000} local _bytes = {__raw="\xFF\x00\x14"} local _array = {2.7,true,{__type="test",key="val"}} local _map = { map="map", __size=1 } setmetatable(_map,{__mode="v"}) local _mixed = { prop="prop", "elt1" } local _notmixed = { { prop="prop" }, "elt1" } local Object = { -- o...
gpl-3.0
mobarski/sandbox
scite/old/wscite_zzz/lexers/notused/nsis.lua
4
8233
-- Copyright 2006-2017 Robert Gieseke. See LICENSE. -- NSIS LPeg lexer -- Based on NSIS 2.46 docs: http://nsis.sourceforge.net/Docs/. local l = require('lexer') local token, word_match = l.token, l.word_match local P, R, S = lpeg.P, lpeg.R, lpeg.S local M = {_NAME = 'nsis'} -- Whitespace. local ws = token(l.WHITESPA...
mit
tianxiawuzhei/cocos-quick-cpp
publibs/cocos2dx/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua
3
6178
-------------------------------- -- @module ProgressTimer -- @extend Node -- @parent_module cc -------------------------------- -- Initializes a progress timer with the sprite as the shape the timer goes through -- @function [parent=#ProgressTimer] initWithSprite -- @param self -- @param #cc.Sprite sp -- @return b...
mit
leanlyne/ShootColorX
cocos2d/cocos/scripting/lua/script/CocoStudio.lua
19
8831
require "json" require "extern" ccs = ccs or {} function ccs.sendTriggerEvent(event) local triggerObjArr = ccs.TriggerMng.getInstance():get(event) if nil == triggerObjArr then return end for i = 1, table.getn(triggerObjArr) do local triObj = triggerObjArr[i] if nil ~= tri...
mit
Frenzie/koreader-base
ffi/kobolight.lua
3
1311
local ffi = require("ffi") local bor = bit.bor local C = ffi.C -- for closing on garbage collection, we need a pointer or aggregate -- cdata object (not a plain "int"). So we encapsulate in a struct. ffi.cdef[[ typedef struct light_fd { int ld; } light_fd; ]] -- for ioctl header definition: require("ffi/posix_h") lo...
agpl-3.0
darkdukey/sdkbox-facebook-sample-v2
samples/Lua/TestLua/Resources/luaScript/EffectsAdvancedTest/EffectsAdvancedTest.lua
8
8894
local kTagTextLayer = 1 local kTagSprite1 = 1 local kTagSprite2 = 2 local kTagBackground = 1 local kTagLabel = 2 local originCreateLayer = createTestLayer local function createTestLayer(title, subtitle) local ret = originCreateLayer(title, subtitle) local bg = CCSprite:create("Images/background3.png") ret...
mit
Winless/NPLRuntime
Client/trunk/externals/bullet3/btgui/GwenOpenGLTest/premake4.lua
6
1439
project "Test_Gwen_OpenGL" kind "ConsoleApp" flags {"Unicode"} defines { "GWEN_COMPILE_STATIC" , "_HAS_EXCEPTIONS=0", "_STATIC_CPPLIB" } defines { "DONT_USE_GLUT"} targetdir "../../bin" includedirs { "..", ".", } initOpenGL() initGlew() links { "gwen", } files { "../OpenGLWin...
gpl-2.0
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/gcshop/items/burn/burn_c.lua
4
1343
------------------------- -- Fire transfer stuff -- ------------------------- local limit = 2000 local lastTick = {} local allowedVehicleTypes = { ['Automobile'] = true, ['Bike'] = true, ['Monster Truck'] = true, ['Quad'] = true } function onClientVehicleCollision (vehicleElement, force, bodyPart, colX, colY, col...
mit
moodlIMyIl/DEVTSHAKE
plugins/anti_spam.lua
3
6775
--[[ _____ _ _ _ _____ Dev @lIMyIl |_ _|__| |__ / \ | | _| ____| Dev @li_XxX_il | |/ __| '_ \ / _ \ | |/ / _| Dev @h_k_a | |\__ \ | | |/ ___ \| <| |___ Dev @Aram_omar22 |_||___/_| |_/_/ \_\_|\_\_____| Dev @IXX_I_XXI --]] kicktable = {} do local TIME_CH...
gpl-2.0
JarnoVgr/Mr.Green-MTA-Resources
resources/[gameplay]/gc/gc_s.lua
1
16670
accounts = {} ---------------------------- --- Logging in and out --- ---------------------------- local function onLoginSuccessfull(player) updateAutologin(player, accounts[player]:getForumID()) triggerClientEvent(player, "onLoginSuccess", player, accounts[player]:getGreencoins(), accounts[player]:getForumNa...
mit
mahdib9/89
plugins/anti-flood.lua
281
2422
local NUM_MSG_MAX = 5 -- Max number of messages per TIME_CHECK seconds local TIME_CHECK = 5 local function kick_user(user_id, chat_id) local chat = 'chat#id'..chat_id local user = 'user#id'..user_id chat_del_user(chat, user, function (data, success, result) if success ~= 1 then local text = 'I can\'t k...
gpl-2.0
shadoalzupedy/shadow
plugins/7.lua
1
1183
--[[ # #ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ #:(( # For More Information ....! # Developer : Aziz < @TH3_GHOST > # our channel: @DevPointTeam # Version: 1.1 #:)) #ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ # ]] do...
gpl-2.0