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 |
|---|---|---|---|---|---|
unusualcrow/redead_reloaded | entities/entities/sent_radiation/init.lua | 1 | 1524 | AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
ENT.Scale = 1
ENT.Distance = 300
function ENT:Initialize()
self:SetMoveType(MOVETYPE_NONE)
self:SetSolid(SOLID_NONE)
self:SetCollisionGroup(COLLISION_GROUP_DEBRIS_TRIGGER)
self:SetNotSolid(true)
self:DrawShadow(false)
self:SetCollisionB... | mit |
CrazyEddieTK/Zero-K | LuaUI/Widgets/gui_attack_aoe.lua | 4 | 23803 | -- $Id: gui_attack_aoe.lua 3823 2009-01-19 23:40:49Z evil4zerggin $
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local versionNumber = "v3.1"
function widget:GetInfo()
return {
name = "Attack Ao... | gpl-2.0 |
Playermet/luajit-sqlite | examples/base.lua | 1 | 2731 | local sqlite = require 'sqlite3' ('sqlite3')
local SQLITE = sqlite.const
local code, db = sqlite.open(':memory:')
if code ~= SQLITE.OK then
print('Error: ' .. db:errmsg())
os.exit()
end
code = sqlite.exec(db, [[ CREATE TABLE People (
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
); ]])
do
-- Create... | mit |
waylon531/RogueRacing | libs/LOVEly-tiles-master/drawlist.lua | 3 | 3936 | local getIndex = function(self,the_layer)
for i,layer in ipairs(self.layers) do
if layer == the_layer then return i end
end
end
local t = setmetatable({},{__call = function(self,...) return self.new(...) end})
t.__call = function(self,name) return self:getLayer(name) end
t.__index = t
function t.new()
local d... | mit |
czfshine/Don-t-Starve | data/DLC0001/scripts/prefabs/rubble.lua | 1 | 3268 | local assets =
{
Asset("ANIM", "anim/ruins_rubble.zip"),
}
local prefabs =
{
"rocks",
"thulecite",
"cutstone",
"trinket_6",
"gears",
"nightmarefuel",
"greengem",
"orangegem",
"yellowgem",
"collapse_small",
}
local function workcallback(inst, worker, workleft)
local pt = P... | gpl-2.0 |
nvoron23/tarantool | src/lua/fio.lua | 1 | 4841 | -- fio.lua (internal file)
local fio = require('fio')
local ffi = require('ffi')
ffi.cdef[[
int umask(int mask);
char *dirname(char *path);
]]
local internal = fio.internal
fio.internal = nil
local function sprintf(fmt, ...)
if select('#', ...) == 0 then
return fmt
end
return string.form... | bsd-2-clause |
CrazyEddieTK/Zero-K | units/chicken_digger_b.lua | 5 | 3435 | unitDef = {
unitname = [[chicken_digger_b]],
name = [[Digger (burrowed)]],
description = [[Burrowing Scout/Raider]],
acceleration = 0.26,
activateWhenBuilt = false,
brakeRate = 0.205,
buildCostEnergy = 0,
buildCostMetal = 0,
builder ... | gpl-2.0 |
TimSimpson/Macaroni | Next/Tests/Features/ConstructorOverloading/manifest.lua | 2 | 1048 | require "os"
require "Macaroni.Model.Library"
upper = getUpperLibrary();
id =
{
group=upper.Group,
name=upper.Name .. ".LanguageFeatures.ConstructorOverloading",
version=upper.Version
}
description="Proof of concept which overloads the Constructor of a class in various ways."
-- source "Source"
-- output... | apache-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Widgets/dbg_devcommands.lua | 4 | 12448 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function widget:GetInfo()
return {
name = "Dev Commands",
desc = "v0.011 Dev Commands",
author = "CarRepairer",
date = "2... | gpl-2.0 |
timroes/awesome | tests/test-spawn-snid.lua | 8 | 1615 | --- Tests for spawn's startup notifications.
local runner = require("_runner")
local test_client = require("_client")
local manage_called, c_snid
client.connect_signal("manage", function(c)
manage_called = true
c_snid = c.startup_id
assert(c.machine == awesome.hostname,
tostring(c.machine) .. ... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Widgets/api_i18n.lua | 6 | 3402 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--[[
Example:
local tr
local hellWorld
function widget:Initialize()
tr=WG.initializeTranslation(GetInfo().name,langCallback)
hellWorld=tr("helloworld")
end
... | gpl-2.0 |
ETegro/Inquisitor | client/remotetesting/luas/several_lvm.lua | 1 | 3725 | --[[
aStor2 -- storage area network configurable via Web-interface
Copyright (C) 2009-2012 ETegro Technologies, PLC
Vladimir Petukhov <vladimir.petukhov@etegro.com>
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 |
CrazyEddieTK/Zero-K | gamedata/modularcomms/weapons/torpedo.lua | 17 | 1427 | local name = "commweapon_torpedo"
local weaponDef = {
name = [[Torpedo Launcher]],
areaOfEffect = 16,
avoidFriendly = false,
bouncerebound = 0.5,
bounceslip = 0.5,
burnblow = true,
collideFriendly = false,
craterBoost ... | gpl-2.0 |
blueyed/awesome | spec/awful/keyboardlayout_spec.lua | 11 | 3466 | ---------------------------------------------------------------------------
-- @author Uli Schlachter
-- @copyright 2015 Uli Schlachter and Kazunobu Kuriyama
---------------------------------------------------------------------------
local kb = require("awful.widget.keyboardlayout")
describe("awful.widget.keyboardlay... | gpl-2.0 |
timroes/awesome | spec/awful/keyboardlayout_spec.lua | 11 | 3466 | ---------------------------------------------------------------------------
-- @author Uli Schlachter
-- @copyright 2015 Uli Schlachter and Kazunobu Kuriyama
---------------------------------------------------------------------------
local kb = require("awful.widget.keyboardlayout")
describe("awful.widget.keyboardlay... | gpl-2.0 |
unusualcrow/redead_reloaded | gamemode/events/fallout.lua | 1 | 1514 | local EVENT = {}
EVENT.Chance = 0.50
EVENT.Type = EVENT_BAD
EVENT.TimeText = {"30 seconds", "1 minute"}
EVENT.Times = {30, 60}
function EVENT:Start()
local num = math.random(1, 2)
EVENT.Delay = CurTime() + 15
EVENT.RadTime = CurTime() + EVENT.Times[num] + 15
EVENT.RadDelay = 0
for k, v in pairs(team.GetPlayers(T... | mit |
AllAboutEE/nodemcu-firmware | lua_examples/email/read_email_imap.lua | 82 | 4543 | ---
-- Working Example: https://www.youtube.com/watch?v=PDxTR_KJLhc
-- @author Miguel (AllAboutEE.com)
-- @description This example will read the first email in your inbox using IMAP and
-- display it through serial. The email server must provided unecrypted access. The code
-- was tested with an AOL and Time Warner c... | mit |
TimSimpson/Macaroni | Main/App/Source/main/lua/ReplCommand.lua | 2 | 4796 | --------------------------------------------------------------------------------
-- Copyright 2011 Tim Simpson
--
-- 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.o... | apache-2.0 |
SorBlackPlus/Anti-spam | plugins/warn.lua | 1 | 9629 | local dataLoad = load_data(_config.moderation.data)
-- Set
local function limitWarn(msg, maxNum)
if tonumber(maxNum) < 1 or tonumber(maxNum) > 10 then
return '*Warning Range is between* [ `0 - 10` ].'
end
local warnLimit = maxNum
dataLoad[tostring(msg.chat_id_)]['settings']['warning_max'] = warnLimit
sa... | gpl-3.0 |
victorperin/tibia-server | data/npc/scripts/Oliver.lua | 2 | 1949 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHan... | apache-2.0 |
victorperin/tibia-server | data/npc/scripts/Servant Sentry.lua | 1 | 1189 | local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)... | apache-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/widgets/hoverer.lua | 1 | 4988 | local Text = require "widgets/text"
local Widget = require "widgets/widget"
require("constants")
local YOFFSETUP = 40
local YOFFSETDOWN = 30
local XOFFSET = 10
local HoverText = Class(Widget, function(self, owner)
Widget._ctor(self, "HoverText")
self.owner = owner
self.isFE = false
self:SetClickable(fals... | gpl-2.0 |
SorBlackPlus/Anti-spam | 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-3.0 |
repstd/modified_vlc | share/lua/intf/http.lua | 9 | 10566 | --[==========================================================================[
http.lua: HTTP interface module for VLC
--[==========================================================================[
Copyright (C) 2007-2009 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
This progra... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Widgets/chili/Controls/object.lua | 5 | 22162 | --//=============================================================================
Object = {
classname = 'object',
--x = 0,
--y = 0,
--width = 10,
--height = 10,
defaultWidth = 10, --FIXME really needed?
defaultHeight = 10,
visible = true,
--hidden = false, --// synonym fo... | gpl-2.0 |
wtof1996/TI-Lua_String_Library_Extension | V1/samples/ctype_sample_non_assert.lua | 1 | 1249 | --[[
#FreInclude <ctype\ctype.lua>
]]--
--[[
This is a sample which shows how to use ctype lib.
In this sample, user only can input digits to display on the screen.
P.S:You'd better use this with iLua.
]]--
charStack = {};
errString = "";
function on.charIn(char)
local res, err = ctype.isdigit(ch... | apache-2.0 |
project-asap/IReS-Platform | resources/unusedAsapLibraryComponents/Maxim/operators/WINDM_Join_CDR_VORONOI_Postgres/WIND_Join_CDR_VORONOI_Postgres.lua | 3 | 1243 | -- General configuration of the operators belonging to Wind_Demo_o_Postgres workflow
BASE = "${JAVA_HOME}/bin/java -Xms64m -Xmx128m com.cloudera.kitten.appmaster.ApplicationMaster"
TIMEOUT = -1
MEMORY = 1024
CORES = 1
LABELS = "postgres"
EXECUTION_NODE_LOCATION = "hdp1"
-- Specific configuration of operator
OPERATOR =... | apache-2.0 |
project-asap/IReS-Platform | resources/unusedAsapLibraryComponents/Maxim/operators/WIND_Join_CDR_VORONOI_Postgres/WIND_Join_CDR_VORONOI_Postgres.lua | 3 | 1243 | -- General configuration of the operators belonging to Wind_Demo_o_Postgres workflow
BASE = "${JAVA_HOME}/bin/java -Xms64m -Xmx128m com.cloudera.kitten.appmaster.ApplicationMaster"
TIMEOUT = -1
MEMORY = 1024
CORES = 1
LABELS = "postgres"
EXECUTION_NODE_LOCATION = "hdp1"
-- Specific configuration of operator
OPERATOR =... | apache-2.0 |
CrazyEddieTK/Zero-K | units/turretaafar.lua | 5 | 4394 | unitDef = {
unitname = [[turretaafar]],
name = [[Chainsaw]],
description = [[Long-Range Anti-Air Missile Battery]],
acceleration = 0,
brakeRate = 0,
buildCostMetal = 900,
builder ... | gpl-2.0 |
nonconforme/Urho3DEditor | Prime/Data/Data/LuaScripts/17_SceneReplication.lua | 2 | 15544 | -- Scene network replication example.
-- This sample demonstrates:
-- - Creating a scene in which network clients can join
-- - Giving each client an object to control and sending the controls from the clients to the server,
-- where the authoritative simulation happens
-- - Controlling a physics obje... | mit |
alobaidy98/ahmed.Dev | plugins/taks.lua | 3 | 1481 | do
local BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
local function get_weather(location)
print("Finding weather in ", location)
local url = BASE_URL
url = url..'?q='..location..'&APPID=5f5d8da1984bd84dcff8ee7cb1abebb5'
url = url..'&units=metric'
local b, c, h = http.request(url)
if c ~= ... | gpl-3.0 |
CrazyEddieTK/Zero-K | LuaRules/Configs/StartBoxes/Akilon Wastelands ZK v1.lua | 11 | 19588 | return {
[0] = {
boxes = {
{
{6950, 6435},
{6804, 6292},
{6794, 6284},
{6783, 6283},
{6781, 6294},
{6782, 6304},
{6779, 6315},
{6770, 6326},
{6761, 6336},
{6754, 6347},
{6743, 6354},
{6733, 6357},
{6722, 6359},
{6712, 6360},
{6702, 6360},
{6691, 635... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/brains/butterflybrain.lua | 1 | 1760 | require "behaviours/runaway"
require "behaviours/wander"
require "behaviours/doaction"
require "behaviours/findflower"
require "behaviours/panic"
local RUN_AWAY_DIST = 5
local STOP_RUN_AWAY_DIST = 10
local POLLINATE_FLOWER_DIST = 10
local SEE_FLOWER_DIST = 30
local MAX_WANDER_DIST = 20
local function NearestFlowerPo... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaUI/Configs/zk_keys.lua | 2 | 5833 | return {
-- yyyymmdd
-- if newer than user's, overwrite ALL zir zk_keys
-- else just add any that are missing from local config
["date"] = 20130630,
-- all default ZK keybinds.
["keybinds"] = {
{ "togglecammode", "Ctrl+backspace",},
{ "togglecammode", "Shift+backspace",},
{ "edit_backspace", "Any+backspa... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/widgets/text.lua | 1 | 1600 | local Widget = require "widgets/widget"
local Text = Class(Widget, function(self, font, size, text)
Widget._ctor(self, "Text")
self.inst.entity:AddTextWidget()
self.inst.TextWidget:SetFont(font)
self.inst.TextWidget:SetSize(size)
if text then
self:SetString( text )
end
end)
function Text... | gpl-2.0 |
zhujunsan/nodemcu-firmware | lua_examples/email/send_email_smtp.lua | 82 | 4640 | ---
-- Working Example: https://www.youtube.com/watch?v=CcRbFIJ8aeU
-- @description a basic SMTP email example. You must use an account which can provide unencrypted authenticated access.
-- This example was tested with an AOL and Time Warner email accounts. GMail does not offer unecrypted authenticated access.
-- To o... | mit |
czfshine/Don-t-Starve | mods/Cretaceous/wicker/math/probability/markovchain.lua | 6 | 5689 | ---
-- @description Implements a discrete Markov Chain over a finite set of states.
-- @author simplex
local Lambda = wickerrequire 'paradigms.functional'
local Pred = wickerrequire 'lib.predicates'
local table = wickerrequire 'utils.table'
---
-- The markov chain class.
--
-- @class table
-- @name MarkovChain
--
l... | gpl-2.0 |
XLILT/vstruct | ast.lua | 6 | 4980 | -- Abstract Syntax Tree module for vstruct
-- This module implements the parser for vstruct format definitions. It is a
-- fairly simple recursive-descent parser that constructs an AST using Lua
-- tables, and then generates lua source from it.
-- See ast/*.lua for the implementations of various node types in the AST,... | mit |
mamadtnt/erfan | plugins/Banhammer.lua | 4 | 10464 | local function is_user_whitelisted(id)
local hash = 'whitelist:user#id'..id
local white = redis:get(hash) or false
return white
end
local function is_chat_whitelisted(id)
local hash = 'whitelist:chat#id'..id
local white = redis:get(hash) or false
return white
end
local function kick_user(user_id, chat_id)... | gpl-2.0 |
rzh/mongocraft | world/Plugins/Core/web_chat.lua | 6 | 11601 | local CHAT_HISTORY = 50
local LastMessageID = 0
local JavaScript = [[
<script type="text/javascript">
function createXHR()
{
var request = false;
try {
request = new ActiveXObject('Msxml2.XMLHTTP');
}
catch (err2) {
try {
request = new ActiveXObject('Microsoft.XMLHTTP');
}
catch ... | apache-2.0 |
KenMGJ/advent-of-code | lua/complex.lua | 1 | 1136 | complex = {}
local calculated = {}
local private = {}
function private.complexToString(t)
local sym = ""
if t.i >= 0 then
sym = "+"
end
return t.r .. sym .. t.i .. "i"
end
function complex.new (r, i)
-- We want to make sure that for r == r and i == i that new == new
local create = fal... | mit |
Ameeralasdee/FROLA | 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 |
mcdooda/The-Global-Scourge | mods/menu/scripts/game.lua | 1 | 1647 | local Menu = require 'data/scripts/menu'
local Alert = require 'data/scripts/alert'
local CameraTools = require 'data/scripts/cameratools'
local Fade = require 'data/scripts/fade'
CameraTools.lookAtCenter()
Camera.lock()
Sound.preloadMusic('music.mp3')
Sound.preloadSample('voice.wav')
Sound.preloadSample('build.wav'... | gpl-2.0 |
StoneDot/luasocket | test/httptest.lua | 19 | 11480 | -- needs Alias from /home/c/diego/tec/luasocket/test to
-- "/luasocket-test" and "/luasocket-test/"
-- needs ScriptAlias from /home/c/diego/tec/luasocket/test/cgi
-- to "/luasocket-test-cgi" and "/luasocket-test-cgi/"
-- needs "AllowOverride AuthConfig" on /home/c/diego/tec/luasocket/test/auth
local socket = require("... | mit |
abbasgh12345/abbasbotfinall | 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 |
czfshine/Don-t-Starve | data/scripts/prefabs/cookpot.lua | 1 | 6156 | require "prefabutil"
local cooking = require("cooking")
local assets=
{
Asset("ANIM", "anim/cook_pot.zip"),
Asset("ANIM", "anim/cook_pot_food.zip"),
}
local prefabs = {}
for k,v in pairs(cooking.recipes.cookpot) do
table.insert(prefabs, v.name)
end
local function onhammered(inst, worker)
if inst.components.stew... | gpl-2.0 |
ranisalt/forgottenserver | data/scripts/actions/others/belongings_of_a_deceased_shargon.lua | 7 | 1220 | local config = {
{chanceFrom = 0, chanceTo = 2500, itemId = 5741}, -- skull helmet
{chanceFrom = 2501, chanceTo = 5000, itemId = 2160}, -- crystal coin
{chanceFrom = 5001, chanceTo = 7500, itemId = 2436}, -- skull staff
{chanceFrom = 7501, chanceTo = 10000, itemId = 9969} -- black skull
}
local belongingsShargon =... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/prefabs/world.lua | 1 | 5190 | local groundtiles = require "worldtiledefs"
local common_prefabs =
{
"minimap",
"evergreen",
"evergreen_normal",
"evergreen_short",
"evergreen_tall",
"evergreen_sparse",
"evergreen_sparse_normal",
"evergreen_sparse_short",
"evergreen_sparse_tall",
"evergreen_burnt",
"evergreen_stu... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/prefabs/birdcage.lua | 1 | 7421 | require "prefabutil"
local assets=
{
Asset("ANIM", "anim/bird_cage.zip"),
Asset("ANIM", "anim/crow_build.zip"),
Asset("ANIM", "anim/robin_build.zip"),
Asset("ANIM", "anim/robin_winter_build.zip"),
}
local prefabs =
{
"bird_egg",
-- everything it can "produce" and might need symbol swaps from
"crow",
"robin"... | gpl-2.0 |
czfshine/Don-t-Starve | examples/mod例子-人物/modmain.lua | 4 | 1673 | PrefabFiles = {
"wod",
}
Assets = {
Asset( "IMAGE", "images/saveslot_portraits/wod.tex" ),
Asset( "ATLAS", "images/saveslot_portraits/wod.xml" ),
Asset( "IMAGE", "images/selectscreen_portraits/wod.tex" ),
Asset( "ATLAS", "images/selectscreen_portraits/wod.xml" ),
Asset( "IMAGE", "images/selectsc... | gpl-2.0 |
Kubuxu/cjdns | contrib/lua/cjdns/config.lua | 34 | 1851 | -- Cjdns admin module for Lua
-- Written by Philip Horger
common = require 'cjdns/common'
ConfigFile = {}
ConfigFile.__index = ConfigFile
common.ConfigFile = ConfigFile
function ConfigFile.new(path, no_init)
local values = {
path = path,
text = "",
contents = {},
}
setmeta... | gpl-3.0 |
andywingo/snabbswitch | src/apps/packet_filter/pcap_filter.lua | 13 | 4219 | module(...,package.seeall)
local app = require("core.app")
local link = require("core.link")
local lib = require("core.lib")
local packet = require("core.packet")
local config = require("core.config")
local conntrack = require("apps.packet_filter.conntrack")
local pf = require("pf") -- pflua
PcapFilter = {}
... | apache-2.0 |
cloudwu/skynet | examples/login/logind.lua | 29 | 1663 | local login = require "snax.loginserver"
local crypt = require "skynet.crypt"
local skynet = require "skynet"
local server = {
host = "127.0.0.1",
port = 8001,
multilogin = false, -- disallow multilogin
name = "login_master",
}
local server_list = {}
local user_online = {}
local user_login = {}
function server.a... | mit |
ioiasff/creawq | plugins/stats.lua | 1 | 4005 | do
-- Returns a table with `name` and `msgs`
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_prin... | gpl-2.0 |
starkos/premake-core | modules/vstudio/tests/vc200x/test_debug_settings.lua | 12 | 2491 | --
-- tests/actions/vstudio/vc200x/test_debugdir.lua
-- Validate handling of the working directory for debugging.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vstudio_vs200x_debugdir")
local vc200x = p.vstudio.vc200x
local project = p.project
-... | bsd-3-clause |
kasperlewau/casketUI | BattlegroundTargets/BattlegroundTargets-localization-zhCN.lua | 1 | 1748 | -- -------------------------------------------------------------------------- --
-- BattlegroundTargets zhCN Localization (Thanks ananhaid) --
-- Please make sure to save this file as UTF-8. ¶ --
-- -----------------------------------------------------------------------... | mit |
zhujunsan/nodemcu-firmware | lua_modules/bh1750/bh1750.lua | 89 | 1372 | -- ***************************************************************************
-- BH1750 module for ESP8266 with nodeMCU
-- BH1750 compatible tested 2015-1-22
--
-- Written by xiaohu
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***************************************************************************
loca... | mit |
alinfrat/robot | plugins/owners.lua | 68 | 12477 |
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)]['setting... | gpl-2.0 |
otalk/sdp-jingle-table | src/jingle.lua | 1 | 3939 | package.path = '../../lua-otalk/?.lua;' .. package.path
local M = {}
local helpers = require "helpers"
local converter = require "converter"
local NS = "urn:xmpp:jingle:1"
local GROUPNS = "urn:xmpp:jingle:apps:grouping:0"
local INFONS = "urn:xmpp:jingle:apps:rtp:info:1"
function jingleToTable(element)
local jin... | mit |
AllAboutEE/nodemcu-firmware | lua_examples/send_text_message.lua | 75 | 3151 | --[[
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, distribute,
sublicense, and/or sell copies... | mit |
maximus0/thrift | lib/lua/Thrift.lua | 10 | 6622 | --
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | apache-2.0 |
starkos/premake-core | modules/vstudio/tests/vc2010/test_extension_settings.lua | 16 | 1709 | --
-- tests/actions/vstudio/vc2010/test_extension_settings.lua
-- Check the import extension settings block of a VS 2010 project.
-- Copyright (c) 2014 Jason Perkins and the Premake project
--
local p = premake
local suite = test.declare("vs2010_extension_settings")
local vc2010 = p.vstudio.vc2010
local project = ... | bsd-3-clause |
victorperin/tibia-server | data/creaturescripts/scripts/others/login.lua | 1 | 1533 | function onLogin(cid)
local player = Player(cid)
local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. " Please choose your outfit."
player:sendTutorial(1)
else
if loginStr ~= "" then
player:sendTextMessage(M... | apache-2.0 |
czfshine/Don-t-Starve | data/scripts/prefabs/fire.lua | 1 | 2052 | local assets =
{
Asset("ANIM", "anim/fire.zip"),
Asset("SOUND", "sound/common.fsb"),
}
local heats = { 30, 70, 120, 180, 220 }
local function GetHeatFn(inst)
return heats[inst.components.firefx.level] or 20
end
local firelevels =
{
{anim="level1", sound="dontstarve/common/campfire", radius=2, intensity=.75, f... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/map/static_layouts/skeleton_hunter_swamp.lua | 1 | 10337 | return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 24,
height = 24,
tilewidth = 16,
tileheight = 16,
properties = {},
tilesets = {
{
name = "tiles",
firstgid = 1,
tilewidth = 64,
tileheight = 64,
spacing = 0,
margin = 0,
imag... | gpl-2.0 |
Teino1978-Corp/Teino1978-Corp-texlive.js | texlive/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.lua | 7 | 1031 | -- $Id: lualatexquotejobname.tex 22957 2011-06-13 20:49:26Z mpg $
-- Manuel Pegourie-Gonnard, originally written 2010. WTFPL v2.
--
-- Goal: see lualatexquotejobname.tex
--
-- Cache the results of previous calls, not so much for the speed gain which
-- probably doesn't matter, but to avoid repeated error messages.
loca... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaRules/Gadgets/unit_jugglenaut_juggle.lua | 4 | 9112 | function gadget:GetInfo()
return {
name = "Old Jugglenaut Juggle",
desc = "Implementes special weapon Juggling for Old Jugglenaut",
author = "Google Frog",
date = "1 April 2011",
license = "GNU GPL, v2 or later",
layer = 0,
enabled = false -- loaded by default?
... | gpl-2.0 |
UristMcEngineer/Michels-Medieval-Mod | mmm/mods/creative/init.lua | 2 | 5849 | -- minetest/creative/init.lua
creative_inventory = {}
creative_inventory.creative_inventory_size = 0
-- Create detached creative inventory after loading all mods
minetest.after(0, function()
local inv = minetest.create_detached_inventory("creative", {
allow_move = function(inv, from_list, from_index, to_list, to_i... | gpl-3.0 |
czfshine/Don-t-Starve | data/scripts/stategraphs/SGbeardbunnyman.lua | 1 | 7537 | require("stategraphs/commonstates")
local actionhandlers =
{
ActionHandler(ACTIONS.EAT, "eat"),
ActionHandler(ACTIONS.PICKUP, "pickup"),
}
local events =
{
CommonHandlers.OnStep(),
CommonHandlers.OnLocomote(true,true),
CommonHandlers.OnSleep(),
CommonHandlers.OnFreeze(),
CommonHandlers.O... | gpl-2.0 |
JordyMoos/JMShopkeeper | JMShopkeeper.lua | 1 | 5965 |
---
--- JMShopkeeper
---
--[[
Variable declaration
]]
---
-- @field name
-- @field savedVariablesName
--
local Config = {
name = 'JMShopkeeper',
savedVariablesName = 'JMShopkeeperSavedVariables',
}
---
-- Parser object
--
local Parser = {}
local ToggleStatus = 'sales'
--[[
Result table
]]
-... | mit |
Blu3wolf/Treefarm-AC | prototypes/buildingPrototypes.lua | 1 | 11050 | require ("prototypes.pipeConnectors")
require ("util")
data:extend(
{
-- ITEMS
{
type = "item",
name = "tf-cokery",
icon = "__Treefarm-AC__/graphics/icons/cokery.png",
flags = {"goes-to-quickbar"},
subgroup = "tf-buildings",
order = "a[cokery]",
place_result = "tf-cokery-dummy",
stack_size = 10
}... | gpl-2.0 |
Jordach/Vox | mods/wool/init.lua | 8 | 1786 | -- minetest/wool/init.lua
-- Backwards compatibility with jordach's 16-color wool mod
minetest.register_alias("wool:dark_blue", "wool:blue")
minetest.register_alias("wool:gold", "wool:yellow")
local wool = {}
-- This uses a trick: you can first define the recipes using all of the base
-- colors, and then some recipes... | lgpl-2.1 |
czfshine/Don-t-Starve | data/DLC0001/scripts/prefabs/bedroll_furry.lua | 1 | 2517 | local assets=
{
Asset("ANIM", "anim/swap_bedroll_furry.zip"),
}
local function onsleep(inst, sleeper)
local br = nil
if inst.components.stackable then
br = inst.components.stackable:Get()
else
br = inst
end
if br and br.components.finiteuses then
if br.components.finiteuses:GetUses() <= 1 then
br:Remov... | gpl-2.0 |
AmirPGA/P.G.A_Black | plugins/owners.lua | 284 | 12473 |
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)]['setting... | gpl-2.0 |
woftles/Opengario | oop.lua | 1 | 2740 | function class(inheritsFrom, ro)
local c = {}
local c_mt = {__index = c, __tostring = function(obj) if obj.tostring then return obj:tostring() end end}
if ro then roClass(c, c_mt, ro) end
function c.new(...)
local obj = setmetatable({}, c_mt)
if obj.init then obj:init(...) end
return obj
end
functi... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/playercontroller.lua | 1 | 36961 | require "class"
local easing = require "easing"
local trace = function() end
local START_DRAG_TIME = (1/30)*8
local PlayerController = Class(function(self, inst)
self.inst = inst
self.enabled = true
self.handler = TheInput:AddGeneralControlHandler(function(control, value) self:OnControl(control, v... | gpl-2.0 |
timroes/awesome | lib/wibox/layout/init.lua | 6 | 1058 | ---------------------------------------------------------------------------
--- Collection of layouts that can be used in widget boxes
--
-- @author Uli Schlachter
-- @copyright 2010 Uli Schlachter
-- @classmod wibox.layout
---------------------------------------------------------------------------
local base = require... | gpl-2.0 |
blueyed/awesome | lib/awful/completion.lua | 1 | 8061 | ---------------------------------------------------------------------------
--- Completion module.
--
-- This module store a set of function using shell to complete commands name.
--
-- @author Julien Danjou <julien@danjou.info>
-- @author Sébastien Gross <seb-awesome@chezwam.org>
-- @copyright 2008 Julien ... | gpl-2.0 |
CrazyEddieTK/Zero-K | gamedata/modularcomms/weapons/disruptor.lua | 5 | 1481 | local name = "commweapon_disruptor"
local weaponDef = {
name = [[Disruptor Pulse Beam]],
areaOfEffect = 32,
beamdecay = 0.9,
beamTime = 1/30,
beamttl = 30,
coreThickness = 0.25,
craterBoost = 0,
craterMult ... | gpl-2.0 |
czfshine/Don-t-Starve | data/DLC0001/scripts/components/lootdropper.lua | 1 | 6267 | local LootDropper = Class(function(self, inst)
self.inst = inst
self.numrandomloot = nil
self.randomloot = nil
self.chancerandomloot = nil
self.totalrandomweight = nil
self.chanceloot = nil
self.ifnotchanceloot = nil
self.droppingchanceloot = false
self.loot = nil
self.chanceloot... | gpl-2.0 |
creationix/ts-git | deps/coro-channel.lua | 1 | 3691 | exports.name = "creationix/coro-channel"
exports.version = "1.3.0"
exports.homepage = "https://github.com/luvit/lit/blob/master/deps/coro-channel.lua"
exports.description = "An adapter for wrapping uv streams as coro-streams and chaining filters."
exports.tags = {"coro", "adapter"}
exports.license = "MIT"
exports.autho... | mit |
Rynoxx/gmod-addon-collection | team-gate/lua/weapons/weapon_team_gate_bypasser.lua | 1 | 4010 | --[[
Allows creation of walls/gates that are only certain players can go through.
Copyright (C) 2017 Rynoxx
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... | agpl-3.0 |
IRO-TEAM/iro-antispam | plugins/spammer.lua | 1 | 15613 | do
function run(msg, matches)
local tex = matches[1]
local sps = matches[2]
local sp = ''
for i=1, tex, 1 do
sp = '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n... | gpl-2.0 |
CrazyEddieTK/Zero-K | LuaRules/Gadgets/dbg_ceg_spawner.lua | 13 | 1392 | --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
if not gadgetHandler:IsSyncedCode() then
return
end
--------------------------------------------------------------------------------
------------------------... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/map/static_layouts/sanity_wormhole_1.lua | 1 | 5811 | return {
version = "1.1",
luaversion = "5.1",
orientation = "orthogonal",
width = 16,
height = 16,
tilewidth = 16,
tileheight = 16,
properties = {},
tilesets = {
{
name = "tiles",
firstgid = 1,
tilewidth = 64,
tileheight = 64,
spacing = 0,
margin = 0,
imag... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/prefabs/woodie.lua | 1 | 9318 | local MakePlayerCharacter = require "prefabs/player_common"
local Badge = require "widgets/badge"
local easing = require "easing"
require "stategraphs/SGwilson"
require "stategraphs/SGwerebeaver"
local prefabs=
{
"lucy",
}
local assets =
{
Asset("ANIM", "anim/woodie.zip"),
Asset("SOUND", "sound/woodie.fsb"),
... | gpl-2.0 |
starkos/premake-core | modules/gmake/gmake_utility.lua | 15 | 1409 | --
-- make_utility.lua
-- Generate a C/C++ project makefile.
-- Copyright (c) 2002-2014 Jason Perkins and the Premake project
--
local p = premake
p.make.utility = {}
local make = p.make
local utility = p.make.utility
local project = p.project
local config = p.config
local fileconfig = p.fileco... | bsd-3-clause |
andywingo/snabbswitch | lib/ljsyscall/syscall/bsd/types.lua | 24 | 9241 | -- BSD shared types
local require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string =
require, error, assert, tonumber, tostring,
setmetatable, pairs, ipairs, unpack, rawget, rawset,
pcall, type, table, string
local function init(c, types)
local abi ... | apache-2.0 |
IRO-TEAM/iro-antispam | bot/utils.lua | 473 | 24167 | 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 |
unusualcrow/redead_reloaded | entities/effects/fire_tracer/init.lua | 2 | 2070 |
EFFECT.Mat = Material( "trails/plasma" )
EFFECT.Sprite = Material( "effects/yellowflare" )
function EFFECT:Init( data )
self.Position = data:GetStart()
self.WeaponEnt = data:GetEntity()
self.Attachment = data:GetAttachment()
self.StartPos = self:GetTracerShootPos( self.Position, self.WeaponEnt, self.Attachment... | mit |
AllAboutEE/nodemcu-firmware | lua_modules/redis/redis.lua | 86 | 2621 | ------------------------------------------------------------------------------
-- Redis client module
--
-- LICENCE: http://opensource.org/licenses/MIT
-- Vladimir Dronnikov <dronnikov@gmail.com>
--
-- Example:
-- local redis = dofile("redis.lua").connect(host, port)
-- redis:publish("chan1", foo")
-- redis:subscribe("... | mit |
matthewhesketh/mattata | plugins/fileid.lua | 2 | 1642 | --[[
Copyright 2020 Matthew Hesketh <matthew@matthewhesketh.com>
This code is licensed under the MIT. See LICENSE for details.
]]
local fileid = {}
local mattata = require('mattata')
local id = require('plugins.id')
function fileid:init()
fileid.commands = mattata.commands(self.info.username):command('fil... | mit |
blueyed/awesome | lib/beautiful/theme_assets.lua | 3 | 8564 | ----------------------------------------------------------------------------
--- Generate vector assets using current colors.
--
-- @author Yauhen Kirylau <yawghen@gmail.com>
-- @copyright 2015 Yauhen Kirylau
-- @module beautiful.theme_assets
-----------------------------------------------------------------------... | gpl-2.0 |
CrazyEddieTK/Zero-K | effects/arch.lua | 25 | 3934 | -- archshells
-- archplosion
return {
["archshells"] = {
shells = {
air = true,
class = [[CSimpleParticleSystem]],
count = 1,
ground = true,
water = true,
properties = {
airdrag = 0.97,
... | gpl-2.0 |
CrazyEddieTK/Zero-K | units/tankassault.lua | 5 | 3337 | unitDef = {
unitname = [[tankassault]],
name = [[Minotaur]],
description = [[Assault Tank]],
acceleration = 0.0237,
brakeRate = 0.04786,
buildCostMetal = 850,
builder = false,
buildPic = [[tankassault.png]],
canGuard ... | gpl-2.0 |
sigma-random/wireshark | test/lua/luatest.lua | 35 | 4498 | -- See Copyright Notice in the file LICENSE
-- arrays: deep comparison
local function eq (t1, t2, lut)
if t1 == t2 then return true end
if type(t1) ~= "table" or type(t2) ~= "table" or #t1 ~= #t2 then
return false
end
lut = lut or {} -- look-up table: are these 2 arrays already compared?
lut[t1] = lut[t... | gpl-2.0 |
czfshine/Don-t-Starve | data/scripts/brain.lua | 1 | 4874 |
BrainWrangler = Class(function(self)
self.instances = {}
self.updaters = {}
self.tickwaiters = {}
self.hibernaters = {}
end)
BrainManager = BrainWrangler()
function BrainWrangler:OnRemoveEntity(inst)
--print ("onremove", inst, debugstack())
if inst.brain and self.instances[ins... | gpl-2.0 |
kasperlewau/casketUI | BasicChatMods/Locales/frFR.lua | 1 | 3590 |
if GetLocale() ~= "frFR" then return end
local _, BCM = ...
BCM["BCM_AutoLog"] = "Enregistre automatiquement le journal de discussion une fois connecté et enregistre automatiquement le journal de combat dans les instances de raid." -- Needs review
BCM["BCM_ButtonHide"] = "Cache complètement les boutons latéraux de... | mit |
dani-sj/iman22 | 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 |
ioiasff/creawq | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.