commit stringlengths 40 40 | old_file stringlengths 6 92 | new_file stringlengths 6 92 | old_contents stringlengths 0 2.22k | new_contents stringlengths 68 2.86k | subject stringlengths 19 253 | message stringlengths 20 711 | lang stringclasses 1
value | license stringclasses 11
values | repos stringlengths 10 33.5k |
|---|---|---|---|---|---|---|---|---|---|
88c67454575518bc47875fae6df5af9a83f148bd | hammerspoon/apps.lua | hammerspoon/apps.lua | --------------------------------------------------------------------------------
-- Launch applications
hs.hotkey.bind(mash.apps, '1', function () hs.application.launchOrFocus("Google Chrome") end)
hs.hotkey.bind(mash.apps, '2', function () hs.application.launchOrFocus("Xcode") end)
hs.hotkey.bind(mash.apps, '3', func... | --------------------------------------------------------------------------------
-- Launch applications
hs.hotkey.bind(mash.apps, '1', function () hs.application.launchOrFocus("Google Chrome") end)
hs.hotkey.bind(mash.apps, '2', function () hs.application.launchOrFocus("Xcode") end)
hs.hotkey.bind(mash.apps, '3', func... | Change `My Apps` key binding map | Change `My Apps` key binding map
Pulled By: trungpnn
| Lua | mit | eldesperado/.dotfiles |
a452cbe545cbe420f6f21b32ab6c71c7ef801905 | item/beds.lua | item/beds.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 th... | --[[
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 th... | Comment out undone featuer call | Comment out undone featuer call
| Lua | agpl-3.0 | vilarion/Illarion-Content,Illarion-eV/Illarion-Content,KayMD/Illarion-Content |
bf0670a6914d58bf7d42d777f8c1b1345a0034c1 | lexers/tavi_make.lua | lexers/tavi_make.lua | local lexer = require('lexer')
local token, word_match = lexer.token, lexer.word_match
local P, S = lpeg.P, lpeg.S
local lex = lexer.new('tavi_make', { lex_by_line = true })
-- Whitespace.
--local ws = token(lexer.WHITESPACE, lexer.space^1)
--lex:add_rule('whitespace', ws)
local filename = token(lexer.VARIABLE, (lex... | local lexer = require('lexer')
local token, word_match = lexer.token, lexer.word_match
local P, S = lpeg.P, lpeg.S
local lex = lexer.new('tavi_make', { lex_by_line = true })
-- Whitespace.
local ws = token(lexer.WHITESPACE, lexer.space^1)
--lex:add_rule('whitespace', ws)
local filename = token(lexer.VARIABLE, (lexer... | Improve the make lexer - recognise error/warning. | Improve the make lexer - recognise error/warning.
| Lua | mit | jugglerchris/textadept-vi,jugglerchris/textadept-vi |
36b59f29c8510c8a60c11cdef7ab3fc28b96dead | config/plugins.lua | config/plugins.lua | vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- TComment
use 'tomtom/tcomment_vim'
-- Lots of color schemes
use 'flazz/vim-colorschemes'
-- EditorConfig
use 'editorconfig/editorconfig-vim'
-- Haskell special characters... | vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- TComment
use 'tomtom/tcomment_vim'
-- Lots of color schemes
use 'flazz/vim-colorschemes'
-- EditorConfig
use 'editorconfig/editorconfig-vim'
-- Haskell special characters... | Add `emmet` plugin for writing HTML | Add `emmet` plugin for writing HTML
| Lua | mit | arthurvr/dotvim |
20e9d81cf6c1b11bac34ef60e34a0a274cb1b5b1 | pages/index/get.lua | pages/index/get.lua | require "paginator"
function get()
local page = 0
if http.getValues.page ~= nil then
page = math.floor(tonumber(http.getValues.page) + 0.5)
end
if page < 0 then
http:redirect("/subtopic/index")
return
end
local articleCount = db:singleQuery("SELECT COUNT(*) as total F... | require "paginator"
function get()
local page = 0
if http.getValues.page ~= nil then
page = math.floor(tonumber(http.getValues.page) + 0.5)
end
if page < 0 then
http:redirect("/subtopic/index")
return
end
local articleCount = db:singleQuery("SELECT COUNT(*) as total F... | Change cache variable name to fix possible conflicts | Change cache variable name to fix possible conflicts
| Lua | mit | Raggaer/castro,Raggaer/castro,Raggaer/castro |
8fff6720caccb754a1810eb7f9f198e06f30cb41 | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.4"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 456
t.screen.height = 264
t.consolne = false
t.modules.physics = false... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.5"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 456
t.screen.height = 264
t.consolne = false
t.modules.physics = false... | Bump release version to v0.0.5 | Bump release version to v0.0.5
| Lua | mit | hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua |
b398d7886efb5fe56678d05afa4137cd81c204b6 | libs/snapshots.lua | libs/snapshots.lua | local jsonStringify = require('json').stringify
local snapshot = require('snapshot')
local i = 0
local S1 = snapshot()
local potential = {}
return function (_, res)
collectgarbage()
collectgarbage()
local memoryUsed = 1024 * collectgarbage("count")
local S2 = snapshot()
-- Find new heap objects since last sn... | local snapshot = require('snapshot')
local i = 0
local S1 = snapshot()
local potential = {}
return function (_, res)
collectgarbage()
collectgarbage()
local memoryUsed = 1024 * collectgarbage("count")
local S2 = snapshot()
-- Find new heap objects since last snapshot
local c = 0
local details = {}
for ... | Clean up snapshot output format | Clean up snapshot output format
| Lua | apache-2.0 | luvit/luvit.io,luvit/luvit.io,luvit/luvit.io |
254d797100dff1c002d3d66396e25c763c35054e | __resource.lua | __resource.lua | server_script 'MySqlAsync.net.dll'
server_export 'mysql_configure'
server_export 'mysql_execute'
server_export 'mysql_sync_execute'
server_export 'mysql_fetch_all'
server_export 'mysql_sync_fetch_all'
server_export 'mysql_fetch_scalar'
server_export 'mysql_sync_fetch_scalar'
server_script 'lib/MySQL.lua'
server_script... | resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
server_script 'MySqlAsync.net.dll'
server_script 'lib/MySQL.lua'
server_script 'lib/init.lua'
--server_script 'example.lua'
| Remove useless export, add manifest version | Remove useless export, add manifest version
| Lua | mit | brouznouf/fivem-mysql-async,brouznouf/fivem-mysql-async,brouznouf/fivem-mysql-async |
c73aa096086ab1fa80319bb05adc0f8ca407b9c4 | Source/premake5.lua | Source/premake5.lua | project("RenHook")
kind("StaticLib")
language("C++")
pchheader("RenHook/RenHook.hpp")
pchsource("RenHook/RenHook.cpp")
if buildpath ~= nil then
targetdir(buildpath())
end
filter({ "configurations:Debug" })
symbols("On")
filter({ "configurations:Release" })
symb... | project("RenHook")
kind("StaticLib")
language("C++")
pchheader("RenHook/RenHook.hpp")
pchsource("RenHook/RenHook.cpp")
if buildpath ~= nil then
targetdir(buildpath())
end
filter({ "configurations:Debug" })
symbols("On")
filter({ "configurations:Release" })
symb... | Remove ODLib include and link | Remove ODLib include and link
| Lua | mit | WopsS/RenHook |
642c0441177ba0bc474b070943794a948cc56853 | levels/myLevel/level_custom_effect.lua | levels/myLevel/level_custom_effect.lua | local gameConfig = require("gameConfig")
local Sublevel = require("Sublevel")
local MyEffect = require("levels.myLevel.MyEffect")
local util = require("util")
local myLevel = Sublevel.new("9999999-056", "custom effect", "author name", {duration = 1800})
function myLevel:addEffect(x)
local effect = MyEffect.new({ ... | local gameConfig = require("gameConfig")
local Sublevel = require("Sublevel")
local MyEffect = require("levels.myLevel.MyEffect")
local util = require("util")
local myLevel = Sublevel.new("9999999-056", "custom effect", "author name", {duration = 1800})
function myLevel:addEffect(x)
local effect = MyEffect.new({ ... | Modify the bug of effect demo level | Modify the bug of effect demo level
| Lua | mit | keviner2004/shoot-em-up |
dba7035f3d7eb08abe21f1e28a8c2e1c0906fc16 | lua/Coroutine.lua | lua/Coroutine.lua | -- Copyright (c) 2010-14 Bifrost Entertainment AS and Tommy Nguyen
-- Distributed under the MIT License.
-- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
local coroutine_create = coroutine.create
local coroutine_resume = coroutine.resume
local coroutine_yield = coroutine.yield
local tab... | -- Copyright (c) 2010-14 Bifrost Entertainment AS and Tommy Nguyen
-- Distributed under the MIT License.
-- (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
local coroutine_create = coroutine.create
local coroutine_resume = coroutine.resume
local coroutine_yield = coroutine.yield
local tab... | Allow passing parameters to coroutine. | Allow passing parameters to coroutine.
| Lua | mit | tn0502/rainbow,pandaforks/tido-rainbow,tn0502/rainbow,tn0502/rainbow,tn0502/rainbow,tn0502/rainbow,pandaforks/tido-rainbow,pandaforks/tido-rainbow,pandaforks/tido-rainbow,tn0502/rainbow,pandaforks/tido-rainbow |
491b2e45d43549c29d0ae5d51bc2e664fd0f3a55 | test/page3.lua | test/page3.lua | -- This test checks if a query string has been given.
-- It sends the file identified by the query string.
-- Do not use it in a real server in this way!
if not mg.request_info.query_string then
mg.write("HTTP/1.0 200 OK\r\n")
mg.write("Connection: close\r\n")
mg.write("Content-Type: text/html; char... | Add a test for mg.send_file | Add a test for mg.send_file
| Lua | mit | GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver | |
46ba257d0a8dc0886cb4eca280dd09009ec4f418 | test/tests/regex_cap.lua | test/tests/regex_cap.lua | local assertEq = test.assertEq
local function log(x) test.log(tostring(x) .. "\n") end
local vi_regex = require('regex.regex')
local compile = vi_regex.compile
local pat
pat = compile('a(.*)b')
assertEq(pat:match("axyzb"), {_start=1,_end=5, groups={{2,4}},})
assertEq(pat:match("axyzbb"), {_start=1,_end=6, groups={{2... | local assertEq = test.assertEq
local function log(x) test.log(tostring(x) .. "\n") end
local vi_regex = require('regex.regex')
local compile = vi_regex.compile
local pat
pat = compile('a(.*)b')
assertEq(pat:match("axyzb"), {_start=1,_end=5, groups={{2,4}},})
assertEq(pat:match("axyzbb"), {_start=1,_end=6, groups={{2... | Fix test, which is returning the correct results after all. | Fix test, which is returning the correct results after all.
| Lua | mit | jugglerchris/textadept-vi,jugglerchris/textadept-vi,erig0/textadept-vi |
3890e19308730dd0120aba3f5f34dfc20703af33 | Quadtastic/QuadExport.lua | Quadtastic/QuadExport.lua | local QuadExport = {}
local function export_quad(filehandle, quadtable)
filehandle:write(string.format(
"{x = %d, y = %d, w = %d, h = %d}",
quadtable.x, quadtable.y, quadtable.w, quadtable.h))
end
local function export_table_content(filehandle, table, indentation)
for k, v in pairs(table) do
filehandle:write(... | Add function to export quad table as valid lua code | Add function to export quad table as valid lua code
| Lua | mit | 25A0/Quadtastic,25A0/Quadtastic | |
0ddc89d0f54ef6c97c492cf790e8cd50abfd8563 | .hammerspoon/init.lua | .hammerspoon/init.lua | require 'expandmode'
require 'movemode'
local screenmon = nil
local super = {'ctrl', 'alt', 'cmd', 'shift'}
function screensChangedCallback()
local screen1 = hs.screen.allScreens()[1]:name()
if screen1 == 'Color LCD' then
hs.notify.show('Switched KWM modes', '', 'Switched to floating window mode',''):withdraw... | require 'expandmode'
require 'movemode'
local super = {'ctrl', 'alt', 'cmd', 'shift'}
function screensChangedCallback()
local screens = hs.screen.allScreens()
if #screens < 2 then
hs.notify.show('Switched KWM modes', '', 'Switched to floating window mode',''):withdraw()
hs.execute('kwmc space -t float', t... | Refactor screenmon to work better with multiscreen | Refactor screenmon to work better with multiscreen
| Lua | mit | paradox460/.dotfiles,paradox460/.dotfiles,paradox460/.dotfiles,paradox460/.dotfiles |
6244f5b65eb4fa94b55ad33078880f7577a85238 | src/main/resources/lua/server_to_players.lua | src/main/resources/lua/server_to_players.lua | -- This script needs all active proxies available specified as args.
local insert = table.insert
local call = redis.call
local serverToData = {}
for _, proxy in ipairs(ARGV) do
local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline")
for _, player in ipairs(players) do
local server = call... | -- This script needs all active proxies available specified as args.
local insert = table.insert
local call = redis.call
local serverToData = {}
for _, proxy in ipairs(ARGV) do
local players = call("SMEMBERS", "proxy:" .. proxy .. ":usersOnline")
for _, player in ipairs(players) do
local server = call... | Clarify that Redis does allow tables to be sent back, but not associative ones. | Clarify that Redis does allow tables to be sent back, but not associative ones.
| Lua | unknown | minecrafter/RedisBungee,thechunknetwork/RedisBungee |
a927d582ed2d9cd8e139f70337578b668e918f62 | features.lua | features.lua | bed_size_x = 210
bed_size_y = 297
bed_size_z = 10
z_offset = 0.0
nozzle_width = -0.2
| bed_size_x = 210
bed_size_y = 297
bed_size_z = 10
z_offset = 0.0
nozzle_width = -0.05
| Set a smaller nozzle (-0.05). | Set a smaller nozzle (-0.05).
| Lua | mit | loic-fejoz/icesl-svg-printer |
9a0e291916bdafa3f5356106f38c9f17b5762dc6 | sslobby/gamemode/modules/sh_link.lua | sslobby/gamemode/modules/sh_link.lua | SS.Lobby.Link = {}
--------------------------------------------------
--
--------------------------------------------------
SS.Lobby.Link.MinPlayers = 4
SS.Lobby.Link.MaxPlayers = 8
--------------------------------------------------
--
--------------------------------------------------
STATUS_LINK_READY = 1
STATUS_... | SS.Lobby.Link = {}
--------------------------------------------------
--
--------------------------------------------------
SS.Lobby.Link.MinPlayers = 2
SS.Lobby.Link.MaxPlayers = 8
--------------------------------------------------
--
--------------------------------------------------
STATUS_LINK_READY = 1
STATUS_... | Set min sass players to 2 for now | Set min sass players to 2 for now | Lua | bsd-3-clause | T3hArco/skeyler-gamemodes |
ff921b2341446c94f034ab948bc6855a346bb478 | main.lua | main.lua |
local _oldRequire = require
require = function(path, ...)
return _oldRequire("source/" .. path:gsub("%/", "."), ...)
end
require "main" |
local _oldRequire = require
require = function(path, ...)
return _oldRequire("source." .. path:gsub("%/", "."), ...)
end
require "main" | Replace the root '/' with '.' | Replace the root '/' with '.'
| Lua | mit | BryceMehring/Hexel |
3674d4dc634e48ca1bd169bb8da65390e5df0a39 | wow/30-Texture-Draw.lua | wow/30-Texture-Draw.lua | require "wow/Texture";
require "rainback/AnchoredBound";
require "rainback/wow-conversion";
local Delegate = OOP.Class();
function Delegate:Constructor(frame)
self.frame = frame;
end;
function Delegate:Draw(painter)
local frame = self.frame;
local bound = frame:GetDelegate("layout"):GetBounds();
if t... | require "wow/Texture";
require "rainback/AnchoredBound";
require "rainback/wow-conversion";
local Delegate = OOP.Class();
function Delegate:Constructor(frame)
self.frame = frame;
end;
function Delegate:Draw(painter)
painter:reset();
local frame = self.frame;
local bound = frame:GetDelegate("layout")... | Reset painter when drawing a texture | Reset painter when drawing a texture
| Lua | mit | Thonik/rainback |
994ac591084db71628222bf7837df5c355a14ba2 | packages/markdown.lua | packages/markdown.lua | SILE.processMarkdown = function (content)
local lunamark = require("lunamark")
local reader = lunamark.reader.markdown
local writer = lunamark.writer.ast.new()
local parse = reader.new(writer)
local output = parse(tostring(content[1]))
SILE.process(output)
end
SILE.registerCommand("processMarkdown", functi... | Add a realy basic package to parse Markdown into normal content | Add a realy basic package to parse Markdown into normal content
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile | |
bee50e2f0b3e5cad03a38e051a7e07f12b4e7630 | pandoc-filters/withoutheadinglinks.lua | pandoc-filters/withoutheadinglinks.lua | -- Don't allow links in headings (notably drops auto verse links)
Header = function (element)
return pandoc.walk_block(element, {
Link = function (element)
return element.content
end
})
end
| Add filter for removing links from headings | Add filter for removing links from headings
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile | |
42fc425f6ed0ae1761d478e30a65bf27a718c2c8 | hammerspoon/microphone.lua | hammerspoon/microphone.lua | local message = require('status-message')
local messageMuting = message.new('muted 🎤')
local messageHot = message.new('hot 🎤')
local lastMods = {}
local recentlyClicked = false
local secondClick = false
displayStatus = function()
-- Check if the active mic is muted
if hs.audiodevice.defaultInputDevice():muted()... | local message = require('status-message')
local messageMuting = message.new('muted 🎤')
local messageHot = message.new('hot 🎤')
local lastMods = {}
local recentlyClicked = false
local secondClick = false
displayStatus = function()
-- Check if the active mic is muted
if hs.audiodevice.defaultInputDevice():inputMu... | Adjust mic mute so it actually works | Adjust mic mute so it actually works
| Lua | mit | mkornblum/.dotfiles,mkornblum/.dotfiles,mkornblum/.dotfiles,mkornblum/.dotfiles |
33bcd9836edb9a914ab770f6a148075ae0d2eef8 | lua/basic_lua_examples.lua | lua/basic_lua_examples.lua | print(x) -- Does not fail! It's just nil
print(#"café") -- It's 5, because it counts UTF-8 bytes
if 0 then
print "0 is truthy"
else
print "0 is falsy"
end
function firstFewPrimes()
return {2, 3, 5, 7, 9, 11, 13}
end
assert(type(4.66E-2) == "number")
assert(type(true and false) == "boolean")
assert(ty... | print(x) -- Does not fail! Just nil
s = "caf\u{e9}"
print(s)
assert(#s == 5) -- counts bytes
assert(utf8.len(s) == 4) -- counts characters
function firstFewPrimes()
return {2, 3, 5, 7, 9, 11, 13}
end
assert(type(4.66E-2) == "number")
assert(type(true and false) == "boolean")
as... | Upgrade to Lua 5.3 to use UTF-8, w00t | Upgrade to Lua 5.3 to use UTF-8, w00t
| Lua | mit | rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,... |
cbb6172b0b97e3ba66aa6885f3be23ce6081a7f3 | package.lua | package.lua | return {
name = "luvit/blog.luvit.io",
version = "0.0.2",
private = true,
dependencies = {
-- hoedown ffi bindings for fast markdown compiling
"creationix/hoedown@1.1.2",
-- Web server framework
"creationix/weblit-app@2.1.0",
-- Core plugin for proper http headers
"creationix/weblit-auto... | return {
name = "luvit/blog.luvit.io",
version = "0.0.3",
private = true,
dependencies = {
-- hoedown ffi bindings for fast markdown compiling
"creationix/hoedown@1.1.2",
-- Web server framework
"creationix/weblit-app@2.1.0",
-- Core plugin for proper http headers
"creationix/weblit-auto... | Make sure to use latest weblit-static | Make sure to use latest weblit-static
| Lua | apache-2.0 | luvit/luvit.io,luvit/luvit.io,luvit/luvit.io |
c79639eeb32643dfcfdd861f723b009f3e6c6f10 | run_unit_tests.lua | run_unit_tests.lua |
require('test.test_luaunit')
LuaUnit = require('luaunit')
LuaUnit.LuaUnit.verbosity = 2
os.exit( LuaUnit.LuaUnit.run() )
|
require('test.test_luaunit')
LuaUnit.verbosity = 2
os.exit( LuaUnit.run() )
| Revert "Make unittest runnable with latest changes." | Revert "Make unittest runnable with latest changes."
This reverts commit 79a6ec311ea474f438533123cd1f38de1af64c15.
| Lua | bsd-2-clause | GuntherStruyf/luaunit,GuntherStruyf/luaunit |
b47821763edfc0b51b696cfb0dfcaebb52471c65 | lua/starfall/libs_sh/vmatrix.lua | lua/starfall/libs_sh/vmatrix.lua | -- Credits to Radon & Xandaros
SF.VMatrix = {}
local vmatrix_methods, vmatrix_metamethods = SF.Typedef("VMatrix") -- Define our own VMatrix based off of standard VMatrix
local wrap, unwrap = SF.CreateWrapper( vmatrix_metamethods, true, true )
SF.VMatrix.Methods = vmatrix_methods
SF.VMatrix.Metatable = vmatrix_metamet... | -- Credits to Radon & Xandaros
SF.VMatrix = {}
local vmatrix_methods, vmatrix_metamethods = SF.Typedef("VMatrix") -- Define our own VMatrix based off of standard VMatrix
local wrap, unwrap = SF.CreateWrapper( vmatrix_metamethods, true, false )
SF.VMatrix.Methods = vmatrix_methods
SF.VMatrix.Metatable = vmatrix_metame... | Fix VMatrices being garbage collected | Fix VMatrices being garbage collected
They will still be garbage collected if there is no reference to the SF-type, but they won't if only the reference to the gmod type is missing
| Lua | bsd-3-clause | Ingenious-Gaming/Starfall,Jazzelhawk/Starfall,Xandaros/Starfall,INPStarfall/Starfall,Jazzelhawk/Starfall,Xandaros/Starfall,Ingenious-Gaming/Starfall,INPStarfall/Starfall |
838404eb63a567052abd2075a431387f08f3f319 | tests/test_weird.lua | tests/test_weird.lua | u = {['@!#'] = 'qbert', [{}] = 1729, [6.28] = 'tau'}
print(u[6.28]) -- prints "tau"
-- Key matching is basically by value for numbers
-- and strings, but by identity for tables.
a = u['@!#'] -- Now a = 'qbert'.
b = u[{}] -- We might expect 1729, but it's nil:
-- b = nil since the lookup fails. It fails
-- becaus... | u = {['@!#'] = 'qbert', [{}] = 1729, [6.28] = 'tau'}
print(u[6.28]) -- prints "tau"
-- Key matching is basically by value for numbers
-- and strings, but by identity for tables.
a = u['@!#'] -- Now a = 'qbert'.
b = u[{}] -- We might expect 1729, but it's nil:
-- b = nil since the lookup fails. It fails
-- becaus... | Change output in weird test | Change output in weird test
| Lua | mit | jirizoudun/lurun,jirizoudun/lurun,jirizoudun/lurun |
f3e2d0158614457fddba4071daff63f2a2d69f56 | tests/test_util_stanza.lua | tests/test_util_stanza.lua |
function deserialize(deserialize, st)
local stanza = st.stanza("message", { a = "a" });
local stanza2 = deserialize(st.preserialize(stanza));
assert_is(stanza2.last_add, "Deserialized stanza is missing last_add for adding child tags");
end
|
function preserialize(preserialize, st)
local stanza = st.stanza("message", { a = "a" });
local stanza2 = preserialize(stanza);
assert_is(stanza2 and stanza.name, "preserialize returns a stanza");
assert_is_not(stanza2.tags, "Preserialized stanza has no tag list");
assert_is_not(stanza2.last_add, "Preserialized s... | Add more tests for util/stanza.lua serialization routines | Add more tests for util/stanza.lua serialization routines
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
ee2b234f89f7352d814a352129e3474523741e87 | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.36"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 912
t.screen.height = 528
t.screen.fullscreen = false
t.console ... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.37"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 912
t.screen.height = 528
t.screen.fullscreen = false
t.console ... | Bump release version to v0.0.37 | Bump release version to v0.0.37
| Lua | mit | hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua |
cfc0540486748fd2b8a4f9fe373efde21abd420e | Modules/Shared/Events/StepUtils.lua | Modules/Shared/Events/StepUtils.lua | --- Binds animations into step, where the animation only runs as needed
-- @module StepUtils
-- @author Quenty
local RunService = game:GetService("RunService")
local StepUtils = {}
-- update should return true while it needs to update
function StepUtils.bindToRenderStep(update)
assert(type(update) == "function")
... | --- Binds animations into step, where the animation only runs as needed
-- @module StepUtils
-- @author Quenty
local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")
local StepUtils = {}
-- update should return true while it needs to update
function StepUtils.bindToRender... | Add ability to execute once at render priority | Add ability to execute once at render priority
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
5722f71d8ca26715e979ed03cdc08a52e2fa863b | layout-cep.lua | layout-cep.lua | local book = SILE.require("classes/book");
book:loadPackage("masters")
book:defineMaster({ id = "right", firstContentFrame = "content", frames = {
content = {left = "22.5mm", right = "100%-15mm", top = "20mm", bottom = "top(footnotes)" },
runningHead = {left = "left(content)", right = "right(content)", top = "top(c... | local book = SILE.require("classes/book");
book:defineMaster({ id = "right", firstContentFrame = "content", frames = {
content = {left = "20mm", right = "100%-12.5mm", top = "20mm", bottom = "100%-15mm" },
runningHead = {left = "left(content)", right = "right(content)", top = "top(content)-10mm", bottom = "top(cont... | Use narrower margins and no footer frame for pocket size | Use narrower margins and no footer frame for pocket size
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
bdb3352bb688a020bdc7f0458f52ab26cd421bb5 | src/lua/init.lua | src/lua/init.lua | dmp = require('src/lua/diff_match_patch')
_G.apply_patch = function(buf_text, patch_text)
local patches = dmp.patch_fromText(patch_text)
local text, results = dmp.patch_apply(patches, buf_text)
local clean_patch = true
for k,v in ipairs(results) do
if v == false then
clean_patch = false
break
... | Make a nice helper function that applies patches | Make a nice helper function that applies patches
| Lua | apache-2.0 | Floobits/diffshipper,Floobits/diffshipper | |
1a6fa0292724258d3fa08be7474b6359eeef074d | data/audio_config.lua | data/audio_config.lua | audio.open()
audio.channels(10)
audio.load_chunk('sfx/Pickup_Coin.wav')
audio.load_chunk('sfx/Jump.wav')
audio.load_music('sfx/FTL soundtrack - ColonialBATTLE.mp3')
| audio.open()
audio.channels(10)
audio.load_chunk('sfx/Pickup_Coin.wav')
audio.load_chunk('sfx/Jump.wav')
| Remove in config file too | Remove in config file too
| Lua | mit | n00bDooD/geng,n00bDooD/geng,n00bDooD/geng |
a27858e8b6feb255d4bed80fddd00ea4a9adea79 | test/package/extracttarball/extracttarball.lua | test/package/extracttarball/extracttarball.lua | require('buildsys')
bd = builddir()
bd:extract(bd:fetch { method = 'dl', uri = 'http://awpbuild.atlnz.lc/release_tarballs/dbus-1.2.16.tar.gz' })
| require('buildsys')
bd = builddir()
bd:extract(
bd:fetch {
method = 'dl',
uri = 'https://dbus.freedesktop.org/releases/dbus/dbus-1.2.16.tar.gz',
}
)
| Allow tests to run for GitHub clones | MAINT: Allow tests to run for GitHub clones
Change-Id: I3b21aecd557a63fc91cab58e98889888a24319ac
Reviewed-by: Scott Parlane <85029adc3fa41ef14594a57826619713bfe95f25@alliedtelesis.co.nz>
Signed-off-by: Matt Bennett <e3d8681cec70d3da741935b3385821001b249adc@alliedtelesis.co.nz>
| Lua | bsd-2-clause | alliedtelesis/buildsyspp,ATL-NZ/buildsyspp |
6195dd3252dfd4fc987458e484bfc7ec707190d3 | test/dev-app/index.lua | test/dev-app/index.lua | package.path = package.path .. ';'..(debug.getinfo(1).source):match('^@?(.-)/index.lua$')..'/../../src/?.lua'
require "sailor"
sailor.launch()
| package.path = package.path .. ';'..((debug.getinfo(1).source):match('^@?(.-)/index.lua$') or '')..'/../../src/?.lua'
require "sailor"
sailor.launch()
| Debug source returns nil on cgilua. | Debug source returns nil on cgilua.
| Lua | mit | hallison/sailor,felipedaragon/sailor,ignacio/sailor,mpeterv/sailor,ignacio/sailor,noname007/sailor,felipedaragon/sailor,mpeterv/sailor,sailorproject/sailor,Etiene/sailor,jeary/sailor,Etiene/sailor |
487bc7383c0e241f05760cfd86566bea8ee15d67 | build/scripts/tools/ndk_server.lua | build/scripts/tools/ndk_server.lua | TOOL.Name = "SDKServer"
TOOL.Directory = "../SDK"
TOOL.Kind = "Library"
TOOL.TargetDirectory = "../SDK/lib"
TOOL.Defines = {
"NDK_BUILD",
"NDK_SERVER"
}
TOOL.Includes = {
"../SDK/include",
"../SDK/src"
}
TOOL.Files = {
"../SDK/include/NDK/**.hpp",
"../SDK/include/NDK/**.inl",
"../SDK/src/NDK/**.hpp",
"../SD... | TOOL.Name = "SDKServer"
TOOL.Directory = "../SDK"
TOOL.Kind = "Library"
TOOL.TargetDirectory = "../SDK/lib"
TOOL.Defines = {
"NDK_BUILD",
"NDK_SERVER"
}
TOOL.Includes = {
"../SDK/include",
"../SDK/src"
}
TOOL.Files = {
"../SDK/include/NDK/**.hpp",
"../SDK/include/NDK/**.inl",
"../SDK/src/NDK/**.hpp",
"../SD... | Fix dependencies, allowing it to exists in server mode | Build/NDKServer: Fix dependencies, allowing it to exists in server mode
Former-commit-id: e917ce65aaea2567e4cb261777f458c3ea8ecdad [formerly a2f437b555af173f06b75f78bfe89ee14de7ba9f]
Former-commit-id: 83d69a7152c45f02ae5a344c7f8be574cded2318 | Lua | mit | DigitalPulseSoftware/NazaraEngine |
1e1a4626a6fb9761b4fda8581a138de9a4cb8601 | Video-decoder/test-stream.lua | Video-decoder/test-stream.lua | require("pl")
require("image")
local video = assert(require("libvideo_decoder"))
-- Options ---------------------------------------------------------------------
opt = lapp([[
-v, --videoPath (default '') path to video file
]])
-- load a video and extract frame dimensions
local status, height, width, length, f... | Add testing script for vidoe-decoder | Add testing script for vidoe-decoder
Testing script shows how to receive a stream and save as a file in
background.
| Lua | bsd-3-clause | e-lab/torch-toolbox,kaustubhcs/torch-toolbox,e-lab/torch-toolbox,vseledkin/torch-toolbox,e-lab/torch-toolbox,kaustubhcs/torch-toolbox,kaustubhcs/torch-toolbox,vseledkin/torch-toolbox,vseledkin/torch-toolbox | |
ff9cc19269b9838406400b03c18105745c37bae2 | modulefiles/beautifulsoup4/4.3.2.lua | modulefiles/beautifulsoup4/4.3.2.lua | --[[
module load gcc python
pip install --user --verbose beautifulsoup4==4.3.2
]]
local home = os.getenv("HOME")
local prefix = pathJoin(home, ".local")
local pythonpath = pathJoin(prefix, "lib/python2.7/site-packages")
prereq('python')
prepend_path("PYTHONPATH", prefix)
| --[[
module load gcc python/2.7.8
pip install --install-option="--prefix=/home/idhmc/apps/beautifulsoup4/4.3.2" --verbose beautifulsoup4==4.3.2
]]
local prefix = "/home/idhmc/apps/beautifulsoup4/4.3.2"
local pythonpath = pathJoin(prefix, "lib/python2.7/site-packages")
prereq('python')
prepend_path("PYTHONPATH", p... | Update beautifulsoup4 to install to /home/idhmc/apps | Update beautifulsoup4 to install to /home/idhmc/apps
| Lua | apache-2.0 | Early-Modern-OCR/hOCR-De-Noising |
90f3e61dd37def3348670d87c8943e192f27d108 | .textadept/init.lua | .textadept/init.lua | -- 4 spaces FTW!
buffer.tab_width = 4
buffer.use_tabs = false
-- Turn on line wrapping:
buffer.wrap_mode = buffer.WRAP_WORD
-- Increase font size for GUI:
buffer:set_theme(
'light',
{
font = 'IBM Plex Mono',
fontsize = 18
}
)
-- Interpret PICO-8 files as Lua.
textadept.file_types.extension... | -- 4 spaces FTW!
buffer.tab_width = 4
buffer.use_tabs = false
-- Turn on line wrapping:
buffer.wrap_mode = buffer.WRAP_WORD
-- Increase font size for GUI:
buffer:set_theme(
'light',
{
font = 'IBM Plex Mono',
fontsize = 18
}
)
-- Interpret PICO-8 files as Lua.
textadept.file_types.extension... | Add two to line number margin width. | Add two to line number margin width. | Lua | mpl-2.0 | ryanpcmcquen/linuxTweaks |
6aca8daf16420766f2b197d16e7180398d9b73af | lua_modules/bh1750/bh1750_Example1.lua | lua_modules/bh1750/bh1750_Example1.lua | -- ***************************************************************************
-- BH1750 Example Program for ESP8266 with nodeMCU
-- BH1750 compatible tested 2015-1-30
--
-- Written by xiaohu
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***********************************************************************... | Print LUX Data Every 10s | Print LUX Data Every 10s | Lua | mit | bhrt/nodeMCU,jmattsson/nodemcu-firmware,cal101/nodemcu-firmware,digitalloggers/nodemcu-firmware,funshine/nodemcu-firmware,flexiti/nodemcu-firmware,ekapujiw2002/nodemcu-firmware,noahchense/nodemcu-firmware,creationix/nodemcu-firmware,dnc40085/nodemcu-firmware,bogvak/nodemcu-firmware,zerog2k/nodemcu-firmware,luizfeliperj... | |
e5833ce961550042b7407e039f52068443edc9f8 | .config/nvim/lua/user/plugins/gitsigns.lua | .config/nvim/lua/user/plugins/gitsigns.lua | local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
return
end
gitsigns.setup()
| local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
return
end
gitsigns.setup({
signs = {
add = { text = "▎" },
change = { text = "▎" },
changedelete = { text = "▎" },
},
numhl = true,
})
| Update bar characters and enable numhl | Update bar characters and enable numhl
| Lua | isc | tarebyte/dotfiles,tarebyte/dotfiles |
854949759011632f994df6af14a583bb9d5238d2 | src/cosy/file/test.lua | src/cosy/file/test.lua | -- These lines are required to correctly run tests:
require "cosy.loader.busted"
require "busted.runner" ()
local File = require "cosy.file"
describe ("Module cosy.file", function ()
local expected_data
local filename
before_each (function ()
filename = os.tmpname ()
expected_data = {
"First line."... | -- These lines are required to correctly run tests:
require "cosy.loader.busted"
require "busted.runner" ()
local File = require "cosy.file"
describe ("Module cosy.file", function ()
local expected_data
local filename
before_each (function ()
filename = os.tmpname ()
expected_data = {
"First line."... | Remove print that was used for debug. | Remove print that was used for debug.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
5c0b6c9790358c3d42c45298b04efae6458663b5 | mock/asset/PhysicsBodyDef.lua | mock/asset/PhysicsBodyDef.lua | module 'mock'
CLASS: PhysicsBodyDef ()
:MODEL{
Field 'tag' :string();
'----';
Field 'bodyType' :enum( EnumPhysicsBodyType );
'----';
Field 'allowSleep' :boolean();
Field 'isBullet' :boolean();
Field 'fixedRotation' :boolean();
'----';
Field 'gravityScale' :number();
F... | module 'mock'
CLASS: PhysicsBodyDef ()
:MODEL{
Field 'tag' :string();
'----';
Field 'bodyType' :enum( EnumPhysicsBodyType );
'----';
Field 'allowSleep' :boolean();
Field 'isBullet' :boolean();
Field 'fixedRotation' :boolean();
'----';
Field 'gravityScale' :number();
F... | Return copy of default body def | Return copy of default body def
| Lua | mit | tommo/mock |
ff47eda7d211315b1573e73cbd3692ed3ad49469 | build/scripts/tools/assimp.lua | build/scripts/tools/assimp.lua | TOOL.Name = "Assimp"
TOOL.Directory = "../plugins/Assimp"
TOOL.Kind = "Plugin"
TOOL.TargetDirectory = "../SDK/lib"
TOOL.Includes = {
"../include",
"../plugins/Assimp"
}
TOOL.Files = {
"../plugins/Assimp/**.hpp",
"../plugins/Assimp/**.inl",
"../plugins/Assimp/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"Naz... | TOOL.Name = "Assimp"
TOOL.Directory = "../plugins/Assimp"
TOOL.Kind = "Plugin"
TOOL.TargetDirectory = "../SDK/lib"
TOOL.Includes = {
"../extlibs/include",
"../include",
"../plugins/Assimp"
}
TOOL.Files = {
"../plugins/Assimp/**.hpp",
"../plugins/Assimp/**.inl",
"../plugins/Assimp/**.cpp"
}
TOOL.Libraries =... | Fix compilation error because of missing includes | Build/Assimp: Fix compilation error because of missing includes
Former-commit-id: dba6d044f3575ad69b03d56aa5a91c22671d97f5 [formerly b7093d6e2a1e21eccbe3ee6bb54265da98c49001]
Former-commit-id: d229e251df3032d9d60357fa12276c24eda8db27 | Lua | mit | DigitalPulseSoftware/NazaraEngine |
8d1f708bc2e4cd026f00f642064ee9b54b104cf5 | conf/nbsearch/update-index.lua | conf/nbsearch/update-index.lua | update_index = {
maxProcesses = 1,
delay = 1,
onCreate = "/opt/nbsearch/update-index ^pathname",
onModify = "/opt/nbsearch/update-index ^pathname",
onMove = "/opt/nbsearch/update-index ^d.pathname",
}
settings {
logfile = "/tmp/lsyncd.log",
statusFile = "/tmp/lsyncd.status",
nodaemon = false,
}
s... | update_index = {
maxProcesses = 1,
delay = 1,
onCreate = "/opt/nbsearch/update-index ^pathname",
onModify = "/opt/nbsearch/update-index ^pathname",
onMove = "/opt/nbsearch/update-index ^d.pathname",
}
settings {
logfile = "/tmp/lsyncd.log",
statusFile = "/tmp/lsyncd.status",
nodaemon = false,
}
s... | Fix lsyncd script to use NBSEARCHDB_BASE_DIR | Fix lsyncd script to use NBSEARCHDB_BASE_DIR
| Lua | bsd-3-clause | NII-cloud-operation/Jupyter-LC_docker,NII-cloud-operation/Jupyter-LC_docker |
318269c6f52030fced2997153db3d8abca5ad13b | gumbo/Buffer.lua | gumbo/Buffer.lua | local Buffer = {}
Buffer.__index = Buffer
function Buffer:write(...)
local n = #self
for i = 1, select("#", ...) do
self[n+i] = select(i, ...)
end
end
function Buffer:__tostring()
return table.concat(self)
end
return function()
return setmetatable({}, Buffer)
end
| local Buffer = {}
Buffer.__index = Buffer
function Buffer:write(...)
local length = self.length
for i = 1, select("#", ...) do
length = length + 1
self[length] = select(i, ...)
end
self.length = length
end
function Buffer:__tostring()
return table.concat(self)
end
return function(... | Store buffer length in a field instead of using the length operator | Store buffer length in a field instead of using the length operator
| Lua | apache-2.0 | craigbarnes/lua-gumbo,craigbarnes/lua-gumbo,craigbarnes/lua-gumbo |
748d47daaaa70cafce3d49064b26aef930e571fb | modulefiles/Core/root/6.06-02-py34.lua | modulefiles/Core/root/6.06-02-py34.lua | help(
[[
This module loads ROOT 6.06-02 with python 3.4 support into the environment. ROOT is a
physics analysis application.
]])
whatis("Loads the ROOT data analysis environmemt")
local version = "6.06-02-py34"
local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/root/"..version
pushenv("ROOTSYS", base)
prep... | help(
[[
This module loads ROOT 6.06-02 with python 3.4 support into the environment. ROOT is a
physics analysis application.
]])
whatis("Loads the ROOT data analysis environmemt")
local version = "6.06-02-py34"
local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/root/"..version
pushenv("ROOTSYS", base)
pre... | Fix load in root 6.0.6 module | Fix load in root 6.0.6 module
| Lua | apache-2.0 | OSGConnect/modulefiles,OSGConnect/modulefiles,OSGConnect/modulefiles |
e5ec7063d29602e256bf9f6a64a975dd50c1bb33 | Modules/Shared/Utility/NumberRangeUtils.lua | Modules/Shared/Utility/NumberRangeUtils.lua | ---
-- @module NumberRangeUtils
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local NumberRangeUtils = {}
function NumberRangeUtils.scale(range, scale)
return NumberRange.new(range.Min*scale, range.Max*scale)
end
return NumberRangeUtils | ---
-- @module NumberRangeUtils
local NumberRangeUtils = {}
function NumberRangeUtils.scale(range, scale)
return NumberRange.new(range.Min*scale, range.Max*scale)
end
return NumberRangeUtils | Fix number range lutils syntax | Fix number range lutils syntax
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
84962c647f8a8d487e6e574bf3278fdb28af4d43 | .config/awesome/widgets/brightness.lua | .config/awesome/widgets/brightness.lua | local awful = require("awful")
local wibox = require("wibox")
local M = {}
function M.getBrightness()
return tonumber(awful.util.pread("xbacklight -get"))
end
function M.changeBrightness(x)
awful.util.pread("xbacklight -inc " .. tostring(x))
end
function M.update(reg)
-- reg.callback(reg.widget, M.getBr... | local awful = require("awful")
local wibox = require("wibox")
local M = {}
function M.getBrightness(device)
-- xbacklight causes lags
-- return tonumber(awful.util.pread("xbacklight -get"))
return tonumber(awful.util.pread("cat /sys/class/backlight/" .. device .. "/brightness")) / 10
end
function M.chang... | Fix periodic lags caused by xbacklight | Fix periodic lags caused by xbacklight
Seems like some update broke/changed something that causes xbacklight
to produce a short screen freeze when called.
To work around this issue the brightness value from /sys is used for
polling.
| Lua | mit | mphe/dotfiles,mphe/dotfiles,mall0c/dotfiles,mphe/dotfiles,mphe/dotfiles,mphe/dotfiles,mphe/dotfiles,mall0c/dotfiles |
ecda1e871740290f069938d55ebf2c5c523a564a | devilspie2/desktop-term.lua | devilspie2/desktop-term.lua | if (get_window_role() == "desktop-term") then
set_window_geometry(88,24,1536,1024);
undecorate_window();
set_skip_pager(true);
set_skip_tasklist(true);
set_window_type("WINDOW_TYPE_DESKTOP");
set_window_below();
pin_window();
stick_window();
end
| Add devilspie config for desktop terminal | Add devilspie config for desktop terminal
| Lua | mit | coderstephen/dotfiles,sagebind/dotfiles | |
6761bbfd17863083eed426510bb490a94d301073 | test/resources/prosody.cfg.lua | test/resources/prosody.cfg.lua | modules_enabled = {
"roster";
"saslauth";
"tls";
"dialback";
"disco";
"private";
"vcard";
"version";
"uptime";
"time";
"ping";
"pep";
"register";
"admin_adhoc";
"posix";
"bosh";
"websocket";
};
allow_registration = true;
daemonize = true;
consider_websocket_secure = true... | modules_enabled = {
"roster";
"saslauth";
"tls";
"dialback";
"disco";
"private";
"vcard";
"version";
"uptime";
"time";
"ping";
"pep";
"register";
"admin_adhoc";
"posix";
"bosh";
"websocket";
};
allow_registration = true;
daemonize = true;
consider_websocket_secure = true... | Make prosody send CORS headers | Make prosody send CORS headers
| Lua | isc | xmppjs/xmpp.js,mweibel/node-xmpp-client,ggozad/node-xmpp,ggozad/node-xmpp,capablemonkey/node-xmpp-client,node-xmpp/node-xmpp,xmppjs/xmpp.js,capablemonkey/node-xmpp-client,node-xmpp/node-xmpp |
64b68fbc9346cd5edb0c40f220c7a0f3f2a02817 | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.34"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 912
t.screen.height = 528
t.screen.fullscreen = false
t.console ... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.35"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 912
t.screen.height = 528
t.screen.fullscreen = false
t.console ... | Bump release version to v0.0.35 | Bump release version to v0.0.35
| Lua | mit | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua |
617aa381a8ad85a94e56efeedb1082e36966a44a | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.35"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 912
t.screen.height = 528
t.screen.fullscreen = false
t.console ... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.36"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 912
t.screen.height = 528
t.screen.fullscreen = false
t.console ... | Bump release version to v0.0.36 | Bump release version to v0.0.36
| Lua | mit | hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua |
36374c33fe67e06ff1c9bf0664b73cd28172e180 | perf/local_thr_poll.lua | perf/local_thr_poll.lua | -- Copyright (c) 2010 Aleksey Yeschenko <aleksey@yeschenko.com>
--
-- 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, c... | Add zmq.poller version of local_thr.lua to perf/ folder. | Add zmq.poller version of local_thr.lua to perf/ folder.
| Lua | mit | Neopallium/lua-zmq,azukiapp/lua-zmq | |
bd991f3fc920eb7d5b7dd12546b9de4ee1b50a87 | test/array-nested-struct-access.lua | test/array-nested-struct-access.lua | #! /usr/bin/env lua
--
-- array-nested-struct-access.lua
-- Copyright (C) 2015 Adrian Perez <aperez@igalia.com>
--
-- Distributed under terms of the MIT license.
--
local triangle = require("eris").load("libtest").triangle
assert.Not.Nil(triangle)
assert.Equal(3, #triangle)
assert.Equal(1, triangle[1].x)
assert.Equal(... | Add missing array-nested-struct-acess test case | Add missing array-nested-struct-acess test case
| Lua | mit | aperezdc/lua-eol,aperezdc/eris,aperezdc/eris,aperezdc/lua-eol | |
5e2142ba6d411d1f536cdcfeb5033a7cb25d0e13 | SVUI_Skins/components/blizzard/orderhalltalents.lua | SVUI_Skins/components/blizzard/orderhalltalents.lua | --[[
##############################################################################
S V U I By: Failcoder
Order Hall Talents By: JoeyMagz
##############################################################################
--]]
--[[ GLOBALS ]]--
local _G = _G;
local unpack = _G.unpack;
local select = _G.select;
loc... | Create - Order Hall Talent Skin | Create - Order Hall Talent Skin | Lua | mit | FailcoderAddons/supervillain-ui,finalsliver/supervillain-ui | |
e9a852e3207fa8c6f6f55aafba3a9dd45df72da2 | lua/queue_message.lua | lua/queue_message.lua | local ns, queue, id, message = ARGV[1], ARGV[2], ARGV[3], ARGV[4]
redis.call('SADD', ns..':queues', queue)
redis.call('HSET', ns..':'..queue..':messages', id, message)
if redis.call('SISMEMBER', ns..':'..queue..':queued_ids', id) == 0 then
redis.call('SADD', ns..':'..queue..':queued_ids', id)
redis.call('LPUS... | local ns, queue, id, message = ARGV[1], ARGV[2], ARGV[3], ARGV[4]
redis.call('SADD', ns..':queues', queue)
redis.call('HSET', ns..':'..queue..':messages', id, message)
if redis.call('SISMEMBER', ns..':'..queue..':queued_ids', id) == 0 then
redis.call('ZREM', ns..':schedule', queue..'||'..id)
redis.call('SADD'... | Remove message from schedule when queueing | Remove message from schedule when queueing
| Lua | mit | mgdigital/BusQue |
af81b5fe0e7de8496769414669b3d3b00ea2e6e1 | src/statistics.lua | src/statistics.lua | local Statsd = require "statsd"
local module = {}
local statsd
-- create statsd object, which will open up a persistent port
if statsd_host and statsd_port then
local namespace = statsd_namespace
if namespace then
statsd = Statsd({
host = statsd_host,
port = statsd_port,
namespace = namespa... | local Statsd = require "statsd"
local module = {}
local statsd
-- create statsd object, which will open up a persistent port
if statsd_host and statsd_port then
local namespace = statsd_namespace
if namespace then
statsd = Statsd({
host = statsd_host,
port = statsd_port,
namespace = namespa... | Add Statsd Logging for Login Success/Failure | Add Statsd Logging for Login Success/Failure
Add Statsd Logging for Login Success/Failure
Also revert the Lua Nginx module to version prior to commit that is causing
random test failures
https://gist.github.com/wkimeria/e4d0686194e71eaefcd6
| Lua | mit | sdgdsffdsfff/ngx_borderpatrol,lookout/ngx_borderpatrol,trane/ngx_borderpatrol,rwygand/ngx_borderpatrol,trane/ngx_borderpatrol,sdgdsffdsfff/ngx_borderpatrol,rwygand/ngx_borderpatrol,rwygand/ngx_borderpatrol,lookout/ngx_borderpatrol,sdgdsffdsfff/ngx_borderpatrol,wkimeria/ngx_borderpatrol,trane/ngx_borderpatrol,wkimeria/n... |
a014cbcccafade3930dd00f3997ab2d386589641 | examples/fs-coroutines.lua | examples/fs-coroutines.lua | local FS = require('fs');
local co
co = coroutine.create(function (filename)
print("opening...")
local err, fd = FS.open(co, filename, 'r', "0644")
p("on_open", {err=err, fd=fd})
if (err) then return end
print("fstatting...")
local err, stat = FS.fstat(co, fd)
p("stat", {err=err, stat=stat})
if (err)... | local FS = require('fs');
-- Simple wrapper for coroutine steps
function fiber(fn)
local co = coroutine.create(fn)
assert(coroutine.resume(co, co))
end
fiber(function (co)
print("opening...")
local err, fd = FS.open(co, "license.txt", "r", "0644")
p("on_open", {err=err, fd=fd})
if (err) then return end
... | Add a saner coroutine wrapper in the example | Add a saner coroutine wrapper in the example
Change-Id: I71132ca8b51219a1619a46c9f1e63da9bcacee02
| Lua | apache-2.0 | DBarney/luvit,kaustavha/luvit,rjeli/luvit,kaustavha/luvit,DBarney/luvit,sousoux/luvit,bsn069/luvit,luvit/luvit,zhaozg/luvit,rjeli/luvit,boundary/luvit,GabrielNicolasAvellaneda/luvit-upstream,GabrielNicolasAvellaneda/luvit-upstream,kaustavha/luvit,sousoux/luvit,boundary/luvit,bsn069/luvit,boundary/luvit,sousoux/luvit,Ga... |
a1a7b7d7f85a6ee0f06637ed199c14aba5c6e37e | spec/wrap_spec.lua | spec/wrap_spec.lua | local wrap = require "wrap"
local wrapDefs = wrap.wrapMachineDefs
describe("Unit definition wrapper", function()
it("should error if no processing function is provided", function()
local noProcessingUnit = {
name = 'Bad Unit',
knobs = {}
}
assert.has_error(functi... | local wrap = require "wrap"
local wrapDefs = wrap.wrapMachineDefs
describe("Unit definition wrapper", function()
it("should error if no processing function is provided", function()
local noProcessingUnit = {
name = 'Bad Unit',
knobs = {}
}
assert.has_error(functi... | Add two more wrapper tests and placeholders | Add two more wrapper tests and placeholders
One test for wrapping a mono effect and one for a stereo effect.
| Lua | mit | graue/luasynth |
daa0021c16e782a2869fd29cbae0634e0bedadfa | home/.config/nvim/lua/plugins/browsing.lua | home/.config/nvim/lua/plugins/browsing.lua | return function(use)
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
setup = function()
vim.g.nvim_tree_window_picker_chars = 'aoeuidhtnsgcrld;qjkxbmwv'
vim.g.nvim_tree_highlight_opened_files = 0 -- breaks icon color
vim.g.nvim_tree_indent_markers = 1
v... | return function(use)
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
setup = function()
vim.g.nvim_tree_highlight_opened_files = 0 -- breaks icon color
vim.g.nvim_tree_add_trailing = 1
end,
config = function()
local tree_cb = require'nvim-tree.config'... | Update config to not use deprecated nvim-tree options | Update config to not use deprecated nvim-tree options
| Lua | mit | NullVoxPopuli/dotfiles,NullVoxPopuli/dotfiles,NullVoxPopuli/dotfiles |
3a8c1b131c2aa65fb71f2728d4b7252a4d178bd6 | nn/LogSoftMaxInplace.lua | nn/LogSoftMaxInplace.lua | -- Authors: Tomas Kocisky
--
-- Customizes the nn.LogSoftMax to be computed inplace
--
local LogSoftMaxInplace, parent = torch.class('oxnn.LogSoftMaxInplace', 'nn.LogSoftMax')
function LogSoftMaxInplace:__init(outputInplace, gradInputInplace)
parent.__init(self)
self.outputInplace = outputInplace
self.gradInp... | -- Authors: Tomas Kocisky
--
-- Customizes the nn.LogSoftMax to be computed inplace
--
local LogSoftMaxInplace, parent = torch.class('oxnn.LogSoftMaxInplace', 'nn.LogSoftMax')
function LogSoftMaxInplace:__init(outputInplace, gradInputInplace)
parent.__init(self)
self.outputInplace = outputInplace
self.gradInp... | Update LogSoftMaxInPlace to work with THNN | Update LogSoftMaxInPlace to work with THNN
| Lua | bsd-3-clause | paidi/oxnn,paidi/oxnn,tkocisky/oxnn,tkocisky/oxnn,paidi/oxnn,tkocisky/oxnn |
96d9b360eec01b533e959daedec0813af1d76643 | extensions/sqlite3/init.lua | extensions/sqlite3/init.lua | module = require("hs.sqlite3.lsqlite3")
return module
| --- === hs.sqlite3 ==
---
--- Interact with SQLite databases
---
--- Notes:
--- * This module is LSQLite 0.9.4 as found at http://lua.sqlite.org/index.cgi/index
--- * It is unmodified apart from removing `db:load_extension()` as this feature is not available in Apple's libsqlite3.dylib
--- * For API documentation pl... | Add minimal documentation for hs.sqlite3 | Add minimal documentation for hs.sqlite3
| Lua | mit | Hammerspoon/hammerspoon,latenitefilms/hammerspoon,Hammerspoon/hammerspoon,zzamboni/hammerspoon,Hammerspoon/hammerspoon,CommandPost/CommandPost-App,asmagill/hammerspoon,bradparks/hammerspoon,latenitefilms/hammerspoon,Habbie/hammerspoon,zzamboni/hammerspoon,Hammerspoon/hammerspoon,latenitefilms/hammerspoon,knu/hammerspoo... |
a24452461418d7c8796997bb8c77eabd34363d07 | CircuitsUI_0.1.0/prototypes/crafts.lua | CircuitsUI_0.1.0/prototypes/crafts.lua | data:extend({
{
type = "recipe",
name = "ui-combinator",
enabled = true,
ingredients =
{
{"advanced-circuit", 5},
{"lamp", 3}
},
result = "ui-combinator"
}
})
| data:extend({
{
type = "recipe",
name = "ui-combinator",
enabled = true,
ingredients =
{
{"advanced-circuit", 5},
{"small-lamp", 3}
},
result = "ui-combinator"
}
})
| Fix costs entity name for lamp --> small-lamp | CircuitsUI: Fix costs entity name for lamp --> small-lamp
| Lua | mit | Zomis/FactorioMods |
f030c1c71ed8b9797b15d711f455756fc172da8e | test/page5.lua | test/page5.lua | mg.write("HTTP/1.0 200 OK\r\n")
mg.write("Content-Type: text/html\r\n")
mg.write("\r\n")
mg.write([[<html><body><p>
Hello world!
</p>
</body></html>
]])
| Add very simple test page (created by Lua) | Add very simple test page (created by Lua)
| Lua | mit | GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver | |
effb57247caefa89476b64824fa57bf08052aa42 | lua_modules/yeelink/Example_for_Yeelink_Lib.lua | lua_modules/yeelink/Example_for_Yeelink_Lib.lua | -- ***************************************************************************
-- Example for Yeelink Lib
--
-- Written by Martin
--
--
-- MIT license, http://opensource.org/licenses/MIT
-- ***************************************************************************
wifi.setmode(wifi.STATION) --Step1: Connect t... | Add Example to yeelink lib | Add Example to yeelink lib | Lua | mit | shangwudong/MyNodeMcu,flexiti/nodemcu-firmware,christakahashi/nodemcu-firmware,eku/nodemcu-firmware,iotcafe/nodemcu-firmware,karrots/nodemcu-firmware,zhujunsan/nodemcu-firmware,bhrt/nodeMCU,digitalloggers/nodemcu-firmware,FelixPe/nodemcu-firmware,nwf/nodemcu-firmware,marcelstoer/nodemcu-firmware,flexiti/nodemcu-firmwar... | |
1f395c66eeaabdc36f11cb333529d271ed4566a0 | lib/resty/auto-ssl/utils/shell_execute.lua | lib/resty/auto-ssl/utils/shell_execute.lua | local shell = require "resty.auto-ssl.vendor.shell"
local start_sockproc = require "resty.auto-ssl.utils.start_sockproc"
return function(command)
-- Make sure the sockproc has started before trying to execute any commands
-- (since it's started by only a single worker in init_worker, it's possible
-- other worke... | local shell = require "resty.auto-ssl.vendor.shell"
local start_sockproc = require "resty.auto-ssl.utils.start_sockproc"
return function(command)
-- Make sure the sockproc has started before trying to execute any commands
-- (since it's started by only a single worker in init_worker, it's possible
-- other worke... | Increase default timeout for calling letsencrypt.sh to 60 seconds. | Increase default timeout for calling letsencrypt.sh to 60 seconds.
This attempts to workaround potential slowdowns on Let's Encrypt's end
without dropping the initial request while registering the cert.
The previous default timeout builtin to resty-shell was 15 seconds.
Hopefully certificate registrations won't actua... | Lua | mit | UseFedora/lua-resty-auto-ssl,UseFedora/lua-resty-auto-ssl,GUI/lua-resty-auto-ssl |
bd019d4297f65eb8b55f19b8813405511fff6737 | test/tests/undo_redo.lua | test/tests/undo_redo.lua | test.open('words.txt')
local lineno = test.lineno
local colno = test.colno
local assertEq = test.assertEq
test.keys('dd')
assertEq(buffer:get_line(0), 'hey bee cee dee ee eff\n')
test.keys('u')
assertEq(buffer:get_line(0), 'one two three four five\n')
test.key('c-r')
assertEq(buffer:get_line(0), 'hey bee cee dee ee ef... | Add a very basic undo/redo test. | Add a very basic undo/redo test.
| Lua | mit | jugglerchris/textadept-vi,erig0/textadept-vi,jugglerchris/textadept-vi | |
c11029927e41d4f12f579511e992826a2e414471 | src/main/resources/workerScripts/jesque_pop.lua | src/main/resources/workerScripts/jesque_pop.lua | local queueKey = KEYS[1]
local inFlightKey = KEYS[2]
local freqKey = KEYS[3]
local now = ARGV[1]
local payload = nil
local not_empty = function(x)
return (type(x) == 'table') and (not x.err) and (#x ~= 0)
end
local ok, queueType = next(redis.call('TYPE', queueKey))
if queueType == 'zset' then
local i, lPayload = ... | local queueKey = KEYS[1]
local inFlightKey = KEYS[2]
local freqKey = KEYS[3]
local now = ARGV[1]
local payload = nil
local not_empty = function(x)
return (type(x) == 'table') and (not x.err) and (#x ~= 0)
end
local ok, queueType = next(redis.call('TYPE', queueKey))
if queueType == 'zset' then
redis.call('Z... | Add LIMIT to Lua pop server side script | Add LIMIT to Lua pop server side script | Lua | apache-2.0 | argvk/jesque,gresrun/jesque |
2b8a3a7a000baae3e084e9df07470c5280df87e8 | spec/parser.lua | spec/parser.lua | describe('Test the ini parser', function()
local ini = require 'ini'
setup(function()
end)
it('basic test', function()
assert.same(ini.parse('a_key = this is the value for this set'), {'a_key', 'this is the value for this set'})
assert.same(ini.parse('[this_is_a_section_test]'), {'this_... | describe('Test the parser', function()
local ini = require 'ini'
it('basic test', function()
assert.same({'a_key', 'this is the value for this set'}, ini.parse('a_key = this is the value for this set'))
assert.same({'this_is_a_section_test'}, ini.parse('[this_is_a_section_test]'))
asser... | Fix inverted expected and passed parameter | Fix inverted expected and passed parameter
| Lua | mit | lzubiaur/ini.lua |
60b99a893546296ac0012b74eafed5288eb2592d | .config/awesome/widgets/rounded_bar.lua | .config/awesome/widgets/rounded_bar.lua | local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
return function(active_color, background_color, icon)
local bar = wibox.widget{
max_value = 1,
value = .5,
forced_height = dpi(10),
margins = {
top = dp... | local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local user = require('user')
return function(active_color, background_color, icon)
local bar = wibox.widget{
max_value = 1,
value = .5,
forced_height = dpi(10),
margins ... | Allow width to be configured by user variables | Allow width to be configured by user variables
| Lua | mit | sarumont/dotfiles,sarumont/dotfiles,sarumont/dotfiles |
ed537c0c42ba2ab323e0faaee866c501fa506ddb | .hammerspoon/init.lua | .hammerspoon/init.lua | require 'modules.loader'
-- watches Lua files
-- provides short-cuts to reload Hammerspoon config
loader = ModuleLoader()
loader.addWatcher('init.lua')
-- for all notifications and messaging needs
messenger = loader.loadModule('modules', 'messenger')
-- prevent Mac from sleeping,
-- it should also create Moon-like m... | require 'modules.loader'
-- watches Lua files
-- provides short-cuts to reload Hammerspoon config
loader = ModuleLoader()
loader.addWatcher('init.lua')
-- for all notifications and messaging needs
messenger = loader.loadModule('modules', 'messenger')
-- prevent Mac from sleeping,
-- it should also create Moon-like m... | Add comment for hammerspoon ctrl+alt+cmd+R reload functionality | Add comment for hammerspoon ctrl+alt+cmd+R reload functionality
| Lua | apache-2.0 | antontsv/apple.bin,antontsv/apple.bin |
6169e5f0b95f01a05659809128483f2a1ffe4044 | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.9"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 456
t.screen.height = 264
t.consolne = false
t.modules.physics = false... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.10"
t.author = "Kyle Conroy"
t.version = "0.8.0"
t.identity = "hawkthorne"
t.screen.width = 456
t.screen.height = 264
t.consolne = false
t.modules.physics = fals... | Bump release version to v0.0.10 | Bump release version to v0.0.10
| Lua | mit | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua |
8c0f22e5042bcfdad8a6a3cbadd97f70717c94e3 | lua/autorun/menubar/mp_options.lua | lua/autorun/menubar/mp_options.lua | hook.Add( "PopulateMenuBar", "MediaPlayerOptions_MenuBar", function( menubar )
local m = menubar:AddOrGetMenu( "Media Player" )
m:AddCVar( "Fullscreen", "mediaplayer_fullscreen", "1", "0" )
end )
| hook.Add( "PopulateMenuBar", "MediaPlayerOptions_MenuBar", function( menubar )
local m = menubar:AddOrGetMenu( "Media Player" )
m:AddCVar( "Fullscreen", "mediaplayer_fullscreen", "1", "0" )
m:AddSpacer()
m:AddOption( "Turn Off All", function()
for _, mp in ipairs(MediaPlayer.GetAll()) do
MediaPlayer.Reques... | Add 'Turn Off All' menubar action for Sandbox-based gamemodes | Add 'Turn Off All' menubar action for Sandbox-based gamemodes
| Lua | mit | pixeltailgames/gm-mediaplayer,pixeltailgames/gm-mediaplayer |
9828617a84d734e7570bdefee50406ea32b4ac9e | Modules/Shared/Players/GroupUtils.lua | Modules/Shared/Players/GroupUtils.lua | ---
-- @module GroupUtils
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local Promise = require("Promise")
local GroupUtils = {}
function GroupUtils.promiseRankInGroup(player, groupId)
assert(typeof(player) == "Instance" and player:IsA("Player"))
assert(... | ---
-- @module GroupUtils
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local GroupService = game:GetService("GroupService")
local Promise = require("Promise")
local GroupUtils = {}
function GroupUtils.promiseRankInGroup(player, groupId)
assert(typeof(pl... | Add more to group utils | Add more to group utils
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
d752469a0af3923dc80e5f9faf97683d449a7e62 | modulefiles/python/3.4.1/pax/4.6.1.lua | modulefiles/python/3.4.1/pax/4.6.1.lua | help(
[[
This module loads Python 3.4.1 with a set of packages needed for
the Xenon1T PAX 4.6.1
]])
local version = "3.4.1"
local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/virtualenv-3.4/pax-4.6.1"
pushenv("VIRTUAL_ENV", base)
prepend_path("PATH", pathJoin(base, "bin"))
load('atlas/3.10.1', 'lapack', 'hd... | help(
[[
This module loads Python 3.4.1 with a set of packages needed for
the Xenon1T PAX 4.6.1
]])
local version = "3.4.1"
local base = "/cvmfs/oasis.opensciencegrid.org/osg/modules/virtualenv-3.4/pax-4.6.1"
pushenv("VIRTUAL_ENV", base)
prepend_path("PATH", pathJoin(base, "bin"))
load('atlas/3.10.1', 'lapack', 'hd... | Load the right version of ROOT | Load the right version of ROOT
| Lua | apache-2.0 | OSGConnect/modulefiles,OSGConnect/modulefiles,OSGConnect/modulefiles |
2dbd5573c7f7f382d09f751095bbfdece244c979 | src/Editor/Editor.Client/Editor.Client.lua | src/Editor/Editor.Client/Editor.Client.lua | EditorClient = {}
EditorClient.name = "Editor.Client"
project "Editor.Client"
kind "SharedLib"
language "C#"
location "."
SetupAddinResources()
files
{
"Editor.Client.lua",
"**.cs",
}
links
{
"System",
"System.Drawing",
"EngineManaged",
"EngineBindings",
"Editor.Shared",
"Editor.Server... | EditorClient = {}
EditorClient.name = "Editor.Client"
project "Editor.Client"
kind "SharedLib"
language "C#"
location "."
flags { "Unsafe" }
SetupAddinResources()
files
{
"Editor.Client.lua",
"**.cs",
}
links
{
"System",
"System.Drawing",
"EngineManaged",
"EngineBindings",
"Editor.Share... | Enable the usage of unsafe code in the editor client. | Enable the usage of unsafe code in the editor client.
| Lua | bsd-2-clause | FloodProject/flood,FloodProject/flood,FloodProject/flood |
483bf7ad7eac5c6f56dba365ebc8ac0bd4caf8fc | .hammerspoon/init.lua | .hammerspoon/init.lua | require 'modules.loader'
-- watches Lua files
-- provides short-cuts to reload Hammerspoon config
loader = ModuleLoader('modules')
loader.addWatcher('init.lua')
-- for all notifications and messaging needs
messenger = loader.loadModule('messenger')
-- prevent Mac from sleeping,
-- it should also create Moon-like men... | -- Make sure we are in ~/.hammerspoon since
hs.fs.chdir(os.getenv('HOME') .. '/.hammerspoon/')
require 'modules.loader'
-- watches Lua files
-- provides short-cuts to reload Hammerspoon config
loader = ModuleLoader('modules')
loader.addWatcher('init.lua')
-- for all notifications and messaging needs
messenger = load... | Set workdir in hammespoon to ~/.hammerspoon | Set workdir in hammespoon to ~/.hammerspoon
init.lua can be actually symlinked, making v0.9.80
follow symlinks and thus breaking ability to find certain modules
under ~/.hammerspoon
| Lua | apache-2.0 | antontsv/apple.bin,antontsv/apple.bin |
0f223747c251e2aba4fa7614187ed6e0a727e321 | samples/01.hello-world/lua/game.lua | samples/01.hello-world/lua/game.lua | function init()
-- Set the title of the main window
Window.set_title("Hello world!")
end
function frame(dt)
end
function shutdown()
end | function init()
-- Set the title of the main window
Window.set_title("Hello world!")
end
function frame(dt)
-- Stop the engine when any key is released
if Keyboard.any_released() then
Device.stop()
end
end
function shutdown()
end | Exit the hello world sample when any key is released | Exit the hello world sample when any key is released
| Lua | mit | mikymod/crown,mikymod/crown,galek/crown,taylor001/crown,taylor001/crown,galek/crown,dbartolini/crown,mikymod/crown,galek/crown,galek/crown,dbartolini/crown,taylor001/crown,mikymod/crown,dbartolini/crown,taylor001/crown,dbartolini/crown |
feda69cd476b5af21f340f4c22081baa69eb3a0e | src/api-umbrella/cli/run.lua | src/api-umbrella/cli/run.lua | local path = require "pl.path"
local setup = require "api-umbrella.cli.setup"
local status = require "api-umbrella.cli.status"
local unistd = require "posix.unistd"
local function start_perp(config, options)
local running, _ = status()
if running then
print "api-umbrella is already running"
if options and ... | local path = require "pl.path"
local setup = require "api-umbrella.cli.setup"
local status = require "api-umbrella.cli.status"
local unistd = require "posix.unistd"
local function start_perp(config, options)
local running, _ = status()
if running then
print "api-umbrella is already running"
if options and ... | Add ability to log output to stdout/stderr instead of files. | Add ability to log output to stdout/stderr instead of files.
| Lua | mit | NREL/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,NREL/api-umbrella |
3def45a49c5750d289b3a702077cd80e45948e44 | conf.lua | conf.lua | function love.conf(t)
t.name = "EmuFun"
t.author = "Ben 'ToxicFrog' Kelly"
t.identity = "emufun"
t.version = "0.8.0"
t.screen.width = 800
t.screen.height = 600
t.screen.fullscreen = false
t.screen.vsync = true
t.screen.fsaa = 0
t.modules.graphics = true
t.modules.image = tr... | function love.conf(t)
t.name = "EmuFun"
t.author = "Ben 'ToxicFrog' Kelly"
t.identity = "emufun"
t.version = "0.8.0"
t.console = true -- enable console on windows for debug logging
t.screen.width = 800
t.screen.height = 600
t.screen.fullscreen = false
t.screen.vsync = true
t.sc... | Enable console on windows version | Enable console on windows version
| Lua | mit | ToxicFrog/EmuFun |
6c1d91f66d848ef99a19ba4d53162d5f3b58c0c1 | modules/vim/installed-config/plugin/fzf-lua.lua | modules/vim/installed-config/plugin/fzf-lua.lua | local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
lsp = {
jump_to_single_result = true
}
})
vim.cmd("FzfLua register_ui_select")
| local fzf_lua = require('fzf-lua')
fzf_lua.setup({
fzf_bin = 'sk',
fzf_opts = {
['--layout'] = 'default',
},
files = {
fd_opts = "--color=never --type f --hidden --no-ignore --exclude .git"
},
git = {
files = {
cmd = 'git ls-files --exclude-standard --others --cached'
}
},
lsp = {
... | Fix vim GitFiles to include unstaged files | Fix vim GitFiles to include unstaged files
| Lua | mit | justinhoward/dotfiles,justinhoward/dotfiles |
b26d0d92d5f3ca36eee44d9448e076a04552ea20 | build/config.lua | build/config.lua | -- This file contains special configurations values, such as directories to extern libraries (Qt)
-- Editing this file is not required to use/compile the engine, as default values should be enough
-- Additionnal compilation options
--AdditionalCompilationOptions = "-fsanitize=address" -- Enable ASan
-- Builds Nazara ... | -- This file contains special configurations values, such as directories to extern libraries (Qt)
-- Editing this file is not required to use/compile the engine, as default values should be enough
-- Additionnal compilation options
--AdditionalCompilationOptions = "-fsanitize=address" -- Enable ASan
-- Builds Nazara ... | Disable premake project by default | Build: Disable premake project by default
| Lua | mit | DigitalPulseSoftware/NazaraEngine |
c81b98b33cf26f01fb1963daa974d0922ebdd2f9 | empty-drills_0.0.1/styles/main.lua | empty-drills_0.0.1/styles/main.lua | --- Location view gui
data.raw["gui-style"].default["lv_location_view"] =
{
type = "button_style",
parent = "button_style",
width = 100,
height = 100,
top_padding = 65,
right_padding = 0,
bottom_padding = 0,
left_padding = 0,
font = "font-mb",
default_font_color = {r=0.98, g=0.6... | --- Location view gui
data.raw["gui-style"].default["lv_location_view"] =
{
type = "button_style",
parent = "button_style",
width = 100,
height = 100,
top_padding = 65,
right_padding = 0,
bottom_padding = 0,
left_padding = 0,
font = "font-mb",
default_font_color = {r=0.98, g=0.6... | Fix empty drills bug because of moved resource location | Fix empty drills bug because of moved resource location
| Lua | mit | Zomis/FactorioMods |
ddc8fffed15bf85ba48ac0d0f8dbfc4ec0e91f61 | build/scripts/modules/physics3d.lua | build/scripts/modules/physics3d.lua | MODULE.Name = "Physics3D"
MODULE.Defines = {
"_NEWTON_STATIC_LIB"
}
MODULE.OsDefines.Windows = {
"_WINDOWS"
}
MODULE.Libraries = {
"NazaraCore",
"newton" -- Newton Game Dynamics
}
MODULE.Custom = function()
vectorextensions("SSE3")
filter({"architecture:x86_64", "system:linux"})
defines("_POSIX_VER_64")
... | MODULE.Name = "Physics3D"
MODULE.Defines = {
"_NEWTON_STATIC_LIB"
}
MODULE.OsDefines.Windows = {
"_WINDOWS"
}
MODULE.Libraries = {
"NazaraCore",
"newton" -- Newton Game Dynamics
}
MODULE.Custom = function()
vectorextensions("SSE3")
filter({"architecture:x86_64", "system:linux"})
defines("_POSIX_VER_64")
... | Add the required defines for Newton in Physics3D | Add the required defines for Newton in Physics3D | Lua | mit | DigitalPulseSoftware/NazaraEngine |
49e4b108671099c2af217793e4bb89190ee32b40 | includes/common.lua | includes/common.lua | function page_set_title(title)
ophal.title = (title and title .. [[ | ]] or [[]]) .. settings.site_name
end | function page_set_title(header_title, title)
if title == nil then title = header_title end
ophal.title = title
ophal.header_title = (header_title and header_title .. [[ | ]] or [[]]) .. settings.site_name
end | Add support for Header title and Body title to function page_set_title(). | Add support for Header title and Body title to function page_set_title().
| Lua | agpl-3.0 | coinzen/coinage,ophal/core,ophal/core,coinzen/coinage,ophal/core,coinzen/coinage |
24f41a3aa4ed9c2d057bb4c4cfc6e7f85252e72c | home/.config/nvim/lua/plugin-config/treesitter.lua | home/.config/nvim/lua/plugin-config/treesitter.lua | require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained",
highlight = {
enable = true
},
playground = {
enable = true,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false -- Whether the query persi... | require'nvim-treesitter.configs'.setup {
ensure_installed = {
"javascript", "typescript", "jsdoc", "tsx",
"regex", "bash", "json",
"html", "glimmer", "lua"
},
highlight = {
enable = true
},
playground = {
enable = true,
disable = {},
updatetime = 25, -- Debounced time for highlight... | Use explicit languages to speed up update/install time | Use explicit languages to speed up update/install time
| Lua | mit | NullVoxPopuli/dotfiles,NullVoxPopuli/dotfiles,NullVoxPopuli/dotfiles |
4f8eff96292144ed7a17582d5d327433d405dcbb | EXAMPLE.lua | EXAMPLE.lua | local monitorSide = "left"
if peripheral.isPresent(monitorSide) and peripheral.getType(monitorSide) == "monitor" then
term.redirect(peripheral.wrap(monitorSide))
else
print("No monitor found")
return
end
function explode(inSplitPattern, str)
local outResults = { }
local theStart = 1
local theS... | Add example CC lua file for profiling on a monitor. | Add example CC lua file for profiling on a monitor.
Signed-off-by: Ross Allan <ca2c77e14df1e7ee673215c1ef658354e220f471@gmail.com>
| Lua | mit | nallar/TickProfiler | |
e080fde00efb1ede7f29bf1570ae72eecc7f83d6 | neovim/.config/nvim/lua/toggleterm-setup.lua | neovim/.config/nvim/lua/toggleterm-setup.lua | require"toggleterm".setup{
size = 20,
open_mapping = [[<c-s>]],
shade_terminals = false,
start_in_insert = true,
persist_size = true,
direction = 'horizontal',
}
| require"toggleterm".setup{
open_mapping = [[<c-s>]],
shade_terminals = false,
start_in_insert = true,
persist_size = true,
direction = 'window',
}
| Switch to full screen toggle term | Switch to full screen toggle term
| Lua | mit | bronzehedwick/dotfiles,bronzehedwick/dotfiles,bronzehedwick/dotfiles,bronzehedwick/dotfiles |
d64f17a5110efeee580cb2fd2c106fa3c4578762 | tests/func/print-hook-name.lua | tests/func/print-hook-name.lua | client_socket( function () print('TRACE:client_socket') end )
client_sendmsg( function () print('TRACE:client_sendmsg') end )
client_recvmsg( function () print('TRACE:client_recvmsg') end )
client_recverr( function () print('TRACE:client_recverr') end )
client_close( function () print('TRACE:client_close') end )
serve... | client_socket( function () print('TRACE:client_socket') end )
client_sendmsg( function () print('TRACE:client_sendmsg'); return 0 end )
client_recvmsg( function () print('TRACE:client_recvmsg'); return 0 end )
client_recverr( function () print('TRACE:client_recverr'); return 0 end )
client_close( function () print('TRA... | Return a value from packet hooks to silence errors | tests: Return a value from packet hooks to silence errors
| Lua | apache-2.0 | jsitnicki/rushit,jsitnicki/rushit |
094e86423e192c39921f8941bcf379dbcbc3e3bd | detectem/script.lua | detectem/script.lua | function main(splash)
splash.images_enabled = false
splash.response_body_enabled = true
local url = splash.args.url
assert(splash:go(url))
assert(splash:wait(5))
local detectFunction = [[
detect = function(){
var rs = [];
softwareData.forEach(function(s) {
var matchers = s.matcher... | function main(splash)
splash.images_enabled = false
splash.response_body_enabled = true
local url = splash.args.url
assert(splash:go(url))
assert(splash:wait(5))
local detectFunction = [[
detect = function(){
var rs = [];
softwareData.forEach(function(s) {
var matchers = s.matcher... | Handle errors when running JavaScript on the sites | Handle errors when running JavaScript on the sites
If the Content Security Policy directive is enabled in the site, then
the JavaScript detection function cannot be evaluated, and Splash will
fail with a Lua script error.
But even if the JavaScript matchers cannot be used, the HAR can still be
processed, so let Splas... | Lua | mit | spectresearch/detectem |
8630a263b6c5f86d57eb0f3a49ddce163c8378c1 | spec/fs_spec.lua | spec/fs_spec.lua | local test_env = require("test/test_environment")
test_env.unload_luarocks()
local fs = require("luarocks.fs")
local is_win = test_env.TEST_TARGET_OS == "windows"
describe("Luarocks fs test #whitebox #w_fs", function()
describe("fs.Q", function()
it("simple argument", function()
assert.are.same(is_w... | Add a few tests for fs.Q | Add a few tests for fs.Q
| Lua | mit | keplerproject/luarocks,tarantool/luarocks,tarantool/luarocks,xpol/luavm,xpol/luainstaller,robooo/luarocks,luarocks/luarocks,robooo/luarocks,luarocks/luarocks,keplerproject/luarocks,xpol/luainstaller,xpol/luarocks,xpol/luavm,luarocks/luarocks,xpol/luainstaller,xpol/luarocks,xpol/luarocks,xpol/luainstaller,robooo/luarock... | |
efae3dec4780df224f004a817386dfa2cdf870e2 | test/fib.lua | test/fib.lua | --
-- fib.lua
-- test script for mruby-lua.
--
function fib(k)
if k == 0 then
return 0
elseif k == 1 then
return 1
end
return fib(k - 2) + fib(k - 1)
end
for i=1, 10, 1 do
print(fib(i))
end
| Add Lua script for test. | Add Lua script for test.
| Lua | mit | dyama/mruby-lua,dyama/mruby-lua | |
44844f46716da4585a1d2360f3b5afd65114fd22 | util/jid.lua | util/jid.lua |
local match = string.match;
local tostring = tostring;
local print = print
module "jid"
function split(jid)
if not jid then return; end
-- TODO verify JID, and return; if invalid
local node, nodelen = match(jid, "^([^@]+)@()");
local host, hostlen = match(jid, "^([^@/]+)()", nodelen)
if node and not host then re... |
local match = string.match;
module "jid"
function split(jid)
if not jid then return; end
-- TODO verify JID, and return; if invalid
local node, nodelen = match(jid, "^([^@]+)@()");
local host, hostlen = match(jid, "^([^@/]+)()", nodelen)
if node and not host then return nil, nil, nil; end
local resource = matc... | Remove some declarations I added while debugging | Remove some declarations I added while debugging
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
6a9c3b871c9aaa8c13e8069e99efeb27b890f5d5 | extensions/pathwatcher/init.lua | extensions/pathwatcher/init.lua | --- === hs.pathwatcher ===
---
--- Watch paths recursively for changes
---
--- This simple example watches your Hammerspoon directory for changes, and when it sees a change, reloads your configs:
---
--- hs.pathwatcher.new(os.getenv("HOME") .. "/.Hammerspoon/", hs.reload):start()
---
--- This module is based primar... | --- === hs.pathwatcher ===
---
--- Watch paths recursively for changes
---
--- This simple example watches your Hammerspoon directory for changes, and when it sees a change, reloads your configs:
---
--- hs.pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon/", hs.reload):start()
---
--- This module is based primar... | Fix a tiny typo in hs.pathwatcher docs | Fix a tiny typo in hs.pathwatcher docs
| Lua | mit | junkblocker/hammerspoon,peterhajas/hammerspoon,Habbie/hammerspoon,joehanchoi/hammerspoon,chrisjbray/hammerspoon,wsmith323/hammerspoon,Hammerspoon/hammerspoon,chrisjbray/hammerspoon,trishume/hammerspoon,hypebeast/hammerspoon,cmsj/hammerspoon,ocurr/hammerspoon,zzamboni/hammerspoon,heptal/hammerspoon,TimVonsee/hammerspoon... |
8bca6712f72cea6452d5ce737fbcc60823fefed4 | modulefiles/Core/circos/0.68.lua | modulefiles/Core/circos/0.68.lua | help(
[[
This module loads Circos 0.68
Circos is a software package for visualizing data and information. It visualizes
data in a circular layout — this makes Circos ideal for exploring relationships
between objects or positions. There are other reasons why a circular layout is
advantageous, not the least being the fa... | help(
[[
This module loads Circos 0.68
Circos is a software package for visualizing data and information. It visualizes
data in a circular layout — this makes Circos ideal for exploring relationships
between objects or positions. There are other reasons why a circular layout is
advantageous, not the least being the fa... | Fix lab and add requires | Fix lab and add requires
| Lua | apache-2.0 | OSGConnect/modulefiles,OSGConnect/modulefiles,OSGConnect/modulefiles |
26620e179dad8b12ac2ccef018706803b7c713c7 | doc/examples/update-desc.rbxmk.lua | doc/examples/update-desc.rbxmk.lua | -- Update stored copy of descriptors. Include dump.desc-patch.json.
--
-- Usage:
-- rbxmk run --desc-latest update-desc.rbxmk.lua OUTPUT
assert(rbxmk.globalDesc, "must run with --desc-latest option")
local patch = fs.read(path.expand("$sd/dump-patch/dump.desc-patch.json"))
rbxmk.globalDesc:Patch(patch)
local outp... | Add example to update descriptor file. | Add example to update descriptor file.
| Lua | mit | Anaminus/rbxmk,Anaminus/rbxmk | |
be1b873c5533eb0da14f095a11bba25d3567a388 | tests/testREPL.lua | tests/testREPL.lua | require 'dok'
require 'dokx'
local tester = torch.Tester()
local myTests = {}
function assertHaveDoc(name, symbol)
local doc = dok.help(symbol, true)
tester:assertne(nil, doc, "REPL couldn't get doc for " .. name)
end
function myTests:testREPL()
assertHaveDoc('dokx', dokx)
for name, func in pairs(do... | require 'dok'
require 'dokx'
--[[
This test checks whether it's possible to access the docs for torch-dokx from the torch REPL (using the torch 'dok' system).
This relies on the Markdown docs having been installed in the correct place in the torch rocks tree - for example `~/usr/local/share/lua/5.1/dokx/doc`.
These... | Adjust REPL doc test. Passes except for package level help | Adjust REPL doc test. Passes except for package level help | Lua | bsd-3-clause | deepmind/torch-dokx,Gueust/torch-dokx,yozw/torch-dokx,deepmind/torch-dokx,deepmind/torch-dokx,Gueust/torch-dokx,yozw/torch-dokx,yozw/torch-dokx,Gueust/torch-dokx |
30f0125622226423bafb6d47efac85e8a446c28b | upstream_config.lua | upstream_config.lua | local router = require "resty.router"
local r = router:new("resty.router.redis_dns")
local method = ngx.req.get_method()
if method == ngx.HTTP_GET then
local ok, err = r:set_route(ngx.var.arg_location,ngx.var.arg_upstream,ngx.var.arg_ttl)
end
if method == ngx.HTTP_DELETE then
local ok, err = r:unset_route(ngx.var.... | local router = require "resty.router"
local r = router:new("resty.router.redis_dns")
local method = ngx.req.get_method()
local ok = nil
local err = nil
if method == ngx.HTTP_GET then
ok, err = r:set_route(ngx.var.arg_location,ngx.var.arg_upstream,ngx.var.arg_ttl)
end
if method == ngx.HTTP_DELETE then
ok, err = r:u... | Fix issue that make configure api return 404 | Fix issue that make configure api return 404
The ok and err variable are out of scope when we check for the error, fixed now | Lua | apache-2.0 | dhiaayachi/dynx,dhiaayachi/dynx |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.