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 |
|---|---|---|---|---|---|
lcheylus/haka | sample/ruleset/http/security.lua | 3 | 1067 | ------------------------------------
-- HTTP Attacks
------------------------------------
-- detect malicious web scanners
haka.rule {
hook = http.events.request,
eval = function (http, request)
--user-agent patterns of known web scanners
local http_useragent = {
nikto = '.+%(Nikto%/.+%)%s%(Evasions:.+%)%s%(T... | mpl-2.0 |
krstal/CrYsTaL | plugins/set.lua | 4 | 1060 | local function save_value(msg, name, value)
if (not name or not value) then
return "Usage: !set var_name value"
end
local hash = nil
if msg.to.type == 'chat' or msg.to.type == 'channel' then
hash = 'chat:'..msg.to.id..':variables'
end
if hash then
redis:hset(hash, name, value)
return "Saved... | gpl-2.0 |
shwsun/yavc | lua/plugin-list.lua | 1 | 4960 | local cmd = vim.cmd
cmd("packadd packer.nvim")
local present, packer = pcall(require, "packer")
if not present then
local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim"
print("Cloning packer..")
-- remove the dir before cloning
vim.fn.delete(packer_path, "rf")
vim.fn... | mit |
vzaramel/kong | spec/plugins/mashape-analytics/buffer_spec.lua | 2 | 3814 | require "kong.tools.ngx_stub"
local ALFBuffer = require "kong.plugins.mashape-analytics.buffer"
local json = require "cjson"
local ALF_STUB = {hello = "world"}
local CONF_STUB = {
batch_size = 100,
delay = 2
}
local str = json.encode(ALF_STUB)
local STUB_LEN = string.len(str)
describe("ALFBuffer", function()
l... | apache-2.0 |
vzaramel/kong | kong/plugins/request-transformer/access.lua | 2 | 4046 | local utils = require "kong.tools.utils"
local stringy = require "stringy"
local Multipart = require "multipart"
local _M = {}
local CONTENT_LENGTH = "content-length"
local FORM_URLENCODED = "application/x-www-form-urlencoded"
local MULTIPART_DATA = "multipart/form-data"
local CONTENT_TYPE = "content-type"
local HOST... | apache-2.0 |
GraphicGame/quick-ejoy2d | quick/demos/kofanim/src/kofanim.lua | 2 | 1907 | local ej = require "ejoy2d"
local Stage = require "quick.lua.Stage"
local Layer = require "quick.lua.Layer"
local Sprite = require "quick.lua.Sprite"
local Resources = require "quick.lua.Resources"
local Screen = require "quick.lua.Screen"
--舞台
local _stage
--背景层
local _layerBackground
--精灵层
local _layerSprites
---
-... | mit |
m-creations/openwrt | feeds/luci/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua | 48 | 11450 | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
-- Data init --
local fs = require "nixio.fs"
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
if not uci:get("network", "wan") ... | gpl-2.0 |
zhaohao/waifu2x | lib/image_loader.lua | 32 | 2887 | local gm = require 'graphicsmagick'
local ffi = require 'ffi'
require 'pl'
local image_loader = {}
function image_loader.decode_float(blob)
local im, alpha = image_loader.decode_byte(blob)
if im then
im = im:float():div(255)
end
return im, alpha
end
function image_loader.encode_png(rgb, alpha)
if... | mit |
mamaddeveloper/outo | plugins/hearthstone.lua | 7 | 2109 | -- Plugin for the Hearthstone database provided by hearthstonejson.com.
if not hs_dat then
hs_dat = {}
local jstr, res = HTTPS.request('http://hearthstonejson.com/json/AllSets.json')
if res ~= 200 then
print('Error connecting to hearthstonejson.com.')
print('hearthstone.lua will not be enabled.')
end
local... | gpl-2.0 |
Eugene-Ye/fanclub | app/libs/db.lua | 1 | 3052 | local sgsub = string.gsub
local tinsert = table.insert
local type = type
local ipairs = ipairs
local pairs = pairs
local mysql = require("resty.mysql")
local cjson = require("cjson")
local utils = require("app.libs.utils")
local config = require("app.config.config")
local DB = {}
function DB:new(conf)
conf = conf ... | mit |
deepak78/new-luci | build/luadoc/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 |
BytewaveMLP/SteamGroupRewardsFramework | lua/sgrf/config.lua | 1 | 1897 | --[[-------------------------
GENERAL SETTINGS
General configuration options.
--------------------------]]--
SGRF.Config = SGRF.Config or {} -- DO NOT TOUCH ME
--- Commands to open the Steam group page
-- These commands may be used in chat to open the Steam group page for the group designated
-- below.... | gpl-3.0 |
ziz/solarus | quests/zsxd/data/maps/map0065.lua | 1 | 7175 | -- Temple of Stupidities 1F NE
will_remove_water = false
function event_map_started(destination_point_name)
-- switches of stairs of the central room
for i = 1,7 do
if not sol.game.savegame_get_boolean(292 + i) then
sol.map.stairs_set_enabled("stairs_"..i, false)
sol.map.switch_set_activated("sta... | gpl-3.0 |
hoelzl/Xbt.lua | src/test/test_util.lua | 1 | 4797 | --- Tests for the utility functions.
-- @copyright 2015, Matthias Hölzl
-- @author Matthias Hölzl
-- @license MIT, see the file LICENSE.md.
local util = require("xbt.util")
local lunatest = require("lunatest")
local assert_equal = lunatest.assert_equal
local assert_not_equal = lunatest.assert_not_equal
local assert_e... | mit |
mangostaniko/cg15-seganku | external/bullet/bullet-2.82-r2704/Demos/premake4.lua | 10 | 2983 |
function createDemos( demos, incdirs, linknames)
for _, name in ipairs(demos) do
project ( "App_" .. name )
kind "ConsoleApp"
targetdir ".."
includedirs {incdirs}
configuration { "Windows" }
defines { "GLEW_STATIC"}
links { "opengl32" }
includedirs{ "../Glut" }
libd... | apache-2.0 |
misterdustinface/Lua-Synergy | Lua-Synergy/src/IO/STD.lua | 1 | 1614 | require 'tif'
STD = { }
local writeTable
local writeBoolean
local writeValue
local writeValueDispatchTable = {
["nil"] = function() io.write("nil") end,
boolean = writeBoolean,
number = io.write,
string = io.write,
table = writeTable,
}
function writeBoolean(x)
io.write( tif(x, "true", "false") )
en... | gpl-2.0 |
KNIGHTTH0R/uzz | 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 |
paulmarsy/Console | Libraries/nmap/App/nselib/url.lua | 5 | 11906 | ---
-- URI parsing, composition, and relative URL resolution.
--
-- A URL is represented as a table with the following entries:
-- * <code>scheme</code>
-- * <code>fragment</code>
-- * <code>query</code>
-- * <code>params</code>
-- * <code>authority</code>
-- * <code>userinfo</code>
-- * <code>path</code>
-- * <code>po... | mit |
MmxBoy/test2 | bot/sbssxybot.lua | 1 | 6866 | 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 |
Crazy-Duck/junglenational | game/dota_addons/junglenational/scripts/vscripts/libraries/animations.lua | 1 | 16025 | ANIMATIONS_VERSION = "1.00"
--[[
Lua-controlled Animations Library by BMD
Installation
-"require" this file inside your code in order to gain access to the StartAnmiation and EndAnimation global.
-Additionally, ensure that this file is placed in the vscripts/libraries path and that the vscripts/libraries/modi... | mit |
Samanstar/tele-Manager | 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 |
alinfrat/nefratrobot | 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 |
loringmoore/The-Forgotten-Server | data/npc/lib/npcsystem/keywordhandler.lua | 8 | 5090 | -- Advanced NPC System by Jiddo
if KeywordHandler == nil then
KeywordNode = {
keywords = nil,
callback = nil,
parameters = nil,
children = nil,
parent = nil
}
-- Created a new keywordnode with the given keywords, callback function and parameters and without any childNodes.
function KeywordNode:new(keys,... | gpl-2.0 |
m-creations/openwrt | feeds/luci/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/iwinfo.lua | 31 | 1569 | -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.iwinfo", package.seeall)
function rrdargs( graph, plugin, plugin_instance )
--
-- signal/noise diagram
--
local snr = {
title = "%H: Signal and noise on %pi",
... | gpl-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/applications/luci-multiwan/luasrc/model/cbi/multiwan/multiwan.lua | 7 | 5178 | require("luci.tools.webadmin")
m = Map("multiwan", translate("Multi-WAN"),
translate("Multi-WAN allows for the use of multiple uplinks for load balancing and failover."))
s = m:section(NamedSection, "config", "multiwan", "")
e = s:option(Flag, "enabled", translate("Enable"))
e.rmempty = false
function e.write(self,... | gpl-2.0 |
RvdE/pdns | pdns/recursordist/contrib/powerdns-example-script.lua | 14 | 3915 | pdnslog("pdns-recursor Lua script starting!", pdns.loglevels.Warning)
blockset = newDS()
blockset:add{"powerdns.org", "xxx"}
dropset = newDS();
dropset:add("123.cn")
malwareset = newDS()
malwareset:add("nl")
magic2 = newDN("www.magic2.com")
magicMetric = getMetric("magic")
-- shows the various ways of blocking, ... | gpl-2.0 |
Jagannadhvj/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 |
yetsky/extra | luci/applications/luci-shadowsocks/luasrc/model/cbi/shadowsocks.lua | 1 | 3723 | --[[
RA-MOD
]]--
local fs = require "nixio.fs"
local sslocal =(luci.sys.call("pidof ss-local > /dev/null") == 0)
local ssredir =(luci.sys.call("pidof ss-redir > /dev/null") == 0)
if sslocal or ssredir then
m = Map("shadowsocks", translate("shadowsocks"), translate("shadowsocks is running"))
else
m = Map("shadowsoc... | gpl-2.0 |
frodrigo/osrm-backend | third_party/flatbuffers/samples/lua/MyGame/Sample/Monster.lua | 17 | 3936 | -- automatically generated by the FlatBuffers compiler, do not modify
-- namespace: Sample
local flatbuffers = require('flatbuffers')
local Monster = {} -- the module
local Monster_mt = {} -- the class metatable
function Monster.New()
local o = {}
setmetatable(o, {__index = Monster_mt})
return o
end
fun... | bsd-2-clause |
Sevenanths/boson-t-nouveau | NewBosonT/NewBosonT/bin/Debug/boson/data/scan.lua | 2 | 3181 | local hscan_line = generate_hlightning(33)
local speed = 2
function make_hscan(level)
if level.generating then
return
end
local y_error1 = -0.5
local y_error2 = man_height + 0.5
local x_error = config.platform_width_scale * 0.4
local player = level.player
local y = config.level_cen... | gpl-2.0 |
mofax/cardpeek | dot_cardpeek_dir/scripts/e-passport.lua | 16 | 19873 | --
-- This file is part of Cardpeek, the smartcard reader utility.
--
-- Copyright 2009-2013 by 'L1L1'
--
-- Cardpeek is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (a... | gpl-3.0 |
weitjong/Urho3D | Source/ThirdParty/toluapp/src/bin/lua/define.lua | 43 | 1317 | -- tolua: define class
-- Written by Waldemar Celes
-- TeCGraf/PUC-Rio
-- Jul 1998
-- $Id: define.lua,v 1.2 1999/07/28 22:21:08 celes Exp $
-- This code is free software; you can redistribute it and/or modify it.
-- The software provided hereunder is on an "as is" basis, and
-- the author has no obligation to provide ... | mit |
osgcc/ryzom | ryzom/common/data_common/r2/r2_features_give_item.lua | 3 | 17110 |
-- In Translation file
-- Category : uiR2EdGiveItem --
-- CreationFrom : uiR2EdGiveItemParameters
r2.Features.GiveItemFeature = {}
local feature = r2.Features.GiveItemFeature
feature.Name="GiveItemFeature"
feature.Description="A feature that allows a NPC to give some item(s) to the player"
feature.Components = {... | agpl-3.0 |
cochrane/OpenTomb | scripts/level/tr1/LEVEL2.lua | 2 | 1111 | -- OPENTOMB STATIC MESH COLLISION SCRIPT
-- FOR TOMB RAIDER, LEVEL2 (CAVES)
print("Level script loaded (LEVEL1.lua)");
-- STATIC COLLISION FLAGS ------------------------------------------------------
--------------------------------------------------------------------------------
static_tbl[06] = {coll = COLLISION_T... | lgpl-3.0 |
mamadantimageeee/antimage | bot/seedbot.lua | 1 | 10314 | 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 |
plinkopenguin/wire-extras | lua/entities/gmod_wire_useholoemitter/cl_init.lua | 1 | 6610 | include( "shared.lua" );
CreateClientConVar("cl_wire_holoemitter_minfaderate",10,true,false);
// mats
local matbeam = Material( "tripmine_laser" );
local matpoint = Material( "sprites/gmdm_pickups/light" );
// init
function ENT:Initialize( )
// point list
self.PointList = {};
self.LastClear = self:GetNetw... | gpl-3.0 |
sealgair/Jolly-Xanthar | mobs/human.lua | 1 | 2049 | require 'utils'
require 'mobs.mob'
require 'weapons.bolter'
require 'weapons.laser'
require 'weapons.forcefield'
Weapons = {
[Bolter.name] = Bolter,
[LaserRifle.name] = LaserRifle,
[ForceField.name] = ForceField,
}
Human = Mob:extend('Human')
function Human:init(coord, opts)
if opts == nil then opts = {} end... | gpl-3.0 |
rigeirani/sg1 | plugins/img_google.lua | 660 | 3196 | do
local mime = require("mime")
local google_config = load_from_file('data/google.lua')
local cache = {}
--[[
local function send_request(url)
local t = {}
local options = {
url = url,
sink = ltn12.sink.table(t),
method = "GET"
}
local a, code, headers, status = http.request(options)
return tabl... | gpl-2.0 |
mamaddeveloper/uzz | 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 |
masterweb121/telegram-bot | plugins/time.lua | 771 | 2865 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
MmxBoy/mmxanti2 | plugins/time.lua | 771 | 2865 | -- Implement a command !time [area] which uses
-- 2 Google APIs to get the desired result:
-- 1. Geocoding to get from area to a lat/long pair
-- 2. Timezone to get the local time in that lat/long location
-- Globals
-- If you have a google api key for the geocoding/timezone api
api_key = nil
base_api = "https://m... | gpl-2.0 |
hoelzl/Xbt.lua | src/sci/mcmc/_nuts.lua | 2 | 10457 | --------------------------------------------------------------------------------
-- NUTS MCMC sampler.
--
-- Copyright (C) 2011-2014 Stefano Peluchetti. All rights reserved.
--
-- Features, documentation and more: http://www.scilua.org .
--
-- This file is part of the SciLua library, which is released under the MIT
--... | mit |
ImagicTheCat/vRP | vrp/cfg/phone.lua | 1 | 3496 |
local cfg = {}
-- size of the sms history
cfg.sms_history = 15
-- maximum size of an sms
cfg.sms_size = 500
-- duration of a sms position marker (in seconds)
cfg.smspos_duration = 300
-- {ent,cfg} will fill cfg.title, cfg.pos
cfg.smspos_map_entity = {"PoI", {blip_id = 162, blip_color = 37}}
cfg.clear_phone_on_dea... | mit |
xordspar0/synthein | src/world/shipparts/part.lua | 1 | 1438 | -- Utilities
local vector = require("vector")
local LocationTable = require("locationTable")
local Draw = require("world/draw")
local Part = class()
function Part:__create()
self.physicsShape = nil
self.connectableSides = {true, true, true, true}
self.thrust = 0
self.torque = 0
self.gun = false
self.type = "gen... | gpl-3.0 |
osgcc/ryzom | ryzom/common/data_common/r2/r2_features.lua | 3 | 34413 |
-- for client : register a component into C using the 'registerGenerator' function and add
-- it into the list of classes
-- copy class properties & methods
local reservedMembers = { Prop = true,
BaseClass = true,
NameToProp = true,
-- native properties
Pa... | agpl-3.0 |
masterweb121/telegram-bot | plugins/rae.lua | 616 | 1312 | do
function getDulcinea( text )
-- Powered by https://github.com/javierhonduco/dulcinea
local api = "http://dulcinea.herokuapp.com/api/?query="
local query_url = api..text
local b, code = http.request(query_url)
if code ~= 200 then
return "Error: HTTP Connection"
end
dulcinea = json:decode(b)
... | gpl-2.0 |
iamliqiang/prosody-modules | mod_storage_ldap/ldap/vcard.lib.lua | 40 | 5035 | -- vim:sts=4 sw=4
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2012 Rob Hoelz
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local st = require 'util.stanza';
local VCARD_NS = 'vc... | mit |
emptyrivers/WeakAuras2 | WeakAuras/WeakAuras.lua | 1 | 170642 | local AddonName, Private = ...
local internalVersion = 40
-- Lua APIs
local insert = table.insert
-- WoW APIs
local GetTalentInfo, IsAddOnLoaded, InCombatLockdown = GetTalentInfo, IsAddOnLoaded, InCombatLockdown
local LoadAddOn, UnitName, GetRealmName, UnitRace, UnitFactionGroup, IsInRaid
= LoadAddOn, UnitName, Ge... | gpl-2.0 |
samuelctabor/ardupilot | libraries/AP_Scripting/examples/LED_roll.lua | 26 | 2127 | --[[
Script to control LED strips based on the roll of the aircraft. This is an example to demonstrate
the LED interface for WS2812 LEDs
--]]
--[[
for this demo we will use a single strip with 30 LEDs
--]]
local num_leds = 30
--[[
use SERVOn_FUNCTION 94 for LED. We can control up to 16 separate strips of LEDs
by pu... | gpl-3.0 |
deepak78/new-luci | applications/luci-app-statistics/luasrc/statistics/i18n.lua | 29 | 2184 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.i18n", package.seeall)
require("luci.util")
require("luci.i18n")
Instance = luci.util.class()
function Instance.__init__( self, graph )
self.i18n = luci.i18n
se... | apache-2.0 |
m-creations/openwrt | feeds/luci/applications/luci-app-statistics/luasrc/statistics/i18n.lua | 29 | 2184 | -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.i18n", package.seeall)
require("luci.util")
require("luci.i18n")
Instance = luci.util.class()
function Instance.__init__( self, graph )
self.i18n = luci.i18n
se... | gpl-2.0 |
airsalliance/gateway_implementation_demo | proxy_configs/authorize.lua | 1 | 2512 | local random = require 'resty.random'
local cjson = require 'cjson'
local ts = require 'threescale_utils'
local redis = require 'resty.redis'
local red = redis:new()
function check_return_url(client_id, return_url)
local res = ngx.location.capture("/_threescale/redirect_uri_matches",
{ vars = { red_url = return_... | mit |
spark51/spark_robot | plugins/id.lua | 355 | 2795 | local function user_print_name(user)
if user.print_name then
return user.print_name
end
local text = ''
if user.first_name then
text = user.last_name..' '
end
if user.lastname then
text = text..user.last_name
end
return text
end
local function returnids(cb_extra, success, resu... | gpl-2.0 |
m-creations/openwrt | feeds/routing/bird-openwrt/bird4-openwrt/src/model/gen_proto.lua | 7 | 6399 | --[[
Copyright (C) 2014 - Eloi Carbó Solé (GSoC2014)
BGP/Bird integration with OpenWRT and QMP
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) a... | gpl-2.0 |
emptyrivers/WeakAuras2 | WeakAurasOptions/OptionsFrames/IconPicker.lua | 1 | 7187 | if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
-- Lua APIs
local pairs = pairs
-- WoW APIs
local CreateFrame, GetSpellInfo = CreateFrame, GetSpellInfo
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
l... | gpl-2.0 |
cjshmyr/OpenRA | mods/d2k/maps/ordos-02b/ordos02b.lua | 2 | 2647 | --[[
Copyright 2007-2017 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 |
samuelctabor/ardupilot | libraries/AP_Scripting/applets/Heli_IM_COL_Tune.lua | 24 | 5180 | -- This script is a useful tool when first setting up a heli. You can use it to dial in the IM_STB_COL_2 and
-- IM_STAB_COL_3 parameters in a more intuative way. It is meant for use with a transmitter that has two pots
-- available. 1 Pot can be used to control the gradient of the line between the 40% and 60% curve... | gpl-3.0 |
akowal/dotfiles | homedir/hammerspoon/init.lua | 1 | 2491 | hs.window.animationDuration = 0
local TRIGGER_RESIZE = {"cmd", "ctrl"}
local TRIGGER_MOVE = {"cmd", "ctrl", "alt"}
hs.hotkey.bind(TRIGGER_RESIZE, "c", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen():frame()
win:setFullscreen(false)
f.x = screen.x
f.y = ... | mit |
Godfather021/best | plugins/moderation.lua | 1 | 11161 | do
local function check_member(extra, success, result)
local data = extra.data
for k,v in pairs(result.members) do
if v.id ~= our_id then
data[tostring(extra.msg.to.id)] = {
moderators = {[tostring(v.id)] = v.username},
settings = {
set_name = string.gsub(extra.m... | gpl-2.0 |
Eugene-Ye/fanclub | app/libs/uuid/uuid.lua | 2 | 1873 | local ffi = require "ffi"
local ffi_new = ffi.new
local ffi_str = ffi.string
local ffi_load = ffi.load
local ffi_cdef = ffi.cdef
local C = ffi.C
local os = ffi.os
local tonumber = tonumber
local setmetatable = setmetatable
ffi_cdef[[
typedef unsigned char uuid_t[16];... | mit |
lcheylus/haka | modules/protocol/http/test/request-modif.lua | 3 | 1137 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local http = require("protocol/http")
http.install_tcp_rule(80)
haka.rule {
hook = http.events.request,
eval = fu... | mpl-2.0 |
ImagicTheCat/vRP | vrp/modules/audio.lua | 1 | 2980 | -- https://github.com/ImagicTheCat/vRP
-- MIT license (see LICENSE or vrp/vRPShared.lua)
if not vRP.modules.audio then return end
local Audio = class("Audio", vRP.Extension)
local lang = vRP.lang
-- PRIVATE METHODS
-- menu: admin
local function menu_admin(self)
local function m_audiosource(menu)
local user = ... | mit |
emptyrivers/WeakAuras2 | WeakAuras/RegionTypes/RegionPrototype.lua | 1 | 26130 | if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras;
local L = WeakAuras.L;
local GetAtlasInfo = WeakAuras.IsClassic() and GetAtlasInfo or C_Texture.GetAtlasInfo
WeakAuras.regionPrototype = {};
local SubRegionEventSystem =
{
ClearSubscribers = function(se... | gpl-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/applications/luci-siitwizard/luasrc/model/cbi/siitwizard.lua | 11 | 10095 | --[[
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 |
iamliqiang/prosody-modules | mod_openid/mod_openid.lua | 32 | 15176 | local usermanager = require "core.usermanager"
local httpserver = require "net.httpserver"
local jidutil = require "util.jid"
local hmac = require "hmac"
local base64 = require "util.encodings".base64
local humane = require "util.serialization".serialize
-- Configuration
local base = "openid"
local openidns = "http:... | mit |
otland/forgottenserver | data/lib/core/item.lua | 4 | 21833 | function Item.getType(self)
return ItemType(self:getId())
end
function Item:getClassification()
return self:getType():getClassification()
end
function Item.isContainer(self)
return false
end
function Item.isCreature(self)
return false
end
function Item.isMonster(self)
return false
end
function Item.isNpc(self... | gpl-2.0 |
KNIGHTTH0R/uzz | plugins/help.lua | 2 | 2794 | do
function pairsByKeys(t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local iter = function () -- iterator function
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
... | gpl-2.0 |
Native-Software/Krea | CoronaGameEditor/bin/Release/Lua Repository/pathfollow.lua | 3 | 6343 | --- This module is provided as it by Native-Software for use into a Krea project.
-- @description Module managing the path that an object should follow
-- <br>Changing the content of this file is at your own risk.
-- As the software Krea uses this file to auto-generate code, it can create errors during generation if y... | gpl-2.0 |
lcheylus/haka | modules/protocol/http/http_utils.lua | 5 | 6141 | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
local class = require('class')
local module = {}
module.uri = {}
module.cookies = {}
local _unreserved = table.di... | mpl-2.0 |
MmxBoy/mmxanti2 | 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 |
Crazy-Duck/junglenational | game/dota_addons/junglenational/scripts/vscripts/internal/junglenational.lua | 1 | 10040 | -- This function initializes the game mode and is called before anyone loads into the game
-- It can be used to pre-initialize any values/tables that will be needed later
function JungleNational:_InitJungleNational()
if JungleNational._reentrantCheck then
return
end
-- Setup rules
GameRules:SetHeroRespawnE... | mit |
project-zerus/thrift | lib/lua/TJsonProtocol.lua | 42 | 18656 | --
-- 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 |
comitservice/nodmcu | examples/telnet.lua | 5 | 1067 | print("====Wicon, a LUA console over wifi.==========")
print("Author: openthings@163.com. copyright&GPL V2.")
print("Last modified 2014-11-19. V0.2")
print("Wicon Server starting ......")
function startServer()
print("Wifi AP connected. Wicon IP:")
print(wifi.sta.getip())
sv=net.createServer(net.TCP, 180)
... | mit |
weitjong/Urho3D | bin/Data/LuaScripts/09_MultipleViewports.lua | 24 | 13081 | -- Multiple viewports example.
-- This sample demonstrates:
-- - Setting up two viewports with two separate cameras
-- - Adding post processing effects to a viewport's render path and toggling them
require "LuaScripts/Utilities/Sample"
local rearCameraNode = nil
function Start()
-- Execute the ... | mit |
gtaylormb/fpga_nes | sw/scripts/cpu_asm.lua | 3 | 6666 | ----------------------------------------------------------------------------------------------------
-- Script: cpu_asm.lua
-- Description: CPU test. Execute externally built asm programs from the ../asm directory. Useful
-- for more detailed directed tests, especially since cpu_rand doesn't cover b... | bsd-2-clause |
allwenandashi/1 | plugins/write.lua | 2 | 28646 | local function run(msg, matches)
if #matches < 2 then
return "بعد از این دستور، با قید یک فاصله کلمه یا جمله ی مورد نظر را جهت زیبا نویسی وارد کنید"
end
if string.len(matches[2]) > 20 then
return "حداکثر حروف مجاز 20 کاراکتر انگلیسی و عدد است"
end
local font_base = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,... | gpl-2.0 |
iamliqiang/prosody-modules | mod_register_web/mod_register_web.lua | 27 | 5718 | local captcha_options = module:get_option("captcha_options", {});
local nodeprep = require "util.encodings".stringprep.nodeprep;
local usermanager = require "core.usermanager";
local http = require "net.http";
local path_sep = package.config:sub(1,1);
module:depends"http";
local extra_fields = {
nick = true; name = ... | mit |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/contrib/luadoc/lua/luadoc/taglet/standard.lua | 93 | 16319 | -------------------------------------------------------------------------------
-- @release $Id: standard.lua,v 1.39 2007/12/21 17:50:48 tomas Exp $
-------------------------------------------------------------------------------
local assert, pairs, tostring, type = assert, pairs, tostring, type
local io = require "io... | gpl-2.0 |
paulmarsy/Console | Libraries/nmap/App/nselib/data/psexec/drives.lua | 8 | 1334 | ---This configuration file pulls info about a given harddrive
-- Any variable in the 'config' table in smb-psexec.nse can be overriden in the
-- 'overrides' table. Most of them are not really recommended, such as the host,
-- key, etc.
overrides = {}
--overrides.timeout = 40
modules = {}
local mod
mod = {}
mod.uploa... | mit |
Murfalo/game-off-2016 | startup.lua | 1 | 2356 | ----
-- startup.lua
--
-- This file contains numerous routines used when starting the game. This is
-- to help prevent main.lua from becoming too confusing.
----
local Keymap = require "xl.Keymap"
local Gamestate = require "hump.gamestate"
local DebugMenu = require "state.DebugMenu"
local ObjChar = require "objects... | mit |
emptyrivers/WeakAuras2 | WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua | 1 | 6311 | if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasImportButton", 20
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
local L = WeakAuras.L;
local function Hide_Tooltip()
GameTooltip:Hide();
end
... | gpl-2.0 |
Murfalo/game-off-2016 | extra.lua | 1 | 4063 | ----
-- extra.lua
--
-- This file holds a bunch of miscellaneous utility functions that use other
-- libraries. Unlike util.lua, these functions are tied much more directly
-- to the game itself.
----
local Scene = require "xl.Scene"
local anim8 = require "anim8"
local Gamestate = require "hump.gamestate"
local MaxM... | mit |
xordspar0/synthein | src/world/world.lua | 1 | 5543 | local Missile = require("world/missile")
local Particles = require("world/particles")
local Shot = require("world/shot")
local Structure = require("world/structure")
local PhysicsReferences = require("world/physicsReferences")
local World = class()
World.objectTypes = {
structure = Structure,
shot = Shot,
mis... | gpl-3.0 |
MmxBoy/Metal-bot | 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 |
m-creations/openwrt | feeds/luci/build/luadoc/luadoc/taglet/standard/tags.lua | 46 | 5543 | -------------------------------------------------------------------------------
-- Handlers for several tags
-- @release $Id: tags.lua,v 1.8 2007/09/05 12:39:09 tomas Exp $
-------------------------------------------------------------------------------
local luadoc = require "luadoc"
local util = require "luadoc.util"... | gpl-2.0 |
MmxBoy/mmxanti2 | plugins/danbooru.lua | 616 | 1750 | do
local URL = "http://danbooru.donmai.us"
local URL_NEW = "/posts.json"
local URL_POP = "/explore/posts/popular.json"
local scale_day = "?scale=day"
local scale_week = "?scale=week"
local scale_month = "?scale=month"
local function get_post(url)
local b, c, h = http.request(url)
if c ~= 200 then return nil end
... | gpl-2.0 |
ferstar/openwrt-dreambox | feeds/luci/luci/luci/applications/luci-statistics/luasrc/model/cbi/luci_statistics/exec.lua | 4 | 2717 | --[[
Luci configuration model for statistics - collectd exec plugin configuration
(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License ... | gpl-2.0 |
jiankers/Atlas | lib/proxy/balance.lua | 41 | 2807 | --[[ $%BEGINLICENSE%$
Copyright (c) 2007, 2008, 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 |
Ennea/eUI | eActionBars/libs/LibKeyBound-1.0/Locale-esES.lua | 2 | 2368 | --[[
LibKeyBound-1.0 localization file
Spanish by StiviS
--]]
if (GetLocale() ~= "esES") then
return
end
local REVISION = 90000 + tonumber(string.match("$Revision: 92 $", "%d+"))
if (LibKeyBoundLocale10 and REVISION <= LibKeyBoundLocale10.REVISION) then
return
end
LibKeyBoundLocale10 = {
REVISION = REVISION;
... | mit |
Oxygem/Oxycore | modules/admin/get/users.lua | 1 | 1624 | -- Oxypanel Core/Admin
-- File: get/users.lua
-- Desc: add/edit/list users
local template, database, request, user, users = oxy.template, luawa.database, luawa.request, luawa.user, oxy.users
--groups
local groups = database:select('user_groups', '*')
template:set('groups', groups)
--add user?
if request.get.action =... | mit |
osgcc/ryzom | ryzom/common/data_common/r2/r2_core_user_component_manager.lua | 3 | 52500 | r2_core = {}
r2_core.UserComponentsPath = "./examples/user_components/"
r2_core.UserComponentTable = {}
r2_core.UserComponentManager = {}
local userComponentManager = r2_core.UserComponentManager
userComponentManager.CurrentExportList = {}
userComponentManager.InstanceIds = {}
userComponentManager.Texts = {}
us... | agpl-3.0 |
vzaramel/kong | kong/dao/postgres/query_builder.lua | 1 | 5822 | local _M = {}
local constants = require "kong.constants"
local pgmoon = require "pgmoon"
local pg = pgmoon.new({});
local function escape_literal(s)
return pg:escape_literal(s)
end
local function escape_identifier(s)
return pg:escape_identifier(s)
end
local function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1")... | apache-2.0 |
amohanta/rspamd | src/plugins/lua/rbl.lua | 2 | 16433 | --[[
Copyright (c) 2011-2015, Vsevolod Stakhov <vsevolod@highsecure.ru>
Copyright (c) 2013-2015, Andrew Lewis <nerf@judo.za.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of sou... | bsd-2-clause |
cjshmyr/OpenRA | mods/d2k/maps/ordos-02a/ordos02a.lua | 2 | 4024 | --[[
Copyright 2007-2017 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 |
tangentialism/google-diff-match-patch | lua/diff_match_patch.lua | 265 | 73869 | --[[
* Diff Match and Patch
*
* Copyright 2006 Google Inc.
* http://code.google.com/p/google-diff-match-patch/
*
* Based on the JavaScript implementation by Neil Fraser.
* Ported to Lua by Duncan Cross.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | apache-2.0 |
ProtectionTeam/PCT | plugins/msg-checks.lua | 2 | 18847 | local TIME_CHECK = 2
local function pre_process(msg)
local data = load_data(_config.moderation.data)
local chat = msg.to.id
local user = msg.from.id
local is_channel = msg.to.type == "channel"
local is_chat = msg.to.type == "chat"
local auto_leave = 'auto_leave_bot'
local hash = "gp_lang:"..chat
local lang = redis:get... | gpl-3.0 |
JodliDev/DsMMO | mod/scripts/components/DsMMO.lua | 1 | 36570 | ----------settings----------
local VERSION = 9
local LEVEL_MAX = 10
local LEVEL_UP_RATE = GetModConfigData("level_up_rate", KnownModIndex:GetModActualName("DsMMO")) or 1.5
local PENALTY_DIVIDE = GetModConfigData("penalty_divide", KnownModIndex:GetModActualName("DsMMO")) or 2
local RECIPE_DISTANCE = 10
local DSMMO_ACTI... | apache-2.0 |
lite5/lua-codec | test/test_rsa_encrypt_decrypt.lua | 3 | 1474 | local codec = require('codec')
local src = '123456'
local pubpem = [[-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsxjKD2lnmkmELoo5QphM/VdRE
JKym26R0T+19JDa3MVZFDbwgUGT8XM8bElrKgxexhTVRt07btyIejdbiPx7sCbWc
VP8peZI+QZEVVzaE2Ci5n0lP9v9GUSl0QfZU94uIwl++BVq0VFvbHax/R/q4oTRD
1u73ASM27QW42+cJFwIDAQAB
----... | mit |
jcmoyer/hug | vector2.lua | 1 | 7471 | --
-- Copyright 2013 J.C. Moyer
--
-- 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 agreed to in ... | apache-2.0 |
otland/forgottenserver | data/actions/scripts/other/bed_modification_kits.lua | 13 | 1647 | local beds = {
[7904] = {{7811, 7812}, {7813, 7814}}, -- green kit
[7905] = {{7819, 7820}, {7821, 7822}}, -- yellow kit
[7906] = {{7815, 7816}, {7817, 7818}}, -- red kit
[7907] = {{1754, 1755}, {1760, 1761}}, -- removal kit
[20252] = {{20197, 20198}, {20199, 20200}} -- canopy kit
}
local function internalBedTrans... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.