commit stringlengths 40 40 | old_file stringlengths 6 181 | new_file stringlengths 6 181 | old_contents stringlengths 448 7.17k | new_contents stringlengths 449 7.17k | subject stringlengths 0 450 | message stringlengths 6 4.92k | lang stringclasses 1
value | license stringclasses 12
values | repos stringlengths 9 33.9k |
|---|---|---|---|---|---|---|---|---|---|
bcca0549d5a0517d589008b80539241caf332943 | examples/table_align_fix.lua | examples/table_align_fix.lua | -- Pandoc uses the obsolete "align" attribute on th and td elements.
-- This example replaces all such occurrences with the CSS text-align property.
local gumbo = require "gumbo"
local document = assert(gumbo.parseFile(arg[1] or io.stdin))
local function fixAlignAttr(elements)
for i = 1, elements.length do
... | -- Pandoc uses the obsolete "align" attribute on th and td elements.
-- This example replaces all such occurrences with the CSS text-align property.
local gumbo = require "gumbo"
local document = assert(gumbo.parseFile(arg[1] or io.stdin))
local function fixAlignAttr(elements)
for i, element in ipairs(elements) do... | Use ipairs instead of numeric for loop in examples/table_align_fix.lua | Use ipairs instead of numeric for loop in examples/table_align_fix.lua
| Lua | apache-2.0 | craigbarnes/lua-gumbo,craigbarnes/lua-gumbo,craigbarnes/lua-gumbo |
2b5c0796a7a07dfcfeb2099cbd8da6ee80f89a5c | init.lua | init.lua | -- Copyright 2007 Mitchell Foral mitchell<att>caladbolg.net. See LICENSE.
require 'ext/pm'
require 'ext/find'
require 'ext/mime_types'
require 'ext/keys'
local mpath = _HOME..'modules/?.lua;'.._HOME..'/modules/?/init.lua'
package.path = package.path..';'..mpath
-- modules to load on startup
require 'textadept'
-- e... | -- Copyright 2007 Mitchell Foral mitchell<att>caladbolg.net. See LICENSE.
require 'ext/pm'
require 'ext/find'
require 'ext/mime_types'
require 'ext/keys'
local mpath = _HOME..'modules/?.lua;'.._HOME..'/modules/?/init.lua'
package.path = package.path..';'..mpath
-- modules to load on startup
require 'textadept'
-- e... | Fixed command line parameters bug; init.lua When files are passed by the command line, they are assumed to be relative to Textadept's path. Instead, check if the file has a leading '~/' or '/' indicating an absolute path. If so, do not treat it that way. Otherwise treat it as relative. | Fixed command line parameters bug; init.lua
When files are passed by the command line, they are assumed to be relative to
Textadept's path. Instead, check if the file has a leading '~/' or '/'
indicating an absolute path. If so, do not treat it that way. Otherwise treat
it as relative.
| Lua | mit | jozadaquebatista/textadept,jozadaquebatista/textadept |
b8085a01cd82d3f02d693851fbfebba9b9a5e8df | main.lua | main.lua | --[[
Copyright 2014-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 o... | --[[
Copyright 2014-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 o... | Fix invalid references to self | Fix invalid references to self
| Lua | apache-2.0 | zhaozg/lit,luvit/lit |
2fd077d8d6fafddc0ccc7a61d29d9dc70c7fa7f6 | examples/compress.lua | examples/compress.lua | --[[ compress.lua
This example shows how a the compress module can be used to create zip files and write them to
a compatible ostream. Files and directories can be added via istreams and filesystem paths.
--]]
-- the ostream
local fostream = assert(require("poco.fileostream"))
local compress = assert(require... | --[[ compress.lua
This example shows how a the compress module can be used to create zip files and write them to
a compatible ostream. Files and directories can be added via istreams and filesystem paths.
--]]
-- the ostream could be other types, such as pipeostream, teeostream, memoryostream, etc.
local fost... | uncomment addFile() example, fix ostream comment | uncomment addFile() example, fix ostream comment
| Lua | bsd-3-clause | ma-bo/lua-poco,ma-bo/lua-poco |
00304b3c634280db1a63bffa285ce946b06eb243 | examples/scorched.lua | examples/scorched.lua | -- Basic Scorched Earth clone
NUM_PLAYERS = 3
function setup()
setup_terrain()
setup_players()
end
function setup_terrain()
terrain = {}
local periods = {}
local amplitudes = {}
local nwaves = 10
for i = 1, nwaves do
periods[i] = math.random()*0.1 + 0.01
amplitudes[i] = math.ran... | -- Basic Scorched Earth clone
NUM_PLAYERS = 3
function setup()
setup_terrain()
setup_players()
end
function setup_terrain()
terrain = {}
local periods = {}
local amplitudes = {}
local nwaves = 10
for i = 1, nwaves do
periods[i] = math.random()*0.1 + 0.01
amplitudes[i] = ma... | scorched: fix indentation | scorched: fix indentation
| Lua | bsd-2-clause | antirez/load81,seclorum/load81,saisai/load81,antirez/load81,seclorum/load81,saisai/load81,antirez/load81,seclorum/load81,seclorum/load81,antirez/load81,saisai/load81,seclorum/load81,antirez/load81,saisai/load81,saisai/load81 |
64b052bbd8b46779269b8a4a1f10e51a67e0ee7e | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.tools.webadmin")
local fs = require "nixio.fs"
local util = require "nixio.util"
local tp = require "luci.template.parser"
local block = io.popen("block info", "r")
local ln, dev, devices = n... | -- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
require("luci.tools.webadmin")
local fs = require "nixio.fs"
local util = require "nixio.util"
local tp = require "luci.template.parser"
local block = io.popen("block info", "r")
local ln, dev, devices = n... | luci-mod-admin-full: mount points SWAP fix | luci-mod-admin-full: mount points SWAP fix
SWAP section was showing an error. Fixed it to display the devices/size properly. | Lua | apache-2.0 | deepak78/new-luci,taiha/luci,cshore-firmware/openwrt-luci,artynet/luci,ff94315/luci-1,hnyman/luci,shangjiyu/luci-with-extra,db260179/openwrt-bpi-r1-luci,schidler/ionic-luci,MinFu/luci,NeoRaider/luci,remakeelectric/luci,mumuqz/luci,NeoRaider/luci,urueedi/luci,oneru/luci,LazyZhu/openwrt-luci-trunk-mod,kuoruan/luci,db2601... |
89e089e61f79397be4590c95cb616cff1fc9441f | icesl-gallery/gear.lua | icesl-gallery/gear.lua | --[[
The MIT License (MIT)
Copyright (c) 2019 Loïc Fejoz
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, ... | --[[
The MIT License (MIT)
Copyright (c) 2019 Loïc Fejoz
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, ... | fix(gallery): Update and compare gear | fix(gallery): Update and compare gear
Move it into its own function.
Compare with gear provided by IceSL.
Still on-going work.
| Lua | mit | loic-fejoz/loic-fejoz-fabmoments,loic-fejoz/loic-fejoz-fabmoments,loic-fejoz/loic-fejoz-fabmoments |
9c6a3bab1335c17b394a5509d61ae31cffd2bdac | modules/textadept/session.lua | modules/textadept/session.lua | -- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local textadept = _G.textadept
local locale = _G.locale
---
-- Session support for the textadept module.
module('_m.textadept.session', package.seeall)
-- Markdown:
-- ## Settings
--
-- * `DEFAULT_SESSION`: The path to the default session file.... | -- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local textadept = _G.textadept
local locale = _G.locale
---
-- Session support for the textadept module.
module('_m.textadept.session', package.seeall)
-- Markdown:
-- ## Settings
--
-- * `DEFAULT_SESSION`: The path to the default session file.... | Fix error message for session file not found; modules/textadept/session.lua | Fix error message for session file not found; modules/textadept/session.lua
| Lua | mit | rgieseke/textadept,rgieseke/textadept |
dfd19bbe0a990232288fa3426a350e79dab48a89 | .build.lua | .build.lua |
project "CoreLib"
files "core/src/**.cpp"
kind "StaticLib"
zpm.export(function()
includedirs "core/include/"
flags "C++14"
pic "On"
defines {
"PROGRAM_NAME="..zpm.setting( "PROGRAM_NAME" ),
"PROGRAM_COMPANY="..zpm.setting( "PROGRAM_COMP... |
project "CoreLib"
files "core/src/**.cpp"
kind "StaticLib"
zpm.export(function()
includedirs "core/include/"
flags "C++14"
pic "On"
defines {
"PROGRAM_NAME=\""..zpm.setting( "PROGRAM_NAME" ) .. "\"",
"PROGRAM_COMPANY=\""..zpm.setting( "... | Syntax fix | Syntax fix
| Lua | mit | Zefiros-Software/CoreLib,Zefiros-Software/CoreLib |
0b1157d2aefed208643efda66dadb93ccff93899 | docker/test_auth.lua | docker/test_auth.lua | local M = {}
local auth_cookie_name = "kbase_session"
local json = require("json")
local locklib = require("resty.lock")
local httplib = require("resty.http")
local httpclient = httplib:new()
local token_cache = nil
-- tokens live for up to 5 minutes
local max_token_lifespan = 5 * 60
-- local auth_url = 'http://127... | local M = {}
local auth_cookie_name = "kbase_session"
local json = require("json")
local locklib = require("resty.lock")
local httplib = require("resty.http")
local httpclient = httplib:new()
local token_cache = nil
-- tokens live for up to 5 minutes
local max_token_lifespan = 5 * 60
local auth_url = 'http://127.0.... | Fix a few method signatures | Fix a few method signatures
| Lua | mit | pranjan77/narrative,pranjan77/narrative,pranjan77/narrative,kbase/narrative,kbase/narrative,kbase/narrative,briehl/narrative,briehl/narrative,briehl/narrative,jmchandonia/narrative,pranjan77/narrative,briehl/narrative,kbase/narrative,pranjan77/narrative,jmchandonia/narrative,jmchandonia/narrative,kbase/narrative,jmchan... |
55d1d90e3e65cec98ab26e8c7144675b02478241 | api-gateway-config/scripts/lua/lib/filemgmt.lua | api-gateway-config/scripts/lua/lib/filemgmt.lua | -- Copyright (c) 2016 IBM. All rights reserved.
--
-- 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, mod... | -- Copyright (c) 2016 IBM. All rights reserved.
--
-- 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, mod... | Fix merge issue | Fix merge issue
| Lua | apache-2.0 | openwhisk/openwhisk-apigateway,alexsong93/openwhisk-apigateway,openwhisk/apigateway,taylorking/apigateway,openwhisk/apigateway,taylorking/apigateway,openwhisk/apigateway,alexsong93/openwhisk-apigateway,LukeFarrell/incubator-openwhisk-apigateway,alexsong93/openwhisk-apigateway,LukeFarrell/incubator-openwhisk-apigateway,... |
0b8267de1a1ff1301d9be51792b881d44cedece2 | tests/cairo.lua | tests/cairo.lua | --[[--------------------------------------------------------------------------
LGI testsuite, cairo overrides test group.
Copyright (c) 2012 Pavel Holejsovsky
Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
--]]---------------------------------------------------------------... | --[[--------------------------------------------------------------------------
LGI testsuite, cairo overrides test group.
Copyright (c) 2012 Pavel Holejsovsky
Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php
--]]---------------------------------------------------------------... | Fix hopelessly broken cairo path enumeration test | Fix hopelessly broken cairo path enumeration test
One of the bugs in the test unfortunately hid others, after finding
and fixing initial bug (by Uli), the rest appeared and were fixed by
this commit.
| Lua | mit | zevv/lgi,pavouk/lgi,psychon/lgi |
ed2f1a8ca0a2c463569844807732f05cfefd5463 | deployment_scripts/puppet/modules/lma_collector/files/plugins/filters/logs_counter.lua | deployment_scripts/puppet/modules/lma_collector/files/plugins/filters/logs_counter.lua | -- Copyright 2016 Mirantis, Inc.
--
-- 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 ... | -- Copyright 2016 Mirantis, Inc.
--
-- 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 ... | Fix the log counter filter | Fix the log counter filter
This change makes sure that the filter doesn't send a metric with the
'last_timer_event' tag.
Change-Id: Iad3f03dfbc151710d5704aa803e3fb379b7f04bf
| Lua | apache-2.0 | stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector,stackforge/fuel-plugin-lma-collector |
e1739b84f64156a2101419e8d92c82fdacdf566e | Roster.lua | Roster.lua | -------------------------------------------------------------------------------
-- Roster handling code
-------------------------------------------------------------------------------
function EPGP:GetRoster()
if (not self.roster) then
self.roster = { }
end
return self.roster
end
function EPGP:GetAlts()
i... | -------------------------------------------------------------------------------
-- Roster handling code
-------------------------------------------------------------------------------
function EPGP:GetRoster()
if (not self.roster) then
self.roster = { }
end
return self.roster
end
function EPGP:GetAlts()
i... | Revert broken "fix" | Revert broken "fix"
| Lua | bsd-3-clause | protomech/epgp-dkp-reloaded,hayword/tfatf_epgp,ceason/epgp-tfatf,hayword/tfatf_epgp,sheldon/epgp,sheldon/epgp,ceason/epgp-tfatf,protomech/epgp-dkp-reloaded |
89eb3c88241af293e0123e0f86d3992c2fb3b607 | plugins/plugins.lua | plugins/plugins.lua | do
-- #Begin plugins.lua by @BeyondTeam
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins f... | do
-- #Begin plugins.lua by @BeyondTeam
-- Returns the key (index) in the config.enabled_plugins table
local function plugin_enabled( name )
for k,v in pairs(_config.enabled_plugins) do
if name == v then
return k
end
end
-- If not found
return false
end
-- Returns true if file exists in plugins f... | Bug Fixed! | Bug Fixed! | Lua | unlicense | MobinDehghani/iManager |
63c08494e4347e436a3a12aeb20f06312ef9638b | durden/browser.lua | durden/browser.lua | -- Copyright: 2015, Björn Ståhl
-- License: 3-Clause BSD
-- Reference: http://durden.arcan-fe.com
-- Description: Brower covers a lbar- based resource picker for
-- existing resources.
local last_path = {};
local function match_ext(v, tbl)
if (tbl == nil) then
return true;
end
local ext = string.match(v, "^.+(%... | -- Copyright: 2015, Björn Ståhl
-- License: 3-Clause BSD
-- Reference: http://durden.arcan-fe.com
-- Description: Brower covers a lbar- based resource picker for
-- existing resources.
local last_path = {};
local last_min = 0;
local function match_ext(v, tbl)
if (tbl == nil) then
return true;
end
local ext = st... | fixed .. twice bug in browse | fixed .. twice bug in browse
| Lua | bsd-3-clause | letoram/durden |
0bbeeaf0929835a155d1072e19c67d4a06ffbed2 | config/nvim/lua/settings/startify.lua | config/nvim/lua/settings/startify.lua | local nmap = require("utils").nmap
local g = vim.g
g.startify_files_number = 10
g.startify_change_to_dir = 0
local ascii = {
[[ ____ ]],
[[ /___/\_ ]],
[[ _\ \/_/\__ __ ]],
[[ ... | local nmap = require("utils").nmap
local g = vim.g
local fn = vim.fn
g.startify_files_number = 10
g.startify_change_to_dir = 0
local ascii = {
[[ ____ ]],
[[ /___/\_ ]],
[[ _\ \/_/\__ __ ... | chore(nvim): fix startify recent files header | chore(nvim): fix startify recent files header
add current file path to list
| Lua | mit | nicknisi/dotfiles,nicknisi/dotfiles,nicknisi/dotfiles |
d46c580e1de5e9677589662f38566d065acaf7e0 | actor_socket.lua | actor_socket.lua | -- Integration of actor post office with sockets.
--
local socket = require("socket")
function actor_socket_create()
local reading = {} -- Array of sockets for next select().
local writing = {} -- Array of sockets for next select().
local reverse_r = {} -- Reverse lookup from socket to reading/writing index.
local r... | -- Integration of actor post office with sockets.
--
local socket = require("socket")
function actor_socket_create()
local reading = {} -- Array of sockets for next select().
local writing = {} -- Array of sockets for next select().
local reverse_r = {} -- Reverse lookup from socket to reading/writing index.
local r... | fix for actor_socket concurrency using apo.recv(filters) | fix for actor_socket concurrency using apo.recv(filters)
| Lua | apache-2.0 | steveyen/moxilua |
5a8daac9c519da3a8021f15a0288b2c4cfd44f15 | src_trunk/resources/irc/s_irc.lua | src_trunk/resources/irc/s_irc.lua | server = "irc.gtanet.com"
port = 6667
username = "ValhallaGaming"
channel = "#vgmta.admins"
pubchannel = "#mta"
password = "adminmtavg"
conn = nil
timer = nil
function initIRC()
ircInit()
conn = ircOpen(server, port, username, channel, password)
sendMessage("Server Started.")
displayStatus()
timer... | server = "irc.gtanet.com"
port = 6667
username = "ValhallaGaming"
channel = "#vgmta.admins"
pubchannel = "#mta"
password = "adminmtavg"
conn = nil
conn2 = nil
timer = nil
useSecond = false
function initIRC()
ircInit()
conn = ircOpen(server, port, username, channel, password)
conn2 = ircOpen(server, ... | Fix to stop echo being kicked from IRC. | Fix to stop echo being kicked from IRC.
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@541 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno |
265a1bb1ddf204f329614a221d4fdab3210d1552 | examples/flames.lua | examples/flames.lua | <<<<<<< HEAD
=======
-- Flames.lua, contributed by pmprog in the OpenPandora board.
-- See http://boards.openpandora.org/index.php?/topic/7405-here-is-a-pnd-for-load81/
function setup()
local x, y, l
MaxFlames = 150
FlameLife = 40
FlameSize = 10
refreshCount = 0
skipCount = 0
Flames = { }... | -- Flames.lua, contributed by pmprog in the OpenPandora board.
-- See http://boards.openpandora.org/index.php?/topic/7405-here-is-a-pnd-for-load81/
function setup()
local x, y, l
MaxFlames = 150
FlameLife = 40
FlameSize = 10
refreshCount = 0
skipCount = 0
Flames = { }
filled(false)
... | fix for case where no joysticks are available | fix for case where no joysticks are available
| Lua | bsd-2-clause | seclorum/load81,seclorum/load81,seclorum/load81,seclorum/load81,seclorum/load81 |
912ff6bcb7cec6bd3a1c2897ef2e4cad1cff283c | libs/core/luasrc/fs.lua | libs/core/luasrc/fs.lua | --[[
LuCI - Filesystem tools
Description:
A module offering often needed filesystem manipulation functions
FileId:
$Id$
License:
Copyright 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 o... | --[[
LuCI - Filesystem tools
Description:
A module offering often needed filesystem manipulation functions
FileId:
$Id$
License:
Copyright 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 o... | libs/core: Fixed luci.fs.isfile | libs/core: Fixed luci.fs.isfile
| Lua | apache-2.0 | deepak78/luci,8devices/luci,deepak78/luci,deepak78/luci,8devices/luci,deepak78/luci,8devices/luci,8devices/luci,deepak78/luci,8devices/luci,deepak78/luci,deepak78/luci,8devices/luci,deepak78/luci |
276e19537aeffacbbbadaf28025fc2ea75378afe | nvim/lua/config/cmp.lua | nvim/lua/config/cmp.lua | local has_words_before = function()
if vim.api.nvim_buf_get_option(0, 'buftype') == 'prompt' then
return false
end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') == nil
end
local feedkey = functio... | local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match('%s') == nil
end
local luasnip = require('luasnip')
local cmp = require('cmp')
cmp.setup({
snippet = {
expand = function... | fix: issue with vsnip and me copy/pasting poorly | fix: issue with vsnip and me copy/pasting poorly
| Lua | mit | drmohundro/dotfiles |
19c5c54fe933c59dadf75d754833157164df2bd4 | item/id_9_saw.lua | item/id_9_saw.lua | --[[
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... | --[[
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... | Fix testing function | Fix testing function
| Lua | agpl-3.0 | KayMD/Illarion-Content,Illarion-eV/Illarion-Content,Baylamon/Illarion-Content,vilarion/Illarion-Content |
53a691a3700aba4ea9922f5242f50f89addde452 | src/lua/lzmq/impl/threads.lua | src/lua/lzmq/impl/threads.lua | --
-- Author: Alexey Melnichuk <mimir@newmail.ru>
--
-- Copyright (C) 2013-2014 Alexey Melnichuk <mimir@newmail.ru>
--
-- Licensed according to the included 'LICENCE' document
--
-- This file is part of lua-lzqm library.
--
--
-- zmq.thread wraps the low-level threads object & a zmq context.
--
local T = string.d... | --
-- Author: Alexey Melnichuk <mimir@newmail.ru>
--
-- Copyright (C) 2013-2014 Alexey Melnichuk <mimir@newmail.ru>
--
-- Licensed according to the included 'LICENCE' document
--
-- This file is part of lua-lzqm library.
--
--
-- zmq.thread wraps the low-level threads object & a zmq context.
--
local T = string.d... | fix bug in thread_opts parser | fix bug in thread_opts parser
| Lua | mit | bsn069/lzmq,bsn069/lzmq,moteus/lzmq,moteus/lzmq,zeromq/lzmq,zeromq/lzmq,zeromq/lzmq,moteus/lzmq |
7749dad8222d15baab85b702244393e7764922aa | ios-icons/icons.lua | ios-icons/icons.lua | local icons_mt = {}
icons_mt.__tostring = function(i)
local result = "Icon Set\n\n"
for _, p in ipairs(i) do
result = result .. tostring(p)
end
result = result .. "\n"
return result
end
local icons = {}
icons.__meta = icons_mt
icons.flatten = function(tab)
local insert = table.insert
lo... | local icons_mt = {}
icons_mt.__tostring = function(i)
local result = "Icon Set\n\n"
for _, p in ipairs(i) do
result = result .. tostring(p)
end
result = result .. "\n"
return result
end
local icons = {}
icons.__meta = icons_mt
icons.flatten = function(tab)
local insert = table.insert
lo... | fixed visitor function | fixed visitor function
| Lua | mit | profburke/ios-icons,profburke/ios-icons,profburke/ios-icons |
6a265a99987995628363fb9e9770cd9e60d01020 | share/media/cbsnews.lua | share/media/cbsnews.lua | -- libquvi-scripts
-- Copyright (C) 2010-2013 Toni Gundogdu <legatvs@gmail.com>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- 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 Fre... | -- libquvi-scripts
-- Copyright (C) 2010-2013 Toni Gundogdu <legatvs@gmail.com>
--
-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
--
-- 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 Fre... | FIX: media/cbsnews.lua: Adapt to website changes | FIX: media/cbsnews.lua: Adapt to website changes
Adapt to the recently updated website design.
- Parse all media properties from video page HTML
- Use LuaJSON to parse the media properties
Notable changes:
- Media streams may now contain {HTTP,RTMP,M3U8} URLs [1]
- Presume the "best" quality to be the "deskt... | Lua | agpl-3.0 | legatvs/libquvi-scripts,legatvs/libquvi-scripts,alech/libquvi-scripts,alech/libquvi-scripts |
e97d0df3c9d80a5fe77d0e61e4116d157d97a45c | net-speed-widget/net-speed.lua | net-speed-widget/net-speed.lua | -------------------------------------------------
-- Net Speed Widget for Awesome Window Manager
-- Shows current upload/download speed
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/net-speed-widget
-- @author Pavel Makhov
-- @copyright 2020 Pavel Makhov
-------... | -------------------------------------------------
-- Net Speed Widget for Awesome Window Manager
-- Shows current upload/download speed
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/net-speed-widget
-- @author Pavel Makhov
-- @copyright 2020 Pavel Makhov
-------... | net-speed-widget: fix race condition when using multiple monitors/widgets | net-speed-widget: fix race condition when using multiple monitors/widgets
| Lua | mit | streetturtle/awesome-wm-widgets,streetturtle/awesome-wm-widgets |
06d66e3bec3b57488a7f9a7bd856204e82600c1b | lgi/override/Gtk.lua | lgi/override/Gtk.lua | ------------------------------------------------------------------------------
--
-- LGI Gtk3 override module.
--
-- Copyright (c) 2010, 2011 Pavel Holejsovsky
-- Licensed under the MIT license:
-- http://www.opensource.org/licenses/mit-license.php
--
----------------------------------------------------------------... | ------------------------------------------------------------------------------
--
-- LGI Gtk3 override module.
--
-- Copyright (c) 2010, 2011 Pavel Holejsovsky
-- Licensed under the MIT license:
-- http://www.opensource.org/licenses/mit-license.php
--
----------------------------------------------------------------... | Fix Gtk.Builder fix override | Fix Gtk.Builder fix override
| Lua | mit | pavouk/lgi,zevv/lgi,psychon/lgi |
90b4aae01775006e47387b195d46fae3fff751e2 | src/bot.lua | src/bot.lua | local bot = {}
local api = require("api")
local soul = require("soul")
function bot.analyzeMessageType(upd)
if upd.message then
local msg = upd.message
if msg.audio then
return "Audio"
elseif msg.voice then
return "Voice"
elseif msg.video then
re... | local bot = {}
local api = require("api")
local soul = require("soul")
function bot.analyzeMessageType(upd)
if upd.message then
local msg = upd.message
if msg.audio then
return "Audio"
elseif msg.voice then
return "Voice"
elseif msg.video then
re... | fix(bot): overwrites coroutine of tick | fix(bot): overwrites coroutine of tick | Lua | apache-2.0 | SJoshua/Project-Small-R |
95e8b54d7d2c9226e823f347c7890b7395f747a3 | packages/counters.lua | packages/counters.lua | if not SILE.scratch.counters then SILE.scratch.counters = {} end
romans = {
{1000, "M"},
{900, "CM"}, {500, "D"}, {400, "CD"}, {100, "C"},
{90, "XC"}, {50, "L"}, {40, "XL"}, {10, "X"},
{9, "IX"}, {5, "V"}, {4, "IV"}, {1, "I"}
}
local function romanize(k)
str = ""
k = k + 0
for _, v in ipairs(romans) do
... | if not SILE.scratch.counters then SILE.scratch.counters = {} end
romans = {
{1000, "M"},
{900, "CM"}, {500, "D"}, {400, "CD"}, {100, "C"},
{90, "XC"}, {50, "L"}, {40, "XL"}, {10, "X"},
{9, "IX"}, {5, "V"}, {4, "IV"}, {1, "I"}
}
local function romanize(k)
str = ""
k = k + 0
for _, v in ipairs(romans) do
... | [counters] Fix roman style capitalization (#572) | [counters] Fix roman style capitalization (#572)
ICU uses different convention for roman numeral capitalization than
SILE. This adds a translation which fixes this issue.
Closes #571 | Lua | mit | simoncozens/sile,simoncozens/sile,alerque/sile,alerque/sile,simoncozens/sile,alerque/sile,simoncozens/sile,alerque/sile |
3782419cbb73321723cea8c840ca2bc91ee6c39b | gumbo.lua | gumbo.lua | local have_ffi, ffi = pcall(require, "ffi")
if not have_ffi then -- load the C module instead
local oldpath = package.path
package.path = ""
local gumbo_c_module = require "gumbo"
package.path = oldpath
return gumbo_c_module
end
local gumbo = require "gumbo-cdef"
local build
local typemap = {
... | local have_ffi, ffi = pcall(require, "ffi")
if not have_ffi then -- load the C module instead
local oldpath = package.path
package.path = ""
local gumbo_c_module = require "gumbo"
package.path = oldpath
return gumbo_c_module
end
local gumbo = require "gumbo-cdef"
local build
local typemap = {
... | Minor style fixes | Minor style fixes
| Lua | apache-2.0 | craigbarnes/lua-gumbo,craigbarnes/lua-gumbo,craigbarnes/lua-gumbo |
38d6f9c959140088e7c52554310e20358ea530b4 | hammerspoon/window.lua | hammerspoon/window.lua | -----------------------------------------------
-- Set hyper to ctrl + shift
-----------------------------------------------
local hyper = {"cmd", "ctrl", "shift"}
function tolerance(a, b) return math.abs(a - b) < 32 end
local STEP = 10
function resizeWindow(f)
local win = hs.window.focusedWindow()
local fra... | -----------------------------------------------
-- Set hyper to ctrl + shift
-----------------------------------------------
local hyper = {"cmd", "ctrl", "shift"}
function tolerance(a, b) return math.abs(a - b) < 32 end
local STEP = 10
function resizeWindow(f)
local win = hs.window.focusedWindow()
local fra... | Fix window hotkey modal indicator issue | Fix window hotkey modal indicator issue
| Lua | mit | xcv58/Hammerspoon-xcv58 |
5426d1807c96c558b116aab4ec9191a2f9a34bbe | src/lib/fibers/file.lua | src/lib/fibers/file.lua | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- Timeout events.
module(..., package.seeall)
local op = require('lib.fibers.op')
local fiber = require('lib.fibers.fiber')
local epoll = require('lib.fibers.epoll')
local file = require('lib.stream.file')
local bit = require('bit')
loc... | -- Use of this source code is governed by the Apache 2.0 license; see COPYING.
-- Timeout events.
module(..., package.seeall)
local op = require('lib.fibers.op')
local fiber = require('lib.fibers.fiber')
local epoll = require('lib.fibers.epoll')
local file = require('lib.stream.file')
local bit = require('bit')
loc... | Fix duplicated method | Fix duplicated method
| Lua | apache-2.0 | SnabbCo/snabbswitch,snabbco/snabb,Igalia/snabb,snabbco/snabb,Igalia/snabb,snabbco/snabb,SnabbCo/snabbswitch,Igalia/snabb,eugeneia/snabb,alexandergall/snabbswitch,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,alexandergall/snabbswitch,Igalia/snabbswitch,alexandergall/snabbswitch,SnabbCo/snabbswitch,Igalia/snabb,snabbco/sn... |
4d2a793befdd8406079b3a14b9d44503a9cfb0b1 | genie.lua | genie.lua | newoption {
trigger = "UWP",
description = "Generates Universal Windows Platform application type",
}
if not _ACTION then
_ACTION="vs2012"
end
outFolderRoot = "Bin/" .. _ACTION .. "/";
isVisualStudio = false
isUWP = false
if _ACTION == "vs2010" or _ACTION == "vs2012" or _ACTION == "vs2015" or _ACTI... | newoption {
trigger = "UWP",
description = "Generates Universal Windows Platform application type",
}
if not _ACTION then
_ACTION="vs2012"
end
outFolderRoot = "Bin/" .. _ACTION .. "/";
isVisualStudio = false
isUWP = false
if _ACTION == "vs2010" or _ACTION == "vs2012" or _ACTION == "vs2015" or _ACTI... | Compilation fix | Compilation fix | Lua | mit | bombomby/brofiler,bombomby/brofiler,bombomby/brofiler |
21f8e10147677a64c809a621222390995dc53401 | plugins/chatter.lua | plugins/chatter.lua | local PLUGIN = {}
PLUGIN.triggers = {
'^@' .. bot.username .. ', ',
'^' .. bot.first_name .. ', '
}
function PLUGIN.action(msg)
local input = get_input(msg.text)
local url = 'http://www.simsimi.com/requestChat?lc=es&ft=1.0&req=' .. URL.escape(input)
local jstr, res = HTTP.request(url)
if res ~= 200 then
r... | -- shout-out to @luksi_reiku for showing me this site
local PLUGIN = {}
PLUGIN.triggers = {
'^@' .. bot.username .. ', ',
'^' .. bot.first_name .. ', '
}
function PLUGIN.action(msg)
local input = get_input(msg.text)
local url = 'http://www.simsimi.com/requestChat?lc=en&ft=1.0&req=' .. URL.escape(input)
loca... | bugfix | bugfix
| Lua | mit | barreeeiroo/BarrePolice,Brawl345/Brawlbot-v2,TiagoDanin/SiD,bb010g/otouto,topkecleon/otouto |
007513af4377b5129a86544c2f560190f86bb78d | base/gatheringcraft.lua | base/gatheringcraft.lua | --[[
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... | --[[
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... | fix #10591: dont spawn monster on same field as character, and allow spawning on positions with items on them | fix #10591: dont spawn monster on same field as character, and allow spawning on positions with items on them
| Lua | agpl-3.0 | Illarion-eV/Illarion-Content,KayMD/Illarion-Content,Baylamon/Illarion-Content,vilarion/Illarion-Content |
773b371cb4084720f3e729c2b4fc6a95a5547c09 | spotify-widget/spotify.lua | spotify-widget/spotify.lua | -------------------------------------------------
-- Spotify Widget for Awesome Window Manager
-- Shows currently playing song on Spotify for Linux client
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-widget
-- @author Pavel Makhov
-- @copyright 2020 Pav... | -------------------------------------------------
-- Spotify Widget for Awesome Window Manager
-- Shows currently playing song on Spotify for Linux client
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-widget
-- @author Pavel Makhov
-- @copyright 2020 Pav... | fixed unicode truncation bug | fixed unicode truncation bug
| Lua | mit | streetturtle/awesome-wm-widgets,streetturtle/awesome-wm-widgets |
59a7e8c01d73c892c289d8fa0a59b617dcb3f7be | inventory.lua | inventory.lua | local component = require("component")
local ic = component.inventory_controller
local robot = require("robot")
local sides = require("sides")
local util = require("util")
local inventory = {}
function inventory.isOneOf(item, checkList)
for _,chk in ipairs(checkList) do
if chk == "!tool" then
if item.maxD... | local component = require("component")
local ic = component.inventory_controller
local robot = require("robot")
local sides = require("sides")
local util = require("util")
local inventory = {}
function inventory.isOneOf(item, checkList)
for _,chk in ipairs(checkList) do
if chk == "!tool" then
if item.maxD... | fixes issue with checking current tool | fixes issue with checking current tool
| Lua | apache-2.0 | InfinitiesLoop/oclib |
ffd48633c2a7570da81b277743eb7ba196a4a78b | lualib/redis.lua | lualib/redis.lua | local skynet = require "skynet"
local socket = require "socket"
local config = require "config"
local redis_conf = skynet.getenv "redis"
local name = config (redis_conf)
local readline = socket.readline
local readbytes = socket.read
local table = table
local string = string
local redis = {}
local command = {}
local m... | local skynet = require "skynet"
local socket = require "socket"
local config = require "config"
local redis_conf = skynet.getenv "redis"
local name = config (redis_conf)
local readline = socket.readline
local readbytes = socket.read
local table = table
local string = string
local redis = {}
local command = {}
local m... | bugfix #53 | bugfix #53
| Lua | mit | iskygame/skynet,sdgdsffdsfff/skynet,bingo235/skynet,Zirpon/skynet,icetoggle/skynet,cmingjian/skynet,ruleless/skynet,qyli/test,zzh442856860/skynet-Note,togolwb/skynet,pichina/skynet,enulex/skynet,codingabc/skynet,fhaoquan/skynet,boyuegame/skynet,zzh442856860/skynet,hongling0/skynet,leezhongshan/skynet,chuenlungwang/skyn... |
2acaf8b918f6a009a1650b9fbb77cbea66a18e7a | modules/note.lua | modules/note.lua | local date = require'date'
local ev = require'ev'
local notes = ivar2.persist
local handleOutput = function(self, source, destination)
-- Only accept notes on channels.
if(destination:sub(1,1) ~= '#') then return end
local nick = source.nick
local key = 'notes:' .. destination .. ':' .. nick:lower()
local nick_n... | local date = require'date'
local ev = require'ev'
local notes = ivar2.persist
local handleOutput = function(self, source, destination)
-- Only accept notes on channels.
if(destination:sub(1,1) ~= '#') then return end
local nick = source.nick
local key = 'notes:' .. destination .. ':' .. nick:lower()
local nick_n... | note: fix problem with global notes checking | note: fix problem with global notes checking
Former-commit-id: 812994c97664bcd3aba4e68174faab330b4f53db [formerly 14c091baa0e273fc17f403bcbedee5d2f8f4f21e]
Former-commit-id: 23e56c5d81f608d414cb7503fcd8cd2d70924186 | Lua | mit | torhve/ivar2,torhve/ivar2,torhve/ivar2,haste/ivar2 |
8cad6531e45e066ca4f1289c64f9fc2d31808288 | src/wiola/handler.lua | src/wiola/handler.lua | --
-- Project: wiola
-- User: Konstantin Burkalev
-- Date: 16.03.14
--
local wsServer = require "resty.websocket.server"
local wiola = require "wiola"
local wampServer = wiola:new()
local webSocket, err = wsServer:new({
timeout = tonumber(ngx.var.wiola_socket_timeout, 10) or 100,
max_payload_len = tonumber(ngx... | --
-- Project: wiola
-- User: Konstantin Burkalev
-- Date: 16.03.14
--
local wsServer = require "resty.websocket.server"
local wiola = require "wiola"
local wampServer = wiola:new()
local webSocket, err = wsServer:new({
timeout = tonumber(ngx.var.wiola_socket_timeout, 10) or 100,
max_payload_len = tonumber(ngx... | Fix scoping of 'bytes' to fix case where "Failed to send data: " error was always being logged. | Fix scoping of 'bytes' to fix case where "Failed to send data: " error was always being logged.
| Lua | bsd-2-clause | KSDaemon/wiola,KSDaemon/wiola,KSDaemon/wiola |
a299089e151065d7bf9e028f8d62181a02f44276 | limeparse.lua | limeparse.lua | -- limeparse.lua: Parses the input file
-- Copyright © 2012 Zachary Catlin. See LICENSE for terms.
-- The package table
local P = {}
if _REQUIREDNAME == nil then
limeparse = P
else
_G[_REQUIREDNAME] = P
end
-- External imports
local coroutine = coroutine
local string = string
local error = error
setfenv(1, P)
... | -- limeparse.lua: Parses the input file
-- Copyright © 2012 Zachary Catlin. See LICENSE for terms.
-- The package table
local P = {}
if _REQUIREDNAME == nil then
limeparse = P
else
_G[_REQUIREDNAME] = P
end
-- External imports
local coroutine = coroutine
local string = string
local error = error
setfenv(1, P)
... | Fixed EOF bug in limeparse.readFile | Fixed EOF bug in limeparse.readFile
readFile wasn't sending nil to the sub-parser coroutine at EOF, like it ought
to have.
| Lua | mit | zec/moonlime,zec/moonlime |
dfb38c26280ab1522f5276492d3e750074fbfe04 | openLuup/hag.lua | openLuup/hag.lua | #!/usr/bin/env wsapi.cgi
--module(..., package.seeall)
local ABOUT = {
NAME = "upnp.control.hag",
VERSION = "2016.05.15",
DESCRIPTION = "a handler for redirected port_49451 /upnp/control/hag requests",
AUTHOR = "@akbooer",
COPYRIGHT = "(c) 2013-2016 AKBooer",
DOCUMENTATION = "h... | #!/usr/bin/env wsapi.cgi
--module(..., package.seeall)
local ABOUT = {
NAME = "upnp.control.hag",
VERSION = "2016.06.05",
DESCRIPTION = "a handler for redirected port_49451 /upnp/control/hag requests",
AUTHOR = "@akbooer",
COPYRIGHT = "(c) 2013-2016 AKBooer",
DOCUMENTATION = "h... | hot-fix-modifyuserdata-scenes | hot-fix-modifyuserdata-scenes
- to enable POST requests for large scene definitions
| Lua | apache-2.0 | akbooer/openLuup |
4f4386c0a87e1227f00fcfad3b7df9151f54cc61 | test_scripts/Polices/build_options/032_ATF_P_TC_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua | test_scripts/Polices/build_options/032_ATF_P_TC_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua | --UNREADY: Need to add json file from https://github.com/smartdevicelink/sdl_atf_test_scripts/pull/363/
-- Also the sequence array is filled in with BasicCommunication.OnSystemRequest
-- r_actual also returns nil and this invalidates the whole check
---------------------------------------------------------------------... | --UNREADY: Need to add json file from https://github.com/smartdevicelink/sdl_atf_test_scripts/pull/363/
-- Also the sequence array is filled in with BasicCommunication.OnSystemRequest
-- r_actual also returns nil and this invalidates the whole check
---------------------------------------------------------------------... | Fix check retry timeout | Fix check retry timeout
LOCK_SCREEN_ICON_URL can come when app registered
Fix calculation of time according requirements
| Lua | bsd-3-clause | smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts,smartdevicelink/sdl_atf_test_scripts |
37dc74a79042e10220856f071fc17fe7c58dd7eb | node/File.lua | node/File.lua | local cache = require "cache"
local Node = require "node.Node"
local File = Node:clone("node.File")
File.icon = emufun.images.file
function File:__init(...)
Node.__init(self, ...)
-- load configuration from disk, if present
local cfg = new "Configuration" (self)
self:loadConfig()
self:configure(c... | local cache = require "cache"
local Node = require "node.Node"
local File = Node:clone("node.File")
File.icon = emufun.images.file
function File:__init(...)
Node.__init(self, ...)
-- load configuration from disk, if present
local cfg = new "Configuration" (self)
self:loadConfig()
self:configure(c... | Toggle fullscreen off when launching based on current fullscreen state | Toggle fullscreen off when launching based on current fullscreen state
This should hopefully fix the issue on windows where in borderless
fullscreen mode, VLC pops up behind emufun.
| Lua | mit | ToxicFrog/EmuFun |
f4c94e04ac198f02ad8b3cc024143b8a5470da0a | dashboard/routes/dashboard.lua | dashboard/routes/dashboard.lua | local ipairs = ipairs
local pairs = pairs
local type = type
local xpcall = xpcall
local string_lower = string.lower
local lor = require("lor.index")
local function load_plugin_api(plugin, dashboard_router, store)
local plugin_api_path = "orange.plugins." .. plugin .. ".api"
ngx.log(ngx.ERR, "[plugin's api loa... | local ipairs = ipairs
local pairs = pairs
local type = type
local xpcall = xpcall
local string_lower = string.lower
local lor = require("lor.index")
local function load_plugin_api(plugin, dashboard_router, store)
local plugin_api_path = "orange.plugins." .. plugin .. ".api"
ngx.log(ngx.ERR, "[plugin's api loa... | fix: possible nil table variable | fix: possible nil table variable
| Lua | mit | wuhuatianbao007/orange,thisverygoodhhhh/orange,sumory/orange,wuhuatianbao007/orange,jxskiss/orange,sumory/orange,sumory/orange,thisverygoodhhhh/orange,jxskiss/orange,wuhuatianbao007/orange,thisverygoodhhhh/orange,jxskiss/orange |
e1e9c8035b97c66e0ec8fab2600ae3633e130c23 | npc/base/trade.lua | npc/base/trade.lua | --- Base NPC script for trader NPCs
--
-- This script offers the functions that are required to turn a NPC into a trader
--
-- Author: Martin Karing
require("base.class")
require("base.common")
require("base.messages")
require("base.money")
require("npc.base.basic")
module("npc.base.trade", package.seeall)
tradeNPC ... | --- Base NPC script for trader NPCs
--
-- This script offers the functions that are required to turn a NPC into a trader
--
-- Author: Martin Karing
require("base.class")
require("base.common")
require("base.messages")
require("base.money")
require("npc.base.basic")
module("npc.base.trade", package.seeall)
tradeNPC ... | Bugfix in trader script | Bugfix in trader script
| Lua | agpl-3.0 | Baylamon/Illarion-Content,vilarion/Illarion-Content,LaFamiglia/Illarion-Content,KayMD/Illarion-Content,Illarion-eV/Illarion-Content |
256fa6189af56a02bf45cd7a11c3bc929d3bc9f7 | kong/plugins/session/access.lua | kong/plugins/session/access.lua | local constants = require "kong.constants"
local responses = require "kong.tools.responses"
local session = require "kong.plugins.session.session"
local ngx_set_header = ngx.req.set_header
local log = ngx.log
local kong = kong
local _M = {}
local function load_consumer(consumer_id)
local result, err = kong.db.cons... | local constants = require "kong.constants"
local session = require "kong.plugins.session.session"
local ngx_set_header = ngx.req.set_header
local log = ngx.log
local kong = kong
local _M = {}
local function load_consumer(consumer_id)
local result, err = kong.db.consumers:select { id = consumer_id }
if not result... | fix(session) remove deprecated responses utils | fix(session) remove deprecated responses utils
* add ngx.exit to make sure it works with 0.15 and 1.0
| Lua | apache-2.0 | Kong/kong,Kong/kong,Kong/kong |
830f93a38c49bf6c2227255068594c3998a4f54e | scripts/embed.lua | scripts/embed.lua | --
-- Embed the Lua scripts into src/host/scripts.c as static data buffers.
-- I embed the actual scripts, rather than Lua bytecodes, because the
-- bytecodes are not portable to different architectures, which causes
-- issues in Mac OS X Universal builds.
--
local function loadScript(fname)
local f = io.open(fnam... | --
-- Embed the Lua scripts into src/host/scripts.c as static data buffers.
-- I embed the actual scripts, rather than Lua bytecodes, because the
-- bytecodes are not portable to different architectures, which causes
-- issues in Mac OS X Universal builds.
--
local function loadScript(fname)
local f = io.open(fnam... | Fix embedding of main script and manifest | Fix embedding of main script and manifest
--HG--
branch : feature/improved-embedding
| Lua | bsd-3-clause | annulen/premake,annulen/premake,annulen/premake,annulen/premake |
dff3dc381091322f1750489164b1c319ad6f5922 | xmake.lua | xmake.lua | set_project("UBWindow")
if is_mode("debug") then
set_symbols("debug")
set_optimize("none")
end
if is_mode("release") then
set_symbols("hidden")
set_optimize("fastest")
set_strip("all")
end
add_includedirs("include")
target("demo_blank")
set_kind("binary")
set_targetdir("bin")
add_linkdirs("lib")
add_fi... | set_project("UBWindow")
if is_mode("debug") then
set_symbols("debug")
set_optimize("none")
end
if is_mode("release") then
set_symbols("hidden")
set_optimize("fastest")
set_strip("all")
end
add_includedirs("include")
target("ubwindow")
set_kind("static")
set_targetdir("lib")
add_includedirs("src")
add_f... | Fixed xmake.lua | Fixed xmake.lua
| Lua | mit | yulon/pwre |
2c9223a98c85bb8f63cb34348b9335c8a77d09c5 | src/cosy/websocket.lua | src/cosy/websocket.lua | local Configuration = require "cosy.configuration" .whole
local Platform = require "cosy.platform"
local Methods = require "cosy.methods"
local LuaRpc = {}
function LuaRpc.message (message)
local ok, res = Platform.table.decode (message)
if not ok then
return Platform.table.encode ({
version ... | local coevas = require "copas.ev"
coevas:make_default ()
local Configuration = require "cosy.configuration"
local Platform = require "cosy.platform"
local Methods = require "cosy.methods"
local function translate (x)
x.locale = x.locale or Configuration.locale._
for _, v in pairs (x) do
if ty... | Fix remote procedure call. | Fix remote procedure call.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
0bb7af38bd50ae7c9aa4a1f750eee5c2c6f66e28 | server/lualib/channelhub.lua | server/lualib/channelhub.lua | local core = require "silly.core"
local np = require "netpacket"
local token = require "token"
local sproto = require "protocol.server"
local master = require "cluster.master"
local pack = string.pack
local unpack = string.unpack
----------------socket
local function sendserver(fd, uid, cmd, ack)
cmd = sproto:queryta... | local core = require "silly.core"
local np = require "netpacket"
local token = require "token"
local sproto = require "protocol.server"
local master = require "cluster.master"
local pack = string.pack
local unpack = string.unpack
----------------socket
local function sendserver(fd, uid, cmd, ack)
cmd = sproto:queryta... | bugfix: channel_tryforward | bugfix: channel_tryforward
| Lua | mit | findstr/mmorpg-demo,findstr/mmorpg-demo |
adf3cf57cef5b5e1cfe0f26de5f0848f30e96a15 | lua/wire/client/WireMenus.lua | lua/wire/client/WireMenus.lua | -- $Rev: 1366 $
-- $LastChangedDate: 2009-07-20 00:09:28 -0700 (Mon, 20 Jul 2009) $
-- $LastChangedBy: tad2020 $
local Wire_Categories = {
"Wire - Advanced",
"Wire - Beacon",
"Wire - Control",
"Wire - Data",
"Wire - Detection",
"Wire - Display",
"Wire - Render",
"Wire - I/O",
"Wire - Physics",
... | -- $Rev: 1366 $
-- $LastChangedDate: 2009-07-20 00:09:28 -0700 (Mon, 20 Jul 2009) $
-- $LastChangedBy: tad2020 $
local Wire_Categories = {
"Wire - Advanced",
"Wire - Beacon",
"Wire - Control",
"Wire - Data",
"Wire - Detection",
"Wire - Display",
"Wire - Render",
"Wire - I/O",
"Wire - Physics",
... | WireMenus.lua: Fixed screens. See http://www.wiremod.com/forum/help-support/16161-displays-not-working-wire-revision-1914-a.html | WireMenus.lua: Fixed screens. See http://www.wiremod.com/forum/help-support/16161-displays-not-working-wire-revision-1914-a.html
Doh, committed 5 seconds before me -Anticept
| Lua | apache-2.0 | immibis/wiremod,rafradek/wire,mitterdoo/wire,sammyt291/wire,Python1320/wire,bigdogmat/wire,thegrb93/wire,notcake/wire,CaptainPRICE/wire,Grocel/wire,mms92/wire,dvdvideo1234/wire,plinkopenguin/wiremod,NezzKryptic/Wire,wiremod/wire,garrysmodlua/wire |
f41ccc32a932158d48ad049b304f8e42b881bd40 | MMOCoreORB/bin/scripts/object/tangible/scout/trap/trap_melee_ranged_def_1.lua | MMOCoreORB/bin/scripts/object/tangible/scout/trap/trap_melee_ranged_def_1.lua | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any lat... | --Copyright (C) 2010 <SWGEmu>
--This File is part of Core3.
--This program is free software; you can redistribute
--it and/or modify it under the terms of the GNU Lesser
--General Public License as published by the Free Software
--Foundation; either version 2 of the License,
--or (at your option) any lat... | [Fixed] Glow Juice trap message | [Fixed] Glow Juice trap message
git-svn-id: c34995188cc7e843f8a799edec2d9d4b36f36456@4657 c3d1530f-68f5-4bd0-87dc-8ef779617e40
| Lua | agpl-3.0 | lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,lasko2112/legend-of-hondo,Tatwi/legend-of-hondo,Tatwi/... |
ec5cbf6b40ba2e7f3c11a7d3db4abd9a9719920f | src/nn-modules/EncoderPool.lua | src/nn-modules/EncoderPool.lua | local EncoderPool, parent = torch.class('nn.EncoderPool', 'nn.Container')
function EncoderPool:__init(mapper,reducer)
parent.__init(self)
self.mapper = mapper
self.reducer = reducer
self.modules = {}
table.insert(self.modules,mapper)
table.insert(self.modules,reducer)
end
function EncoderP... | local EncoderPool, parent = torch.class('nn.EncoderPool', 'nn.Container')
function EncoderPool:__init(mapper,reducer)
parent.__init(self)
self.mapper = mapper
self.reducer = reducer
self.modules = {}
table.insert(self.modules,mapper)
table.insert(self.modules,reducer)
end
function EncoderP... | fix contiguous bug in encoder pool | fix contiguous bug in encoder pool
| Lua | mit | patverga/torch-relation-extraction,patverga/torch-relation-extraction,patverga/torch-relation-extraction |
ebade4ed012ae5268da9315d99fc2d67db9ab142 | lua/entities/gmod_wire_button.lua | lua/entities/gmod_wire_button.lua | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Button"
ENT.WireDebugName = "Button"
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "On" )
end
if CLIENT then
local halo_ent, halo_blur
function ENT:Initialize()
self.PosePosition = 0.0
end
function ENT:Think()
ba... | AddCSLuaFile()
DEFINE_BASECLASS( "base_wire_entity" )
ENT.PrintName = "Wire Button"
ENT.WireDebugName = "Button"
function ENT:SetupDataTables()
self:NetworkVar( "Bool", 0, "On" )
end
if CLIENT then
local halo_ent, halo_blur
function ENT:Initialize()
self.PosePosition = 0.0
end
function ENT:Think()
ba... | Fix button halo drawing despite wire_drawoutline 0 (#2088) | Fix button halo drawing despite wire_drawoutline 0 (#2088)
| Lua | apache-2.0 | Grocel/wire,wiremod/wire,dvdvideo1234/wire |
2118efbbbfce4ba2f817b8394781debf7d36a487 | vrp/__resource.lua | vrp/__resource.lua |
description "RP module/framework"
dependency "vrp_mysql"
ui_page "gui/index.html"
-- server scripts
server_scripts{
"lib/utils.lua",
"base.lua",
"modules/gui.lua",
"modules/group.lua",
"modules/admin.lua",
"modules/survival.lua",
"modules/player_state.lua",
"modules/map.lua",
"modules/money.lua",... |
description "RP module/framework"
dependency "vrp_mysql"
ui_page "gui/index.html"
-- server scripts
server_scripts{
"lib/utils.lua",
"base.lua",
"modules/gui.lua",
"modules/group.lua",
"modules/admin.lua",
"modules/survival.lua",
"modules/player_state.lua",
"modules/map.lua",
"modules/money.lua",... | Fix some client config issues. | Fix some client config issues.
| Lua | mit | ImagicTheCat/vRP,ImagicTheCat/vRP |
dd8987c60acf795ad2eb043ff3fa785a4f441aea | core/sessionmanager.lua | core/sessionmanager.lua |
local tonumber, tostring = tonumber, tostring;
local ipairs, pairs, print, next= ipairs, pairs, print, next;
local collectgarbage = collectgarbage;
local m_random = import("math", "random");
local format = import("string", "format");
local hosts = hosts;
local sessions = sessions;
local modulemanager = require "core... |
local tonumber, tostring = tonumber, tostring;
local ipairs, pairs, print, next= ipairs, pairs, print, next;
local collectgarbage = collectgarbage;
local m_random = import("math", "random");
local format = import("string", "format");
local hosts = hosts;
local sessions = sessions;
local modulemanager = require "core... | Fix sending of unavailable presence on disconnect | Fix sending of unavailable presence on disconnect
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
27994417f34618e05c3cd793f6d0c47596f5d185 | tests/AceDB-3.0.lua | tests/AceDB-3.0.lua | dofile("wow_api.lua")
dofile("LibStub.lua")
dofile("../CallbackHandler-1.0/CallbackHandler-1.0.lua")
dofile("../AceDB-3.0/AceDB-3.0.lua")
dofile("serialize.lua")
-- Test the defaults system
do
local defaults = {
profile = {
singleEntry = "singleEntry",
tableEntry = {
tableDefault = "tableDefault",
},
... | dofile("wow_api.lua")
dofile("LibStub.lua")
dofile("../CallbackHandler-1.0/CallbackHandler-1.0.lua")
dofile("../AceDB-3.0/AceDB-3.0.lua")
dofile("serialize.lua")
-- Test the defaults system
do
local defaults = {
profile = {
singleEntry = "singleEntry",
tableEntry = {
tableDefault = "tableDefault",
},
... | Ace3 - tests: - fix AceDB test for new default profile | Ace3 - tests:
- fix AceDB test for new default profile
git-svn-id: d324031ee001e5fbb202928c503a4bc65708d41c@434 5debad98-a965-4143-8383-f471b3509dcf
| Lua | bsd-3-clause | sarahgerweck/Ace3 |
c08fd59a29b67edaff3eb372783456f600c40ea1 | reddit.lua | reddit.lua | dofile("urlcode.lua")
dofile("table_show.lua")
local url_count = 0
local tries = 0
local item_type = os.getenv('item_type')
local item_value = os.getenv('item_value')
local downloaded = {}
local addedtolist = {}
read_file = function(file)
if file then
local f = assert(io.open(file))
local data = f:read("*a... | dofile("urlcode.lua")
dofile("table_show.lua")
local url_count = 0
local tries = 0
local item_type = os.getenv('item_type')
local item_value = os.getenv('item_value')
local downloaded = {}
local addedtolist = {}
-- Do not download these urls:
downloaded["http://pixel.redditmedia.com/pixel/of_destiny.png?v=q1Ga4BM4n7... | reddit.lua: ignore urls, fixes | reddit.lua: ignore urls, fixes | Lua | unlicense | ArchiveTeam/reddit-grab,ArchiveTeam/reddit-grab |
c807bdd49576691d593a78bf948829e29e9a8ef6 | src/viewport/src/Client/Viewport.lua | src/viewport/src/Client/Viewport.lua | --[=[
@class Viewport
]=]
local require = require(script.Parent.loader).load(script)
local BasicPane = require("BasicPane")
local Blend = require("Blend")
local ValueObject = require("ValueObject")
local CameraUtils = require("CameraUtils")
local AdorneeUtils = require("AdorneeUtils")
local Maid = require("Maid")
lo... | --[=[
@class Viewport
]=]
local require = require(script.Parent.loader).load(script)
local BasicPane = require("BasicPane")
local Blend = require("Blend")
local ValueObject = require("ValueObject")
local CameraUtils = require("CameraUtils")
local AdorneeUtils = require("AdorneeUtils")
local Maid = require("Maid")
lo... | fix: Ensure currentCamera object GCs | fix: Ensure currentCamera object GCs
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
dc9394f94d29f88e956403c105ee2c27da3ae137 | applications/luci-wol/luasrc/model/cbi/wol.lua | applications/luci-wol/luasrc/model/cbi/wol.lua | --[[
LuCI - Lua Configuration Interface
Copyright 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.0
$Id: olsrd.lua... | --[[
LuCI - Lua Configuration Interface
Copyright 2010 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local sy... | applications/luci-wol: fix copyright | applications/luci-wol: fix copyright
| Lua | apache-2.0 | openwrt/luci,ReclaimYourPrivacy/cloak-luci,openwrt-es/openwrt-luci,tcatm/luci,lcf258/openwrtcn,db260179/openwrt-bpi-r1-luci,slayerrensky/luci,dwmw2/luci,RuiChen1113/luci,david-xiao/luci,hnyman/luci,forward619/luci,tobiaswaldvogel/luci,cshore-firmware/openwrt-luci,oyido/luci,lbthomsen/openwrt-luci,zhaoxx063/luci,aa65535... |
51d9aa8d8ac1f272f941b74ded5146db50905e46 | packages/lime-system/files/usr/lib/lua/lime/utils.lua | packages/lime-system/files/usr/lib/lua/lime/utils.lua | #!/usr/bin/lua
utils = {}
local config = require("lime.config")
function utils.split(string, sep)
local ret = {}
for token in string.gmatch(string, "[^"..sep.."]+") do table.insert(ret, token) end
return ret
end
function utils.stringStarts(string, start)
return (string.sub(string, 1, string.len(star... | #!/usr/bin/lua
utils = {}
local config = require("lime.config")
function utils.split(string, sep)
local ret = {}
for token in string.gmatch(string, "[^"..sep.."]+") do table.insert(ret, token) end
return ret
end
function utils.stringStarts(string, start)
return (string.sub(string, 1, string.len(star... | lime-system: fixup mac table handling | lime-system: fixup mac table handling
the mac is stored as a table and thereby causes an error when trying
concat it with another string.
Signed-off-by: Paul Spooren <7a88a1f62d18f609867b9792771bed5b7c6b9095@informatik.uni-leipzig.de>
| Lua | agpl-3.0 | libremesh/lime-packages,libremesh/lime-packages,libremesh/lime-packages,libremesh/lime-packages,libremesh/lime-packages,libremesh/lime-packages |
d7e2c4c656f88e9b4f92e60b2da4921b60a23c34 | triggerfield/galmair_guard_rules.lua | triggerfield/galmair_guard_rules.lua | --[[
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... | --[[
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... | Fix triggerfield script | Fix triggerfield script
| Lua | agpl-3.0 | vilarion/Illarion-Content,Illarion-eV/Illarion-Content,KayMD/Illarion-Content,Baylamon/Illarion-Content |
d0a9e68a4125c043a6ee6a4d92ac244f2feb7ccb | src/luarocks/command_line.lua | src/luarocks/command_line.lua |
--- Functions for command-line scripts.
local command_line = {}
local unpack = unpack or table.unpack
local util = require("luarocks.util")
local cfg = require("luarocks.cfg")
local path = require("luarocks.path")
local dir = require("luarocks.dir")
local deps = require("luarocks.deps")
local fs = require("luarocks.... |
--- Functions for command-line scripts.
local command_line = {}
local unpack = unpack or table.unpack
local util = require("luarocks.util")
local cfg = require("luarocks.cfg")
local path = require("luarocks.path")
local dir = require("luarocks.dir")
local deps = require("luarocks.deps")
local fs = require("luarocks.... | Oops! Fix warning message. | Oops! Fix warning message.
| Lua | mit | tarantool/luarocks,luarocks/luarocks,keplerproject/luarocks,luarocks/luarocks,keplerproject/luarocks,tarantool/luarocks,keplerproject/luarocks,luarocks/luarocks,tarantool/luarocks,keplerproject/luarocks |
2c98bc0a75c1e8b0eb7c1c0bdf52e304295f31b7 | examples/undocumented/lua_modular/evaluation_contingencytableevaluation_modular.lua | examples/undocumented/lua_modular/evaluation_contingencytableevaluation_modular.lua | require 'shogun'
require 'load'
ground__truth = load_labels('../data/label_train_twoclass.dat')
math.randomseed(17)
--predicted = random.randn(len(ground_truth))
predicte = {}
for i = 1, #ground__truth do
table.insert(predicte, math.random())
end
parameter_list = {{ground__truth,predicte}}
function evaluation_conti... | require 'shogun'
require 'load'
ground_truth = load_labels('../data/label_train_twoclass.dat')
math.randomseed(17)
predicted = {}
for i = 1, #ground_truth do
table.insert(predicted, math.random())
end
parameter_list = {{ground_truth,predicted}}
function evaluation_contingencytableevaluation_modular(ground_truth, pr... | fix typo | fix typo
| Lua | bsd-3-clause | sorig/shogun,karlnapf/shogun,Saurabh7/shogun,shogun-toolbox/shogun,shogun-toolbox/shogun,karlnapf/shogun,shogun-toolbox/shogun,Saurabh7/shogun,sorig/shogun,karlnapf/shogun,lambday/shogun,besser82/shogun,besser82/shogun,Saurabh7/shogun,Saurabh7/shogun,lisitsyn/shogun,besser82/shogun,geektoni/shogun,lisitsyn/shogun,karln... |
f6a5264715c11f0846b263efbe474c4e8fae39e3 | src/firstpersoncharactertransparency/src/Client/FirstPersonCharacterTransparency.lua | src/firstpersoncharactertransparency/src/Client/FirstPersonCharacterTransparency.lua | --- Allows transparency to manually be controlled for a character in first-person
-- mode
-- @classmod FirstPersonCharacterTransparency
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local BaseObject = require("BaseObject")
local TransparencyService = require("TransparencyService")
loca... | --- Allows transparency to manually be controlled for a character in first-person
-- mode
-- @classmod FirstPersonCharacterTransparency
-- @author Quenty
local require = require(script.Parent.loader).load(script)
local BaseObject = require("BaseObject")
local TransparencyService = require("TransparencyService")
loca... | fix: FirstPersonCharacterTransparency uses service bag | fix: FirstPersonCharacterTransparency uses service bag
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
a9fac16e50c53ffe452777d8206ff920ac05f4f2 | middleware/burningman-demultiply/burningman_demultiply.lua | middleware/burningman-demultiply/burningman_demultiply.lua | return function(request, next_middleware)
local response = next_middleware()
local events = json.decode(response.body)
local newresponse ={}
for i=1,#events do
local e ={}
local currentEvent = events[i];
e.title = currentEvent.title
e.desc = currentEvent.description
e.id = currentEvent.i... | return function(request, next_middleware)
local response = next_middleware()
local events = json.decode(response.body)
local newresponse ={}
for i=1,#events do
local currentEvent = events[i];
for j=1,#currentEvent.occurrence_set do
table.insert(newresponse,{
title = currentEvent.t... | fix burningman_demultiply | fix burningman_demultiply
| Lua | mit | APItools/middleware |
59015045555f1038478ff48a5a04404e47c74ff6 | modules/admin-mini/luasrc/model/cbi/mini/network.lua | modules/admin-mini/luasrc/model/cbi/mini/network.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | Fixed duplicate tables | Fixed duplicate tables
git-svn-id: edf5ee79c2c7d29460bbb5b398f55862cc26620d@2892 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | alxhh/piratenluci,gwlim/luci,projectbismark/luci-bismark,eugenesan/openwrt-luci,zwhfly/openwrt-luci,gwlim/luci,alxhh/piratenluci,Canaan-Creative/luci,ThingMesh/openwrt-luci,8devices/carambola2-luci,dtaht/cerowrt-luci-3.3,eugenesan/openwrt-luci,ReclaimYourPrivacy/cloak-luci,ThingMesh/openwrt-luci,projectbismark/luci-bis... |
91cbddeba755764cc4f05582769ae78ef84f5987 | utils/_actions/dots.lua | utils/_actions/dots.lua | -- Based on Szymon Kaliski's code found at https://github.com/szymonkaliski/Dotfiles/blob/ae42c100a56c26bc65f6e3ca2ad36e30b558ba10/Dotfiles/hammerspoon/utils/spaces/dots.lua
local spaces = require('hs._asm.undocumented.spaces')
local cache = {
watchers = {},
dots = {}
}
local module = {}
module.size ... | -- Based on Szymon Kaliski's code found at https://github.com/szymonkaliski/Dotfiles/blob/ae42c100a56c26bc65f6e3ca2ad36e30b558ba10/Dotfiles/hammerspoon/utils/spaces/dots.lua
local spaces = require('hs._asm.undocumented.spaces')
local cache = {
watchers = {},
dots = {}
}
local module = {}
module.size ... | stopped showing on full-screen apps; this seems to fix it | stopped showing on full-screen apps; this seems to fix it
| Lua | mit | asmagill/hammerspoon-config,asmagill/hammerspoon-config,asmagill/hammerspoon-config |
00482cbc9145121a5c1a9a010d8eb38fa2d70a47 | _glua-tests/os.lua | _glua-tests/os.lua | local osname = "linux"
if string.find(os.getenv("OS") or "", "Windows") then
osname = "windows"
end
if osname == "linux" then
assert(os.execute("date") == 0)
assert(os.execute("date -a") == 1)
else
assert(os.execute("date /T") == 0)
assert(os.execute("md") == 1)
end
assert(os.getenv("PATH") ~= "")
assert(os... | local osname = "linux"
if string.find(os.getenv("OS") or "", "Windows") then
osname = "windows"
end
if osname == "linux" then
-- travis ci failed to start date command?
-- assert(os.execute("date") == 0)
assert(os.execute("date -a") == 1)
else
assert(os.execute("date /T") == 0)
assert(os.execute("md") == 1... | fix test cases | fix test cases
| Lua | mit | cokeboL/gopher-lua,insionng/gopher-lua,trigrass2/gopher-lua,toophy/gopher-lua,insionng/gopher-lua,kohkimakimoto/gopher-lua,gale320/gopher-lua,yuin/gopher-lua,yuin/gopher-lua,kohkimakimoto/gopher-lua |
174dc27ea5a5cefd93bcbb54ad31cef81817e602 | lunamark/writer/man.lua | lunamark/writer/man.lua | -- (c) 2009-2011 John MacFarlane. Released under MIT license.
-- See the file LICENSE in the source for details.
--- Groff man writer for lunamark.
-- Extends [lunamark.writer.groff].
--
-- Note: continuation paragraphs in lists are not
-- handled properly.
local M = {}
local groff = require("lunamark.writer.groff")... | -- (c) 2009-2011 John MacFarlane. Released under MIT license.
-- See the file LICENSE in the source for details.
--- Groff man writer for lunamark.
-- Extends [lunamark.writer.groff].
--
-- Note: continuation paragraphs in lists are not
-- handled properly.
local M = {}
local groff = require("lunamark.writer.groff")... | Fixed bullet and definition lists in man output. | Fixed bullet and definition lists in man output.
| Lua | mit | jgm/lunamark,tst2005/lunamark,simoncozens/lunamark,jgm/lunamark,tst2005/lunamark,simoncozens/lunamark,jgm/lunamark,tst2005/lunamark,simoncozens/lunamark |
819d75afa5d67630f130fa14a0d523b0b3400401 | data/dist/shooter/main.lua | data/dist/shooter/main.lua | oldprint = print
print = function(...)
local args = { n = select("#", ...), ... }
local t = ""
for i=1,args.n do
t = t .. tostring(args[i])
end
oldprint(t)
end
print('Hello world')
IsDown = function(key)
return key.state > 0.1
end
WasDown = function(key)
return key.last_state > ... | oldprint = print
print = function(...)
local args = { n = select("#", ...), ... }
local t = ""
for i=1,args.n do
t = t .. tostring(args[i])
end
oldprint(t)
end
print('Hello world')
IsDown = function(key)
return key.state > 0.1
end
WasDown = function(key)
return key.last_state > ... | last lua fixes for now... shooter runs fine :) | last lua fixes for now... shooter runs fine :)
| Lua | mit | madeso/euphoria,madeso/euphoria,madeso/euphoria,madeso/euphoria,madeso/euphoria,madeso/euphoria |
ad3fd652150f27f9902aaeb52263d0ad8f30e87e | controllers/dynamic.lua | controllers/dynamic.lua | --[[
Dynamic Resource Controller
Adjusts the number of threads executing within each stage. The
goal is to avoid allocating too many threads, but still have enough
threads to meet the concurrency demands of the stage. The controller
periodically samples the input queue and adds a thread when the queue
length exc... | --[[
Dynamic Resource Controller
Adjusts the number of threads executing within each stage. The
goal is to avoid allocating too many threads, but still have enough
threads to meet the concurrency demands of the stage. The controller
periodically samples the input queue and adds a thread when the queue
length exc... | Fixes | Fixes
| Lua | mit | brenoriba/lstage,brenoriba/lstage |
3afc56812074b1a3b16975bfea8abaca540ab809 | extensions/spoons/init.lua | extensions/spoons/init.lua | local module={}
--- === hs.spoons ===
---
--- Utility and management functions for spoons
module._keys = {}
-- Interpolate table values into a string
-- From http://lua-users.org/wiki/StringInterpolation
local function interp(s, tab)
return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))
end
-... | local module={}
--- === hs.spoons ===
---
--- Utility and management functions for spoons
module._keys = {}
local log = hs.logger.new("spoons")
-- Interpolate table values into a string
-- From http://lua-users.org/wiki/StringInterpolation
local function interp(s, tab)
return (s:gsub('($%b{})', function(w) retur... | Clean up and bug fixes | Clean up and bug fixes
- Fixed bug in path handling
- Cleaned up code
| Lua | mit | knu/hammerspoon,bradparks/hammerspoon,Hammerspoon/hammerspoon,Habbie/hammerspoon,Hammerspoon/hammerspoon,Habbie/hammerspoon,knu/hammerspoon,asmagill/hammerspoon,knu/hammerspoon,Hammerspoon/hammerspoon,bradparks/hammerspoon,cmsj/hammerspoon,asmagill/hammerspoon,knu/hammerspoon,latenitefilms/hammerspoon,Hammerspoon/hamme... |
8544a4db9bbfffb1cb4d5555c0a2bd74f1b1dceb | hammerspoon/config.lua | hammerspoon/config.lua | -- hyper key
hyper = { 'alt', 'ctrl', 'cmd' }
-- disable anymations
hs.window.animationDuration = 0
-- middle left
hs.hotkey.bind(hyper, "Left", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = ma... | local hotkey = require "hs.hotkey"
-- hyper key
hyper = { 'alt', 'ctrl', 'cmd' }
-- disable anymations
hs.window.animationDuration = 0
-- middle left
hotkey.bind(hyper, "Left", function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x... | fix(hammerspoon): improved config | fix(hammerspoon): improved config
Signed-off-by: Carlos Alexandro Becker <e0d37fc92b01fb634d204904d4d347b3805c9003@gmail.com>
| Lua | mit | caarlos0/dotfiles |
a0a8d6e6610044b85160e56225c72f50d79611a4 | busted/outputHandlers/junit.lua | busted/outputHandlers/junit.lua | local xml = require 'pl.xml'
local socket = require("socket")
local string = require("string")
return function(options, busted)
local handler = require 'busted.outputHandlers.base'(busted)
local xml_doc
local suiteStartTime, suiteEndTime
handler.suiteStart = function()
suiteStartTime = socket.gettime()
... | local xml = require 'pl.xml'
local socket = require("socket")
local string = require("string")
return function(options, busted)
local handler = require 'busted.outputHandlers.base'(busted)
local xml_doc
local suiteStartTime, suiteEndTime
handler.suiteStart = function()
suiteStartTime = socket.gettime()
... | Fix junit output for file errors | Fix junit output for file errors
| Lua | mit | ryanplusplus/busted,nehz/busted,leafo/busted,o-lim/busted,istr/busted,xyliuke/busted,mpeterv/busted,DorianGray/busted,Olivine-Labs/busted,sobrinho/busted |
46c61acd06b3c54f3d98fa809e4b9450bae04975 | modules/admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua | modules/admin-full/luasrc/model/cbi/admin_system/fstab/mount.lua | --[[
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... | --[[
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... | modules/admin-full: fix extroot and fsck availability check (https://dev.openwrt.org/ticket/13837) | modules/admin-full: fix extroot and fsck availability check (https://dev.openwrt.org/ticket/13837)
| Lua | apache-2.0 | cshore-firmware/openwrt-luci,jchuang1977/luci-1,MinFu/luci,kuoruan/luci,slayerrensky/luci,lcf258/openwrtcn,RuiChen1113/luci,Hostle/openwrt-luci-multi-user,Wedmer/luci,palmettos/test,LuttyYang/luci,cshore-firmware/openwrt-luci,joaofvieira/luci,fkooman/luci,dwmw2/luci,florian-shellfire/luci,NeoRaider/luci,jorgifumi/luci,... |
7949fdbe776d5ecd7564ecf9ced8fa7f62d0d464 | src_trunk/resources/job-system/s_job_system.lua | src_trunk/resources/job-system/s_job_system.lua | -- ////////////////////////////////////
-- // MYSQL //
-- ////////////////////////////////////
sqlUsername = exports.mysql:getMySQLUsername()
sqlPassword = exports.mysql:getMySQLPassword()
sqlDB = exports.mysql:getMySQLDBName()
sqlHost = exports.mysql:getMySQLHost()
sqlPort = exports.mysql:getMySQLPort()... | -- ////////////////////////////////////
-- // MYSQL //
-- ////////////////////////////////////
sqlUsername = exports.mysql:getMySQLUsername()
sqlPassword = exports.mysql:getMySQLPassword()
sqlDB = exports.mysql:getMySQLDBName()
sqlHost = exports.mysql:getMySQLHost()
sqlPort = exports.mysql:getMySQLPort()... | Job bug fix | Job bug fix
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@619 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno |
fd0265817dbfd457e8b3c63db15fab19a2aa3803 | src_trunk/resources/social-system/c_friends.lua | src_trunk/resources/social-system/c_friends.lua | wFriends, bClose, imgSelf, lName, imgFlag, paneFriends, tMessage, bSendMessage, tFriends = nil
paneFriend = { }
local width, height = 300, 500
local scrWidth, scrHeight = guiGetScreenSize()
x = scrWidth/2 - (width/2)
y = scrHeight/2 - (height/2)
function showFriendsUI(friends)
wFriends = guiCreateWindow(... | wFriends, bClose, imgSelf, lName, imgFlag, paneFriends, tMessage, bSendMessage, tFriends = nil
paneFriend = { }
local width, height = 300, 500
local scrWidth, scrHeight = guiGetScreenSize()
x = scrWidth/2 - (width/2)
y = scrHeight/2 - (height/2)
function showFriendsUI(friends)
wFriends = guiCreateWindow(... | Fixed a bug with background on friends system | Fixed a bug with background on friends system
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@453 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno |
9c366fa199c149509288f460e9ee0658a4859f7b | applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua | applications/luci-firewall/luasrc/model/cbi/luci_fw/rrule.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
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://w... | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
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://w... | applications/luci-firewall: fix turning off nat reflection | applications/luci-firewall: fix turning off nat reflection
git-svn-id: f7818b41aa164576329f806d7c3827e8a55298bb@7338 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci,fqrouter/luci |
1ebc2831ccb2cafb4455b6955879cadb3a99523a | tests/06-multi-emit.lua | tests/06-multi-emit.lua |
local _ = require("underscore")._
, assert = require("assert")
, One = require("../lib/tally_ho").Tally_Ho.new()
, Two = require("../lib/tally_ho").Tally_Ho.new()
, Third = require("../lib/tally_ho").Tally_Ho.new()
;
One:on('one', function (o)
o.data.l.push(1)
end)
One:on('two', function (o)
... |
local _ = require("underscore")
local Jam = require "jam_bo_ree"
local One = Jam.new()
local Two = Jam.new()
local Third = Jam.new()
One:on('one', function (o)
_.push(o.l, 1)
end)
One:on('two', function (o)
_.push(o.l, 2)
end)
One:on('after two', function (o)
_.push(o.l, 3)
end)
describe( 'multi ru... | Fixed: tests for multi-emit | Fixed: tests for multi-emit
| Lua | mit | da99/jam_bo_ree |
ce6051440267f90ad0241aed7b729007d837165d | modules/admin-mini/luasrc/model/cbi/mini/wifi.lua | modules/admin-mini/luasrc/model/cbi/mini/wifi.lua | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | --[[
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
h... | modules/admin-mini: Fixed WLAN client mode | modules/admin-mini: Fixed WLAN client mode
| Lua | apache-2.0 | oneru/luci,LazyZhu/openwrt-luci-trunk-mod,tcatm/luci,wongsyrone/luci-1,RuiChen1113/luci,dwmw2/luci,Noltari/luci,jchuang1977/luci-1,LazyZhu/openwrt-luci-trunk-mod,RuiChen1113/luci,kuoruan/lede-luci,schidler/ionic-luci,RuiChen1113/luci,urueedi/luci,schidler/ionic-luci,cshore-firmware/openwrt-luci,oyido/luci,nmav/luci,for... |
03b5681d47e5af0c2d92e165bba0c50a35ec791c | src/lua/api-gateway/util/logger.lua | src/lua/api-gateway/util/logger.lua | local set = false
function getLogFormat(level, debugInfo, ...)
return level, "[", debugInfo.short_src,
":", debugInfo.currentline,
":", debugInfo.name,
"() req_id=", tostring(ngx.var.requestId),
"] ", ...
end
function _decorateLogger()
if not set then
local oldNgx = ngx... | local set = false
---
-- Checks and returns the ngx.var.requestId if possible
-- ngx.var is not accessible in some nginx phases like init phase and so we also check this
--
local function is_in_init_phase()
return ngx.var.requestId
end
---
-- Get an error log format level, [file:currentline:function_name() req_id... | [WS-11856] Fix logger decorator for callbacks (#60) | [WS-11856] Fix logger decorator for callbacks (#60)
* fixing logger
* fixing the logger
* better getinfo
* update format for logger
* fixing logger
* fixing the logger
* better getinfo
* update format for logger
* update logger
* update docs
* additional docs
* update docs
| Lua | mit | adobe-apiplatform/api-gateway-request-validation,adobe-apiplatform/api-gateway-request-validation |
f8d00f587abf29b1482cc89cc88b3bd42f204f64 | mod_webpresence/mod_webpresence.lua | mod_webpresence/mod_webpresence.lua | module:depends("http");
local jid_split = require "util.jid".prepped_split;
local b64 = require "util.encodings".base64.encode;
local sha1 = require "util.hashes".sha1;
local stanza = require "util.stanza".stanza;
local json = require "util.json".encode_ordered;
local function require_resource(name)
local icon_pa... | module:depends("http");
local jid_split = require "util.jid".prepped_split;
local b64 = require "util.encodings".base64.encode;
local sha1 = require "util.hashes".sha1;
local stanza = require "util.stanza".stanza;
local json = require "util.json".encode_ordered;
local function require_resource(name)
local icon_pa... | mod_webpresence: fixed render-type handling (thanks to biszkopcik and Zash) | mod_webpresence: fixed render-type handling (thanks to biszkopcik and Zash)
| Lua | mit | Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules,Contatta/prosody-modules |
0985ba0ef13f664f31b8f844165b3684bf963dd1 | src/websocket/server_ev.lua | src/websocket/server_ev.lua |
local socket = require'socket'
local tools = require'websocket.tools'
local frame = require'websocket.frame'
local handshake = require'websocket.handshake'
local tconcat = table.concat
local tinsert = table.insert
local ev
local loop
local clients = {}
clients[true] = {}
local client = function(sock,protocol)
asse... |
local socket = require'socket'
local tools = require'websocket.tools'
local frame = require'websocket.frame'
local handshake = require'websocket.handshake'
local tconcat = table.concat
local tinsert = table.insert
local ev
local loop
local clients = {}
clients[true] = {}
local client = function(sock,protocol)
asse... | [hotfix] Fix fail when try to close client connected with unsupported protocol name | [hotfix] Fix fail when try to close client connected with unsupported protocol name
| Lua | mit | KSDaemon/lua-websockets,lipp/lua-websockets,enginix/lua-websockets,KSDaemon/lua-websockets,enginix/lua-websockets,lipp/lua-websockets,OptimusLime/lua-websockets,KSDaemon/lua-websockets,OptimusLime/lua-websockets,OptimusLime/lua-websockets,enginix/lua-websockets,lipp/lua-websockets |
2895647e0878fd7aae554635832f378aa0878f2f | src/apps/lwaftr/V4V6.lua | src/apps/lwaftr/V4V6.lua | module(..., package.seeall)
local constants = require("apps.lwaftr.constants")
local lwutil = require("apps.lwaftr.lwutil")
local shm = require("core.shm")
local link = require("core.link")
local engine = require("core.app")
local transmit, receive = link.transmit, link.receive
local rd16, rd32 = lwutil.rd16, lwutil.... | module(..., package.seeall)
local constants = require("apps.lwaftr.constants")
local lwutil = require("apps.lwaftr.lwutil")
local shm = require("core.shm")
local link = require("core.link")
local engine = require("core.app")
local transmit, receive = link.transmit, link.receive
local rd16, rd32 = lwutil.rd16, lwutil.... | apps.lwaftr.V4V6: fix selftest (test_join) | apps.lwaftr.V4V6: fix selftest (test_join)
| Lua | apache-2.0 | eugeneia/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabb |
cea771c5803f15e822cb45a47e2d94d9a9ffaaf5 | capptain.lua | capptain.lua | #!/usr/bin/env carbon
-- Capptain!
-- Hosts small apps.
kvstore.set("capptain:appdir", arg[1] or "./apps")
srv.GET("/", mw.new(function()
local apps = (fs.list or io.list)("./apps")
local list = {}
for _, app in pairs(apps) do
local appname = app:gsub("%.lua$", "")
table.insert(list, tag"a"[{href=appname}](ap... | #!/usr/bin/env carbon
-- Capptain!
-- Hosts small apps.
kvstore.set("capptain:appdir", arg[1] or "apps")
srv.GET("/", mw.new(function()
local apps = (fs.list or io.list)(kvstore.get("capptain:appdir"))
local list = {}
for _, app in pairs(apps) do
local appname = app:gsub("%.lua$", "")
table.insert(list, tag"a... | More fixes for the latest carbon version. | More fixes for the latest carbon version.
| Lua | mit | carbonsrv/capptain |
4c2ff029696336de23d03dee934b6519c26009da | source/scenes/game.lua | source/scenes/game.lua |
module(..., package.seeall)
require "source/GuiUtilities"
-- import
local flower = flower
-- local variables
local layer = nil
local game_thread = nil
-- Game singleton
Game = {}
Game.texture = "hex-tiles.png"
Game.width = 50
Game.height = 100
Game.tileWidth = 128
Game.tileHeight = 111
Game.radius = 24
Game.defau... |
module(..., package.seeall)
require "source/GuiUtilities"
-- import
local flower = flower
local math = math
local MOAIGridSpace = MOAIGridSpace
-- local variables
local layer = nil
-- Game singleton
Game = {}
Game.texture = "hex-tiles.png"
Game.width = 50
Game.height = 100
Game.tileWidth = 128
Game.tileHeight = 11... | Fixed single player loop thread from not finishing. Minor refactoring to put all game related code into the Game singleton. | Fixed single player loop thread from not finishing.
Minor refactoring to put all game related code into the Game singleton.
| Lua | mit | BryceMehring/Hexel |
22587f7a42b8328f5668748af6261766b26d660d | WitherSpawner/wither.lua | WitherSpawner/wither.lua | local minFuelLevel = 200 -- Lowest acceptable fuel level.
function checkFuel()
while turtle.getFuelLevel() < minFuelLevel do
turtle.turnRight()
turtle.select(3)
turtle.suck()
turtle.refuel()
end
end
function checkItems()
for i=1, 2 do
turtle.select(i)
n = (6... | local minFuelLevel = 200 -- Lowest acceptable fuel level.
function checkFuel()
while turtle.getFuelLevel() < minFuelLevel do
turtle.turnRight()
turtle.select(3)
turtle.suck()
turtle.refuel()
turtle.turnLeft()
end
end
function checkItems()
for i=1, 2 do
turtl... | Fix movement bug | Fix movement bug | Lua | unlicense | Carlgo11/computercraft |
5effbb274bfabbaa23c1281ef144d2e9e8bb0f02 | src/lib/nfv/config.lua | src/lib/nfv/config.lua | module(...,package.seeall)
local Intel82599 = require("apps.intel.intel_app").Intel82599
local VhostUser = require("apps.vhost.vhost_user").VhostUser
local PacketFilter = require("apps.packet_filter.packet_filter").PacketFilter
local RateLimiter = require("apps.rate_limiter.rate_limiter").RateLimiter
local nd_light = ... | module(...,package.seeall)
local Intel82599 = require("apps.intel.intel_app").Intel82599
local VhostUser = require("apps.vhost.vhost_user").VhostUser
local PacketFilter = require("apps.packet_filter.packet_filter").PacketFilter
local RateLimiter = require("apps.rate_limiter.rate_limiter").RateLimiter
local nd_light = ... | NFV config: fix function load | NFV config: fix function load
- pass t.port_id do virtio
- create filter only if there are actually rules (# is >0)
Signed-off-by: Nikolay Nikolaev <5fb6ff14f2a3b931c007d120a649a55e86928f6a@virtualopensystems.com>
| Lua | apache-2.0 | dpino/snabb,heryii/snabb,virtualopensystems/snabbswitch,Igalia/snabb,snabbco/snabb,eugeneia/snabb,eugeneia/snabb,eugeneia/snabb,kellabyte/snabbswitch,lukego/snabb,aperezdc/snabbswitch,fhanik/snabbswitch,SnabbCo/snabbswitch,lukego/snabb,Igalia/snabb,wingo/snabbswitch,snabbco/snabb,alexandergall/snabbswitch,javierguerrag... |
3ba00be9dd8e26cc649f4373a748f18da743b305 | xmake/modules/core/tools/rc.lua | xmake/modules/core/tools/rc.lua | --!A cross-platform build utility based on Lua
--
-- 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... | --!A cross-platform build utility based on Lua
--
-- 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... | fix rc errors | fix rc errors
| Lua | apache-2.0 | waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake,waruqi/xmake |
f0086c20defa053c2e80f39728d9ac58ee593d44 | src/actions/vstudio/vs2005.lua | src/actions/vstudio/vs2005.lua | --
-- actions/vstudio/vs2005.lua
-- Add support for the Visual Studio 2005 project formats.
-- Copyright (c) 2008-2013 Jason Perkins and the Premake project
--
premake.vstudio.vs2005 = {}
local vs2005 = premake.vstudio.vs2005
local vstudio = premake.vstudio
---
-- Register a command-line action for Visual Studio... | --
-- actions/vstudio/vs2005.lua
-- Add support for the Visual Studio 2005 project formats.
-- Copyright (c) 2008-2013 Jason Perkins and the Premake project
--
premake.vstudio.vs2005 = {}
local vs2005 = premake.vstudio.vs2005
local vstudio = premake.vstudio
---
-- Register a command-line action for Visual Studio... | This fixes issue #41 by simply resetting the indentation to its default at the beginning of solution generation, i.e. in vs2005.generateSolution, shared by all VS implementations | This fixes issue #41 by simply resetting the indentation to its default at the beginning of solution generation, i.e. in vs2005.generateSolution, shared by all VS implementations
| Lua | bsd-3-clause | prapin/premake-core,TurkeyMan/premake-core,Yhgenomics/premake-core,premake/premake-core,dcourtois/premake-core,martin-traverse/premake-core,PlexChat/premake-core,noresources/premake-core,starkos/premake-core,CodeAnxiety/premake-core,Tiger66639/premake-core,aleksijuvani/premake-core,PlexChat/premake-core,saberhawk/prema... |
394f08d4f50c2421039fc543b1462905bbdcfea0 | pages/shop/view/get.lua | pages/shop/view/get.lua | require "bbcode"
function get()
if not app.Shop.Enabled then
http:redirect("/")
return
end
local data = {}
data.categories = db:query("SELECT id, name, description FROM castro_shop_categories ORDER BY id")
data.players = db:query("SELECT name FROM players WHERE account_id = ?", se... | require "bbcode"
function get()
if not app.Shop.Enabled then
http:redirect("/")
return
end
local data = {}
data.categories = db:query("SELECT id, name, description FROM castro_shop_categories ORDER BY id")
if data.categories == nil then
data.error = 'There are no shop ca... | Fix #92 | Fix #92
| Lua | mit | Raggaer/castro,Raggaer/castro,Raggaer/castro |
51e43681f2db6881e38b1af35bd5f3d372c94118 | modules/admin-core/luasrc/controller/admin/uci.lua | modules/admin-core/luasrc/controller/admin/uci.lua | module("luci.controller.admin.uci", package.seeall)
require("luci.util")
require("luci.sys")
function index()
node("admin", "uci", "changes").target = call("action_changes")
node("admin", "uci", "revert").target = call("action_revert")
node("admin", "uci", "apply").target = call("action_apply")
end
function con... | module("luci.controller.admin.uci", package.seeall)
function index()
node("admin", "uci", "changes").target = call("action_changes")
node("admin", "uci", "revert").target = call("action_revert")
node("admin", "uci", "apply").target = call("action_apply")
end
function convert_changes(changes)
local ret = {}
fo... | * Fixed an issue that prevented the controller from working with fastindex | * Fixed an issue that prevented the controller from working with fastindex
git-svn-id: edf5ee79c2c7d29460bbb5b398f55862cc26620d@2300 ab181a69-ba2e-0410-a84d-ff88ab4c47bc
| Lua | apache-2.0 | gwlim/luci,zwhfly/openwrt-luci,Canaan-Creative/luci,vhpham80/luci,projectbismark/luci-bismark,vhpham80/luci,dtaht/cerowrt-luci-3.3,zwhfly/openwrt-luci,stephank/luci,stephank/luci,alxhh/piratenluci,freifunk-gluon/luci,gwlim/luci,saraedum/luci-packages-old,phi-psi/luci,Canaan-Creative/luci,ch3n2k/luci,ReclaimYourPrivacy/... |
bbb209761e7b716e7aa8b3288796501859959e21 | src/nodes/platform.lua | src/nodes/platform.lua | local Timer = require 'vendor/timer'
local Platform = {}
Platform.__index = Platform
Platform.isPlatform = true
function Platform.new(node, collider)
local platform = {}
setmetatable(platform, Platform)
--If the node is a polyline, we need to draw a polygon rather than rectangle
if node.polyline or n... | local Timer = require 'vendor/timer'
local Platform = {}
Platform.__index = Platform
Platform.isPlatform = true
function Platform.new(node, collider)
local platform = {}
setmetatable(platform, Platform)
--If the node is a polyline, we need to draw a polygon rather than rectangle
if node.polyline or n... | fixed platform dropping | fixed platform dropping
| Lua | mit | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua |
b9006d52543294f10a3eaa5f822bd352b5d79b97 | agents/monitoring/tests/net/init.lua | agents/monitoring/tests/net/init.lua | local table = require('table')
local async = require('async')
local ConnectionStream = require('monitoring/default/client/connection_stream').ConnectionStream
local misc = require('monitoring/default/util/misc')
local helper = require('../helper')
local timer = require('timer')
local fixtures = require('../fixtures')
l... | local table = require('table')
local async = require('async')
local ConnectionStream = require('monitoring/default/client/connection_stream').ConnectionStream
local misc = require('monitoring/default/util/misc')
local helper = require('../helper')
local timer = require('timer')
local fixtures = require('../fixtures')
l... | fix merge | fix merge
| Lua | apache-2.0 | kans/zirgo,kans/zirgo,kans/zirgo |
a0db69fbac97e0c982ae61930008a426d76a0b40 | gateway/src/apicast/policy/upstream/upstream.lua | gateway/src/apicast/policy/upstream/upstream.lua | --- Upstream policy
-- This policy allows to modify the host of a request based on its path.
local resty_resolver = require('resty.resolver')
local resty_url = require('resty.url')
local format = string.format
local ipairs = ipairs
local match = ngx.re.match
local table = table
local balancer = require('apicast.balan... | --- Upstream policy
-- This policy allows to modify the host of a request based on its path.
local resty_resolver = require('resty.resolver')
local resty_url = require('resty.url')
local format = string.format
local ipairs = ipairs
local match = ngx.re.match
local table = table
local balancer = require('apicast.balan... | policy/upstream: match rules in rewrite phase | policy/upstream: match rules in rewrite phase
This way this policy will be easier to combine with others, for example
the URL rewriting policy.
Before this change, the upstream policy ran on the content phase,
whereas the URL rewriting one ran on the rewrite phase. This means
that the upstream policy always took into... | Lua | mit | 3scale/docker-gateway,3scale/apicast,3scale/docker-gateway,3scale/apicast,3scale/apicast,3scale/apicast |
61e0335c4990118d86a72e6286fbeae45c2fe68a | openLuup/userdata.lua | openLuup/userdata.lua | local ABOUT = {
NAME = "openLuup.userdata",
VERSION = "2016.04.30",
DESCRIPTION = "user_data saving and loading, plus utility functions used by HTTP requests",
AUTHOR = "@akbooer",
COPYRIGHT = "(c) 2013-2016 AKBooer",
DOCUMENTATION = "https://github.com/akbooer/openLuup/tree/mast... | local ABOUT = {
NAME = "openLuup.userdata",
VERSION = "2016.04.30",
DESCRIPTION = "user_data saving and loading, plus utility functions used by HTTP requests",
AUTHOR = "@akbooer",
COPYRIGHT = "(c) 2013-2016 AKBooer",
DOCUMENTATION = "https://github.com/akbooer/openLuup/tree/mast... | hot-fix-refactor-userdata-save | hot-fix-refactor-userdata-save
- thanks to @explorer for refactoring suggestion.
| Lua | apache-2.0 | akbooer/openLuup |
606f36be1bac718874eac9bcd6b114e4b7541ece | src/loader.lua | src/loader.lua | local Gamestate = require 'vendor/gamestate'
local Level = require 'level'
local window = require 'window'
local fonts = require 'fonts'
local state = Gamestate.new()
local home = require 'menu'
local nextState = 'home'
function state:init()
state.finished = false
state.current = 1
state.assets = {}
... | local Gamestate = require 'vendor/gamestate'
local Level = require 'level'
local window = require 'window'
local fonts = require 'fonts'
local state = Gamestate.new()
local home = require 'menu'
local nextState = 'home'
function state:init()
state.finished = false
state.current = 1
state.assets = {}
... | Fixed new loading screen | Fixed new loading screen
| Lua | mit | hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.