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
OpenRA/OpenRA
mods/d2k/maps/harkonnen-03b/harkonnen03b.lua
7
6559
--[[ Copyright 2007-2022 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you 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 vers...
gpl-3.0
upsoft/nginx-openresty-windows
luajit-root-x64/luajit/share/luajit-2.1.0-alpha/jit/v.lua
17
5620
---------------------------------------------------------------------------- -- Verbose mode of the LuaJIT compiler. -- -- Copyright (C) 2005-2013 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h -------------------------------------------------------------------------...
bsd-2-clause
pydsigner/naev
dat/events/tutorial/tutorial.lua
11
3115
-- Master tutorial script. -- This script allows the player to choose a tutorial module to run, or return to the main menu. -- localization stuff, translators would work here lang = naev.lang() if lang == "es" then else -- default english menutitle = "Tutorial Menu" menutext = "Welcome to the Naev tutorial men...
gpl-3.0
badboyam/crazy_bot
plugins/google.lua
722
1037
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
emadni/launcherlord
plugins/google.lua
722
1037
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
amirkingred/telejian
plugins/btc.lua
289
1375
-- See https://bitcoinaverage.com/api local function getBTCX(amount,currency) local base_url = 'https://api.bitcoinaverage.com/ticker/global/' -- Do request on bitcoinaverage, the final / is critical! local res,code = https.request(base_url..currency.."/") if code ~= 200 then return nil end local data = j...
gpl-2.0
szym/turbo
turbo/httpserver.lua
8
18590
--- Turbo.lua HTTP Server module -- A non-blocking HTTPS Server based on the TCPServer class. -- Supports HTTP/1.0 and HTTP/1.1. -- Includes SSL support. -- Copyright 2011, 2012, 2013 John Abrahamsen -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance ...
apache-2.0
salorium/awesome
lib/awful/widget/tasklist.lua
2
14226
--------------------------------------------------------------------------- --- Tasklist widget module for awful -- -- @author Julien Danjou <julien@danjou.info> -- @copyright 2008-2009 Julien Danjou -- @release @AWESOME_VERSION@ -- @classmod awful.widget.tasklist -------------------------------------------------...
gpl-2.0
devaloosh/VIPTEAM
plugins/iq_ali.lua
3
17261
-- made by { vipteam } do ws = {} rs = {} -- some examples of how to use this :3 ws[1] = "هلاو" rs[1] = "هـﮩـڵآوآت 🦀❤" ws[2] = "هلو" -- msg rs[2] = "هـﮩـڵآوآت 🦀❤️" -- reply ws[3] = "شلونكم" -- msg rs[3] = "تـمـآم وأنتـہ 🌝💙" -- reply ws[4] = "دووم" -- msg rs[4] = "يدوم نبضك 🌝💙" -- reply -- this m...
agpl-3.0
neg-serg/notion
example_cfg/directions.lua
1
8964
-- $Id: directions.lua 3444 2009-03-24 02:10:59Z agriffis $ -- -- Copyright (c) 2008 Aron Griffis <agriffis n01se.net> -- Released under the GNU GPL v2.1 -- debugging function function WRegion.overlap_score(reg1, reg2, dir) local r1g = reg1:geom() local r2g = reg2:geom() local avg, upper, lower, score ...
lgpl-2.1
kjoenth/naev
dat/ai/tpl/escort.lua
11
1510
include("dat/ai/tpl/generic.lua") -- Shouldn't think, should only obey orders. mem.command = true -- Don't run away from master ship mem.norun = true -- Simple create function function create ( master ) mem.escort = master mem.carrier = true attack_choose() -- Disable thinking mem.atk_think = nil e...
gpl-3.0
pydsigner/naev
dat/missions/empire/shark/sh04_meeting.lua
1
5952
--[[ This is the fifth mission of the Shark's teeth campaign. The player has to go to a planet in Za'lek space. Stages : 0) Way to Za'lek system 1) Way back to Darkshed TODO : I'm not really happy with the drone's behaviour : it's quite too obvious --]] --needed scripts include "proximity.lua" ...
gpl-3.0
payday-restoration/restoration-mod
lua/sc/tweak_data/tipstweakdata.lua
1
15697
--Overriding this function and table to axe vanilla tips, as they're worthless in resmod function TipsTweakData:init() self.tips = { { cat_index = 1, image = "enemy_cloaker", consoles = true, category = "gameplay_res" }, { cat_index = 2, image = "enemy_cloaker", consoles = true, category...
agpl-3.0
Ap0gee/Deathtoll-Lite
Deathtoll-lite.lua
1
14334
--[[ * The MIT License (MIT) * * Copyright (c) 2016 Sjshovan (Apogee) * * 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 * r...
mit
logzero/ValyriaTear
dat/maps/layna_village/layna_village_riverbank_script.lua
2
30788
-- Set the namespace according to the map name. local ns = {}; setmetatable(ns, {__index = _G}); layna_village_riverbank_script = ns; setfenv(1, ns); -- The map name, subname and location image map_name = "Mountain Village of Layna" map_image_filename = "img/menus/locations/mountain_village.png" map_subname = "Riverba...
gpl-2.0
pydsigner/naev
dat/missions/neutral/cargo.lua
8
4208
--[[ -- These are regular cargo delivery missions. Pay is low, but so is difficulty. -- Most of these missions require BULK ships. Not for small ships! --]] include "dat/scripts/cargo_common.lua" include "dat/scripts/numstring.lua" lang = naev.lang() if lang == "es" then else -- default english misn_desc = "%s in...
gpl-3.0
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/nssm/mobs/ant_worker.lua
1
1149
mobs:register_mob("nssm:ant_worker", { type = "monster", passive = true, hp_max = 24, hp_min = 18, collisionbox = {-0.4, 0.00, -0.4, 0.4, 0.5, 0.4}, visual = "mesh", mesh = "ant_worker.x", textures = { {"ant_worker.png"} }, visual_size = {x = 2, y = 2}, makes_footstep_sound = true, view_range = 20, fear_...
gpl-3.0
haider1984/-1
libs/fakeredis.lua
650
40405
local unpack = table.unpack or unpack --- Bit operations local ok,bit if _VERSION == "Lua 5.3" then bit = (load [[ return { band = function(x, y) return x & y end, bor = function(x, y) return x | y end, bxor = function(x, y) return x ~ y end, bnot = function(x) return ~x end, rshift = function(x...
gpl-2.0
szym/turbo
turbo/httputil.lua
5
25684
--- Turbo.lua HTTP Utilities module -- Contains the HTTPHeaders and HTTPParser classes, which parses request and -- response headers and also offers utilities to build request headers. -- -- Also offers a few functions for parsing GET URL parameters, and different -- POST data types. -- -- Copyright John Abrahamsen 201...
apache-2.0
luvit/luvit
examples/http-server-todo-web.lua
4
1719
local http = require('http'); local url = require('url'); local items = {}; -- see Node.js_in_action.pdf : page 89 (110 of 417) http.createServer( function(req, res) --p(req) if req.url=='/' then if req.method=='GET' then show(res); elseif req.method=='POST' then add(req, res); else badRequest(res); ...
apache-2.0
xingshuo/frame_sync_model
server/agent/player.lua
1
3666
local Class = require "lualib.class" local Debug = require "lualib.debug" local Skynet = require "lualib.local_skynet" local TimerObj = import "lualib/object" local Env = import "agent/env" local Net = import "lualib/net" local BCApi = import "broadcast/api" local Player = Class("Player", "TimerObject") function Play...
mit
fucksooN/tabchi
libs/dkjson.lua
63
26559
-- Module options: local always_try_using_lpeg = true local register_global_module_table = false local global_module_name = 'json' --[==[ David Kolf's JSON module for Lua 5.1/5.2 ======================================== *Version 2.4* In the default configuration this module writes no global values...
unlicense
khanasbot/Avatar_Bot
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
ahmadreza5251/terojanbot
libs/JSON.lua
3765
34843
-- -*- coding: utf-8 -*- -- -- Simple JSON encoding and decoding in pure Lua. -- -- Copyright 2010-2014 Jeffrey Friedl -- http://regex.info/blog/ -- -- Latest version: http://regex.info/blog/lua/json -- -- This code is released under a Creative Commons CC-BY "Attribution" License: -- http://creativecommons.org/licenses...
gpl-2.0
pjanouch/logdiag
share/library/Active/bipolar.lua
1
1302
-- Symbol names local names_npn = { en = "NPN transistor", cs = "Tranzistor NPN", sk = "Tranzistor NPN", pl = "Tranzystor NPN", de = "NPN Transistor" } local names_pnp = { en = "PNP transistor", cs = "Tranzistor PNP", sk = "Tranzistor PNP", pl = "Tranzystor PNP", de = "PNP Transistor" } -- Render area in ba...
isc
MOSAVI17/FreeTG
plugins/ingroup.lua
527
44020
do -- Check Member local function check_member_autorealm(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 -- Group configuration data[tostr...
gpl-2.0
Billiam/love-rollbar
luajit-request/init.lua
1
9160
--[[ LuaJIT-Request Lucien Greathouse Wrapper for LuaJIT-cURL for easy HTTP(S) requests. Copyright (c) 2014 lucien Greathouse This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is gr...
mit
xing634325131/Luci-0.11.1
libs/sgi-luci/luasrc/ttpd/handler/luci.lua
53
1923
--[[ HTTP server implementation for LuCI - luci handler (c) 2008 Steven Barth <steven@midlink.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....
apache-2.0
payday-restoration/restoration-mod
lua/sc/units/player/playertased.lua
1
6541
function PlayerTased:enter(state_data, enter_data) PlayerTased.super.enter(self, state_data, enter_data) self._ids_tased_boost = Idstring("tased_boost") self._ids_tased = Idstring("tased") self._ids_counter_tase = Idstring("tazer_counter") self:_start_action_tased(managers.player:player_timer():time(), state_data....
agpl-3.0
simbiose/escambo
escambo.lua
1
16504
-- -- Escambo, an HTTP content negotiator, content-type parser and creator for Lua -- -- @author leite (xico@simbio.se) -- @license MIT -- @copyright Simbiose 2015 local string, table, tbx, class = require [[string]], require [[table]], require [[pl.tablex]], require [[30log]] local Escambo, find, sub, gmatch,...
mit
T3hArco/skeyler-gamemodes
Sassilization/gamemode/modules/empire/shared.lua
1
11683
---------------------------------------- -- Sassilization -- http://sassilization.com -- By Sassafrass / Spacetech / LuaPineapple ---------------------------------------- AccessorFunc( GM.PlayerMeta, "empire", "Empire" ) local AccessorFunc = AccessorFunc local building = building local FORCE_NUMBER = FORCE_...
bsd-3-clause
drdownload/prosody-modules
mod_vjud/vcard.lib.lua
32
9198
-- Copyright (C) 2011-2012 Kim Alvefur -- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- -- TODO -- Fix folding. local st = require "util.stanza"; local t_insert, t_concat = table.insert, table.concat; local type = type; local next, pairs, ipairs = n...
mit
xing634325131/Luci-0.11.1
libs/px5g/lua/px5g/util.lua
170
1148
--[[ * px5g - Embedded x509 key and certificate generator based on PolarSSL * * Copyright (C) 2009 Steven Barth <steven@midlink.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License, version 2.1 as published by the Free ...
apache-2.0
SLAPaper/MCGC
MCGC/c84130822.lua
3
4914
-- MC群的摆渡者 玲音 function c84130822.initial_effect(c) -- 不能特招 local e1 = Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) -- 弹回手卡 ...
mit
MrCerealGuy/Stonecraft
games/stonecraft_game/mods/mesecons/mesecons_gates/init.lua
1
5407
--[[ 2017-01-06 modified by MrCerealGuy <mrcerealguy@gmx.de> exit if mod is deactivated --]] if core.skip_mod("mesecons") then return end local selection_box = { type = "fixed", fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 } } local nodebox = { type = "fixed", fixed = { { -8/16, -8/16, -8/16, 8/16, -7/1...
gpl-3.0
Hello23-Ygopro/ygopro-kaijudo
expansions/script/c25003082.lua
1
1515
--Kronkos, General of Fear local ka=require "expansions.utility_ktcg" local scard,sid=ka.GetID() function scard.initial_effect(c) ka.EnableCreatureAttribute(c) --banish replace (banish) ka.AddBanishReplaceAbility(c,0,scard.reptg,scard.repop,scard.repval) end scard.kaijudo_card=true function scard.repfilter(c,tp) re...
gpl-3.0
khanasbot/Avatar_Bot
bot/utils.lua
356
14963
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
luvit/luvit
tests/test-fs-write-sync.lua
14
1192
--[[ Copyright 2015 The Luvit Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
apache-2.0
kroepke/luna
luna-tests/src/test/resources/benchmarksgame/knucleotide.lua-2.lua
1
1810
-- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org/ -- contributed by Mike Pall local function kfrequency(seq, freq, k, frame) local sub = string.sub local k1 = k - 1 for i = frame, string.len(seq) - k1, k do local c = sub(seq, i, i + k1) freq[c] = freq[c] +...
apache-2.0
mardraze/prosody-modules
mod_component_client/mod_component_client.lua
31
8204
--[[ mod_component_client.lua This module turns Prosody hosts into components of other XMPP servers. Config: VirtualHost "component.example.com" component_client = { host = "localhost"; port = 5347; secret = "hunter2"; } ]] local socket = require "socket" local logger = require "util.logger"; local sha...
mit
ld-test/llui
src/xf86drm_ffi.lua
4
21023
--xf86drm.lua local ffi = require("ffi") local bit = require("bit") local bor = bit.bor local drm = require("drm") local Lib_drm = drm.Lib_drm; local stat = require("stat")() ffi.cdef[[ typedef uint32_t gid_t; typedef uint32_t mode_t; ]] --[[ DRM_IOCTL_NR(n) _IOC_NR(n) DRM_IOC_VOID _IOC_NONE DRM_IOC_READ _IOC_R...
mit
Sweet-kid/Algorithm-Implementations
Shell_Sort/Lua/Yonaba/shell_sort_test.lua
27
1367
-- Tests for shell_sort.lua local shell_sort = require 'shell_sort' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 end loca...
mit
indexTM/index
plugins/filterworld.lua
1
4170
local function save_filter(msg, name, value) local hash = nil if msg.to.type == 'chat' then hash = 'chat:'..msg.to.id..':filters' end if msg.to.type == 'user' then return 'فقط در گروه ممکن است' end if hash then redis:hset(hash, name, value) return "انجام شد" end end local function get_fil...
gpl-2.0
Minefix/MineFix
mods/mfbase/default/mapgen.lua
4
29629
-- -- Aliases for map generator outputs -- minetest.register_alias("mapgen_stone", "default:stone") minetest.register_alias("mapgen_dirt", "default:dirt") minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass") minetest.register_alias("mapgen_sand", "default:sand") minetest.register_alias("mapgen_...
agpl-3.0
gajop/Zero-K
LuaUI/chat_preprocess.lua
10
7376
--Chat preprocessor. Provide preprocessed chat message for Chili Chat widget --last update: 20 May 2014 local myName = Spring.GetPlayerInfo(Spring.GetMyPlayerID()) local transmitMagic = "> ["..myName.."]!transmit" -- Lobby is sending to LuaUI local voiceMagic = "> ["..myName.."]!transmit voice" -- Lobby is sending a v...
gpl-2.0
gajop/Zero-K
LuaUI/Widgets/gui_chili_rejoin_progress.lua
9
16494
function widget:GetInfo() return { name = "Chili Rejoining Progress Bar", desc = "v1.132 Show the progress of rejoining and temporarily turn-off Text-To-Speech while rejoining", author = "msafwan (use UI from KingRaptor's Chili-Vote) ", date = "Oct 10, 2012", license = "GNU GPL...
gpl-2.0
gajop/Zero-K
LuaRules/Configs/MetalSpots/Charlie in the Hills v2.1.lua
17
3179
return { spots = { [1] = {x = 1960, z = 2760, metal = 1.7}, [2] = {x = 3416, z = 152, metal = 1.7}, [3] = {x = 4136, z = 8008, metal = 1.7}, [4] = {x = 4136, z = 3864, metal = 1.7}, [5] = {x = 4824, z = 7992, metal = 1.7}, [6] = {x = 4280, z = 7832, metal = 1.7}, [7] = {x = 6008, z = 2632, metal = 1.7}, ...
gpl-2.0
hossein101/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
sina7sk/test
bot/seedbot.lua
1
9982
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") VERSION = '2' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then return...
gpl-2.0
gajop/Zero-K
LuaRules/Utilities/unitDefReplacements.lua
2
5660
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- local function GetGridTooltip (unitID) local gridCurrent = Spring.GetUnitRulesParam(unitID, "OD_gridCurrent") if not gridCurrent then return end ...
gpl-2.0
gajop/Zero-K
LuaUI/Widgets/cmd_customformations2.lua
6
40293
function widget:GetInfo() return { name = "CustomFormations2", desc = "Allows you to draw a formation line:".. "\n• mouse drag draw various command on ground.".. "\n• ALT+Attack draw attack command on the ground.", author = "Niobium, modified by Skasi", -- Based on 'Custom Formations' by j...
gpl-2.0
wxguidesigner/wxGUIDesigner
build/premake/4.3/src/base/validate.lua
70
2531
-- -- validate.lua -- Tests to validate the run-time environment before starting the action. -- Copyright (c) 2002-2009 Jason Perkins and the Premake project -- -- -- Performs a sanity check of all of the solutions and projects -- in the session to be sure they meet some minimum requirements. -- function premake.c...
gpl-3.0
KayMD/Illarion-Content
item/id_66_markerstone.lua
3
2989
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
dmccuskey/dmc-lifecycle-mixin
dmc_corona/lib/dmc_lua/lua_events_mix.lua
14
8192
--====================================================================-- -- dmc_lua/lua_events_mix.lua -- -- Documentation: http://docs.davidmccuskey.com/ --====================================================================-- --[[ The MIT License (MIT) Copyright (C) 2014-2015 David McCuskey. All Rights Reserved. ...
mit
wangtianhang/UnityLuaTest
UnityLuaTest/Assets/ToLua/Lua/protobuf/wire_format.lua
15
3767
-- -------------------------------------------------------------------------------- -- FILE: wire_format.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com ...
mit
saydulk/newfies-dialer
lua/libs/constant.lua
4
1668
-- -- Newfies-Dialer License -- http://www.newfies-dialer.org -- -- 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/. -- -- Copyright (C) 2011-2015 Star2Billing S.L. -- --...
mpl-2.0
Flourish-Team/Flourish
Premake/source/modules/vstudio/tests/fs2005/projectsettings.lua
7
8137
-- -- tests/actions/vstudio/fs2005/projectsettings.lua -- Validate generation of root <PropertyGroup/> in Visual Studio 2005+ .fsproj -- Copyright (c) 2009-2017 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vstudio_dn2005_projectsettings") local dn2005 = p.vstudio.dotnetbase...
mit
KayMD/Illarion-Content
base/factions.lua
2
29337
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
Sojerbot/javan
plugins/ingroup.lua
1
61924
do -- Check Member local function check_member_autorealm(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 -- Group configuration data[tostr...
gpl-2.0
flike/Atlas
examples/tutorial-states.lua
40
2935
--[[ $%BEGINLICENSE%$ Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. This program is dis...
gpl-2.0
gajop/Zero-K
LuaUI/Widgets/unit_initial_queue.lua
2
21058
local version = "v1.544" function widget:GetInfo() return { name = "Initial Queue ZK", desc = version .. " Allows you to queue buildings before game start", author = "Niobium, KingRaptor", date = "7 April 2010", license = "GNU GPL, v2 or later", layer = -1, -- Puts it below cmd_mex_...
gpl-2.0
gajop/Zero-K
scripts/nanoaim.h.lua
15
2783
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- -- -- Author: jK @ 2010 -- -- How to use: -- -- 1. Add to the start of your script: include "nanoaim.h.lua" -- 2. After you define your piec...
gpl-2.0
litnimax/luci
contrib/luadoc/lua/luadoc/init.lua
172
1333
------------------------------------------------------------------------------- -- LuaDoc main function. -- @release $Id: init.lua,v 1.4 2008/02/17 06:42:51 jasonsantos Exp $ ------------------------------------------------------------------------------- local require = require local util = require "luadoc.util" log...
apache-2.0
gajop/Zero-K
units/armmstor.lua
7
3326
unitDef = { unitname = [[armmstor]], name = [[Storage]], description = [[Stores Metal and Energy (500)]], activateWhenBuilt = true, buildCostEnergy = 100, buildCostMetal = 100, builder ...
gpl-2.0
gajop/Zero-K
libs/chonsole/luaui/widgets/modules/suggestions.lua
1
15789
-- suggestions local currentSuggestion = 0 local currentSubSuggestion = 0 local suggestions = {} local suggestionNameMapping = {} -- name -> index in "suggestions" table local filteredSuggestions = {} local dynamicSuggestions = {} local preText -- used to determine if text changed -- name suggestions local nameSuggest...
gpl-2.0
arya5123/tell
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
gajop/Zero-K
lups/ParticleClasses/NanoLasersNoShader.lua
14
8740
-- $Id: NanoLasersNoShader.lua 3171 2008-11-06 09:06:29Z det $ ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- local NanoLasersNoShader = {...
gpl-2.0
gajop/Zero-K
scripts/corsh.lua
11
1979
include "constants.lua" local base = piece 'base' local turret = piece 'turret' local gun = piece 'gun' local flare = piece 'flare' local ground = piece 'ground01' local wakes = {} for i = 1, 8 do wakes[i] = piece('wake0' .. i) end local function WobbleUnit() local wobble = true while true do if wobble == true t...
gpl-2.0
zhangxudongyxkf/MyGameServer
skynet_test/socket3.lua
1
3290
package.cpath = "../skynet/luaclib/?.so" package.path = "../skynet/lualib/?.lua;?.lua" local skynet = require "skynet" require "skynet.manager" -- import skynet.register local socket = require "skynet.socket" local proto = require "proto" local sproto = require "sproto" local host local REQUEST = {} ...
mit
Sweet-kid/Algorithm-Implementations
Bogobogosort/Lua/Yonaba/bogobogosort_test.lua
27
1996
-- Tests for bogobogosort.lua local bogobogosort = require 'bogobogosort' local total, pass = 0, 0 local function dec(str, len) return #str < len and str .. (('.'):rep(len-#str)) or str:sub(1,len) end local function run(message, f) total = total + 1 local ok, err = pcall(f) if ok then pass = pass + 1 end...
mit
CodeAnxiety/premake-core
src/base/detoken.lua
5
4751
-- -- detoken.lua -- -- Expands tokens. -- -- Copyright (c) 2011-2014 Jason Perkins and the Premake project -- premake.detoken = {} local p = premake local detoken = p.detoken -- -- Expand tokens in a value. -- -- @param value -- The value containing the tokens to be expanded. -- @param environ -- An execu...
bsd-3-clause
miralireza2/gpf
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
shkan/telebot2
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
amir32002/feedback-networks
lib/LogNLLCriterion.lua
1
1167
local LogNLLCriterion, parent = torch.class("nn.LogNLLCriterion", "nn.Criterion") function LogNLLCriterion:__init() self.inputModule = nn.Log() if self.inputModule then local params = self.inputModule:parameters() if params and #params > 0 then print"Warning: nn.LogNLLCriterion doesn't supp...
mit
pixeltailgames/gm-mediaplayer
lua/mediaplayer/players/entity/sh_meta.lua
1
2523
--[[--------------------------------------------------------- Media Player Entity Meta -----------------------------------------------------------]] local EntityMeta = FindMetaTable("Entity") if not EntityMeta then return end function EntityMeta:GetMediaPlayer() return self._mp end -- -- Installs a media player re...
mit
Sojerbot/javan
plugins/media.lua
18
1671
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
NowTeam/Now
plugins/media.lua
18
1671
do local function run(msg, matches) local receiver = get_receiver(msg) local url = matches[1] local ext = matches[2] local file = download_to_file(url) local cb_extra = {file_path=file} local mime_type = mimetype.get_content_type_no_sub(ext) if ext == 'gif' then print('send_file') send_docum...
gpl-2.0
damoguyan8844/ABTestingGateway
lib/abtesting/adapter/policy.lua
22
4584
--- -- @classmod abtesting.adapter.policy -- @release 0.0.1 local modulename = "abtestingAdapterPolicy" local _M = { _VERSION = "0.0.1" } local mt = { __index = _M } local ERRORINFO = require('abtesting.error.errcode').info local separator = ':' local fields = {} fields.divtype = 'divtype' fields.divdata = 'divdata'...
mit
ifoxhz/iFox
scripts/callbacks/daily.lua
2
2184
-- -- (C) 2013-15 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "alert_utils" if(ntop.isPro()) then package.path = dirs.installdir .. "/pro/scripts/callbacks/?.lua;" .. package.path require("daily") end -- Delet...
gpl-3.0
Tgfire/tgFire
plugins/MyInfo.lua
4
1428
local function run(msg, matches) if matches[1]:lower() == 'myinfo' then function get_id(arg, data) local username if data.first_name_ then if data.username_ then username = '@'..data.username_ else username = '<i>No Username!</i>' end local telNum if data.phone_number_ then t...
gpl-3.0
wangtianhang/UnityLuaTest
toluaSnapshotTest/toluaUnityProject/Assets/ToLua/Lua/System/Timer.lua
4
3928
-------------------------------------------------------------------------------- -- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com -- All rights reserved. -- Use, modification and distribution are subject to the "MIT License" ------------------------------------------------------------------------...
mit
gajop/Zero-K
LuaUI/Widgets/chili_new/handlers/debughandler.lua
8
12947
--//============================================================================= --// Chili DebugHandler --//============================================================================= --// todo: --// * use the custom errorhandler for any widget->chili interaction, --// atm if a widget calls mybutton:SetCaption()...
gpl-2.0
gajop/Zero-K
lups/ParticleClasses/Ribbons.lua
9
11129
-- $Id: Ribbons.lua 3171 2008-11-06 09:06:29Z det $ ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- --// only works with >=77b1 if (Game.ve...
gpl-2.0
Mutos/NAEV-StarsOfCall
dat/missions/neutral/dts_02.lua
5
13614
--[[ MISSION: Defend the System 3 DESCRIPTION: A mission to defend the system against swarm of pirate ships. This will be the third in a series of random encounters. After the mission, perhaps there'll be a regular diet of similar missions Perhaps the random missio...
gpl-3.0
gajop/Zero-K
LuaUI/Widgets/init_startup_info_selector.lua
2
9995
local versionNumber = "1.22" -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function widget:GetInfo() return { name = "Startup Info and Selector", desc = "[v" .. string.format("%s", versionNumber ) .....
gpl-2.0
padrinoo1/telebak
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
nobie/sesame_fw
feeds/luci/applications/luci-wshaper/dist/usr/lib/lua/luci/model/cbi/wshaper.lua
53
2056
--[[ LuCI - Lua Configuration Interface Copyright 2011 Manuel Munz <freifunk at somakoma dot de> 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 ]]-- r...
gpl-2.0
KayMD/Illarion-Content
magic/learnMagic.lua
3
7928
--[[ Illarion Server This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it wi...
agpl-3.0
gajop/Zero-K
units/cormak.lua
1
7129
unitDef = { unitname = [[cormak]], name = [[Outlaw]], description = [[Riot Bot]], acceleration = 0.25, brakeRate = 0.25, buildCostEnergy = 250, buildCostMetal = 250, buildPic = [[cormak.png]], buildTime ...
gpl-2.0
dhotson/prosody-modules
mod_auth_sql/mod_auth_sql.lua
32
3498
-- Simple SQL Authentication module for Prosody IM -- Copyright (C) 2011 Tomasz Sterna <tomek@xiaoka.com> -- Copyright (C) 2011 Waqas Hussain <waqas20@gmail.com> -- local log = require "util.logger".init("auth_sql"); local new_sasl = require "util.sasl".new; local DBI = require "DBI" local connection; local params = ...
mit
padrinoo1/telebak
bot/creed.lua
1
9249
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") VERSION = '1.0' -- This function is called when tg receive a msg function on_msg_receive (msg) if not started then retu...
gpl-2.0
casseveritt/premake
src/actions/example/example_project.lua
71
2633
-- An example project generator; see _example.lua for action description -- -- The project generation function, attached to the action in _example.lua. -- By now, premake.generate() has created the project file using the name -- provided in _example.lua, and redirected input to this new file. -- function premake.ex...
bsd-3-clause
gajop/Zero-K
LuaUI/Widgets/chili/Controls/colorbars.lua
25
2469
--//============================================================================= Colorbars = Control:Inherit{ classname = "colorbars", color = {1,1,1,1}, defaultWidth = 100, defaultHeight = 20, OnChange = {}, } local this = Colorbars local inherited = this.inherited --//=============================...
gpl-2.0
nobie/sesame_fw
feeds/luci/modules/rpc/dist/usr/lib/lua/luci/jsonrpcbind/uci.lua
81
1914
--[[ 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 ht...
gpl-2.0
reloadlife/sprcpubot
Plugins/buyspr.lua
1
9207
http = require "socket.http" http = require "socket.http" ltn12 = require 'ltn12' multipart = require 'multipart-post' local function makeRequest(uRL, request_body) local response = {} local body, boundary = multipart.encode(request_body) local success, code, headers, status = https.request{ u...
gpl-3.0
aadddjj/testbotantispam
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
Flourish-Team/Flourish
Premake/source/src/base/tools.lua
14
1780
--- -- tools.lua -- Work with Premake's collection of tool adapters. -- Author Jason Perkins -- Copyright (c) 2015 Jason Perkins and the Premake project --- local p = premake p.tools = {} --- -- Given a toolset identifier (e.g. "gcc" or "gcc-4.8") returns the -- corresponding tool adapter and the version, if one w...
mit
nobie/sesame_fw
feeds/luci/applications/luci-asterisk/dist/usr/lib/lua/luci/asterisk/cc_idd.lua
92
7735
--[[ LuCI - Asterisk - International Direct Dialing Prefixes and Country Codes 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.asteri...
gpl-2.0
DeterGent-Legion/MeGa_SaTaN
plugins/admin.lua
60
6680
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
nobie/sesame_fw
feeds/luci/applications/luci-radvd/dist/usr/lib/lua/luci/model/cbi/radvd/prefix.lua
74
3766
--[[ 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$ ]]-- lo...
gpl-2.0