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 |
|---|---|---|---|---|---|---|---|---|---|
7fb0971fb69956bcc70b0575b7162f8fa3a7d187 | docker/heka/plugins/decoders/os_mysql_log.lua | docker/heka/plugins/decoders/os_mysql_log.lua | -- Copyright 2015-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 agree... | Add Heka log decoder for MariaDB | Add Heka log decoder for MariaDB
In the future the Heka Lua sandboxes will be moved out of Kolla, and
installed in the Heka container using a deb or rpm package.
Partially implements: blueprint heka
Change-Id: Iad1e5177d239410a88546fc4ed8c23b9e46beef3
| Lua | apache-2.0 | tonyli71/kolla,stackforge/kolla,GalenMa/kolla,mandre/kolla,dardelean/kolla-ansible,intel-onp/kolla,openstack/kolla,dardelean/kolla-ansible,negronjl/kolla,toby82/kolla,negronjl/kolla,coolsvap/kolla,tonyli71/kolla,rahulunair/kolla,GalenMa/kolla,negronjl/kolla,nihilifer/kolla,mandre/kolla,mrangana/kolla,mandre/kolla,stack... | |
535536d1c1c7d02fff3fb36b34b7825b277674b4 | src/CppParser/premake4.lua | src/CppParser/premake4.lua | clang_msvc_flags =
{
"/wd4146", "/wd4244", "/wd4800", "/wd4345",
"/wd4355", "/wd4996", "/wd4624", "/wd4291",
"/wd4251"
}
if not (string.starts(action, "vs") and not os.is_windows()) then
project "CppSharp.CppParser"
kind "SharedLib"
language "C++"
SetupNativeProject()
flags { common_flags }
flags {... | clang_msvc_flags =
{
"/wd4146", "/wd4244", "/wd4800", "/wd4345",
"/wd4355", "/wd4996", "/wd4624", "/wd4291",
"/wd4251"
}
if not (string.starts(action, "vs") and not os.is_windows()) then
project "CppSharp.CppParser"
kind "SharedLib"
language "C++"
SetupNativeProject()
flags { common_flags }
flags {... | Use the absolute target directory when copying Clang headers. | Use the absolute target directory when copying Clang headers.
| Lua | mit | zillemarco/CppSharp,ddobrev/CppSharp,ddobrev/CppSharp,mohtamohit/CppSharp,inordertotest/CppSharp,ktopouzi/CppSharp,mohtamohit/CppSharp,genuinelucifer/CppSharp,xistoso/CppSharp,xistoso/CppSharp,genuinelucifer/CppSharp,mono/CppSharp,mohtamohit/CppSharp,mydogisbox/CppSharp,mydogisbox/CppSharp,genuinelucifer/CppSharp,mono/... |
53611726e5b6cbe2f94c4293e45db0c1c8906ff4 | overlay/sdk/android/rules.lua | overlay/sdk/android/rules.lua | package { 'make', 'host',
source = 'make-3.81.tar.bz2'
}
package { 'android', 'target',
{ 'build',
{ 'make', 'build', 'host' }
}
}
| package { 'make', 'host',
source = 'make-3.81.tar.bz2'
}
package { 'android',
{ 'build',
{ 'make', 'build', 'host' }
}
}
| Change back android pkg build to use generic config | Change back android pkg build to use generic config
| Lua | mit | bazurbat/jagen |
1265ce8abda09eda34767e7c6456191dc6e2c61a | tests/test_QuadtasticLogic.lua | tests/test_QuadtasticLogic.lua | local QuadtasticLogic = require("Quadtastic.QuadtasticLogic")
local Selection = require("Quadtastic.Selection")
local app_stub = function(data)
return {
quadtastic = setmetatable({},{
__index = function(_, key)
local f = QuadtasticLogic.key
return function(...)
f(data, ...)
... | Add test for quadtastic logic | Add test for quadtastic logic
| Lua | mit | 25A0/Quadtastic,25A0/Quadtastic | |
6a069c2a1c99ca34f53af747a969d5f5c4044e84 | src/promise/src/Shared/Utility/promiseChild.lua | src/promise/src/Shared/Utility/promiseChild.lua | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
retur... | --- Warps the WaitForChild API with a promise
-- @module promiseChild
local require = require(script.Parent.loader).load(script)
local Promise = require("Promise")
--- Wraps the :WaitForChild API with a promise
return function(parent, name, timeOut)
local result = parent:FindFirstChild(name)
if result then
retur... | Use Promies.spawn() since task.spawn() is probably cheaper now | fix: Use Promies.spawn() since task.spawn() is probably cheaper now
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
e21d251d61be09fa0038f941d99d7dd704887df1 | nodemcu/socketmodule.lua | nodemcu/socketmodule.lua | local config = require 'config'
local module = {}
module.initSocket = function ()
-- Create socket connection
local ws = websocket.createClient()
ws:on('connection', function(ws)
print('[WebSocket] Connected!')
ok, json = pcall(cjson.encode, {
device = 'nodemcu',
action = 'JOIN_GAME',
... | local config = require 'config'
local module = {}
module.initSocket = function ()
-- Create socket connection
local ws = websocket.createClient()
ws:on('connection', function(ws)
print('[WebSocket] Connected!')
ok, json = pcall(cjson.encode, {
device = 'nodemcu',
action = 'JOIN_GAME',
... | Connect to new socket endpoint | Connect to new socket endpoint
| Lua | mit | rijkvanzanten/luaus |
151f3010306ac588a8ebc9979bf810923ef30064 | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.13"
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... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.14"
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.14 | Bump release version to v0.0.14
| Lua | mit | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua |
3eced61849c7970e477914b4262c86dc1a0f90f0 | neovim/.config/nvim/ftplugin/markdown.lua | neovim/.config/nvim/ftplugin/markdown.lua | local map = require'utilities'.map
-- Enable spell checking.
vim.cmd('setlocal spell')
-- Support code fencing syntax highlighting for the listed languages.
vim.g.markdown_fenced_languages = {
'bash=sh',
'javascript',
'js=javascript',
'json=javascript',
'typescript',
'ts=typescript',
'php',
'html',
... | local map = require'utilities'.map
-- Enable spell checking.
vim.cmd('setlocal spell')
-- Default to 4 space indent, as that's the amount that triggers preformatted
-- text in markdown.
vim.opt.shiftwidth = 4
-- Support code fencing syntax highlighting for the listed languages.
vim.g.markdown_fenced_languages = {
... | Change sw to 4 in md files | Change sw to 4 in md files
Also add lua to fenced language support.
| Lua | mit | bronzehedwick/dotfiles,bronzehedwick/dotfiles,bronzehedwick/dotfiles,bronzehedwick/dotfiles |
9e02f4a7d426217585516f69e7146defcabfe5f2 | prototype/luamake/tools.lua | prototype/luamake/tools.lua | function translate(src, dst, name)
return function(recipe) moss_translate(src, dst, "anonymous", recipe); end
end
function compile(src)
return function(recipe) moss_compile(src, "anonymous", recipe); end
end
function form(artifact)
return function(recipe) moss_form(artifact, "anonymous", recipe); end
end
... | function translate(src, dst)
if(dst == nil) then
return function(recipe) moss_compile(src, ".obj", "anonymous", recipe); end
else
return function(recipe) moss_translate(src, dst, "anonymous", recipe); end
end
end
function form(artifact)
return function(recipe) moss_form(artifact, "anony... | Implement compile as special case of translate tool | Implement compile as special case of translate tool
| Lua | mit | sjanhunen/yeast |
f3dc7e6fa7b7d01bff440c521006bcfa5c73982e | solutions/uri/1009/1009.lua | solutions/uri/1009/1009.lua | local _ = io.read()
local b = tonumber(io.read("*n"))
local c = tonumber(io.read("*n"))
print(string.format('TOTAL = R$ %.2f', b + (c * 0.15)))
| Solve Salary with Bonus in lua | Solve Salary with Bonus in lua
| Lua | mit | deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr... | |
3b32d9c1ae4aefc2c8b0ca86085efbc7045f53b5 | examples/monitor_dnt.lua | examples/monitor_dnt.lua | -- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
--[[
Monitor DNT header status
*Example Heka Configuration*
.. code-block:: ini
[DNT Usage]
type = "Sandbo... | Add an example monitor: DNT Status | Add an example monitor: DNT Status
Checks the status of the Do Not Track HTTP Header.
| Lua | mpl-2.0 | acmiyaguchi/data-pipeline,acmiyaguchi/data-pipeline,kparlante/data-pipeline,mozilla-services/data-pipeline,whd/data-pipeline,kparlante/data-pipeline,acmiyaguchi/data-pipeline,kparlante/data-pipeline,sapohl/data-pipeline,kparlante/data-pipeline,whd/data-pipeline,nathwill/data-pipeline,mozilla-services/data-pipeline,mozi... | |
ccda547cc39188900d8ecb480e26f82a5d210c29 | control.lua | control.lua | require "defines"
-- Derived from util.formattime
function ftime(ticks)
local seconds = ticks / 60
local min = math.floor(seconds / 60)
local sec = math.floor(seconds - 60 * min)
return string.format("%d_%02d", min, sec)
end
script.on_event(defines.events.on_tick, function(event)
if (game.tick % 1800 == 0 a... | require "defines"
-- Derived from util.formattime
function ftime(ticks)
local seconds = ticks / 60
local min = math.floor(seconds / 60)
local sec = math.floor(seconds - 60 * min)
return string.format("%d_%02d", min, sec)
end
function init_timelapse()
global.timelapse = {
resolution = {2500, 2500},
z... | Move data into global scope | Move data into global scope
| Lua | mit | david-wm-sanders/factorio-timelapse |
6e756c52d80b306dc5c877cdba3b95103bc96396 | layout-a4ciltli.lua | layout-a4ciltli.lua | local book = SILE.require("classes/book");
book:loadPackage("masters")
book:defineMaster({ id = "right", firstContentFrame = "content", frames = {
content = { left = "32mm", right = "100%pw-32mm", top = "36mm", bottom = "top(footnotes)" },
runningHead = { left = "left(content)", right = "right(content)", top = "top... | local class = SILE.documentState.documentClass
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
left = "38mm",
right = "100%pw-26mm",
top = "bottom(runningHead)+4mm",
bottom = "top(footnotes)-4mm"
},
runningHead = {
... | Bring bound A4 layout up to speed with frames | Bring bound A4 layout up to speed with frames
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
7737b2f44f4357c52d59382afbc04caec9773ded | Modules/Binder/BinderTouchingCalculator.lua | Modules/Binder/BinderTouchingCalculator.lua | --- Extends PartTouchingCalculator with generic binder stuff
-- @classmod BinderTouchingCalculator
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local PartTouchingCalculator = require("PartTouchingCalculator")
local BinderUtil = require("BinderUtil")
local ... | Add touching parts calculator for binders | Add touching parts calculator for binders
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine | |
fd9960c605d98f216c8699778b5cf5f6e2d55b27 | @Resources/Visualizer.lua | @Resources/Visualizer.lua | -- ## Information ##############################################################
-- Filename: Visualizer.lua
-- Project: PlayMusic
-- Author: Brett Stevenson
-- License: GNU AGPLv3.0
-- Updated: Jan 19, 2017
-- ##########################################################################
-- ## Description ###############... | Add script to create customized visualizers | :bar_chart: Add script to create customized visualizers
| Lua | agpl-3.0 | JonSn0w/PlayMusic | |
d77cd6a5d17f94c39fc8200b9e923453c02ab941 | spec/invalid_property_spec.lua | spec/invalid_property_spec.lua | local Parser = require "argparse"
describe("invalid property detection", function()
it("detects properties with invalid type", function()
assert.has_error(function()
Parser():name(12345)
end, "bad property 'name' (string expected, got number)")
assert.has_error(function()
Parser... | Add tests for property validation | Add tests for property validation
| Lua | mit | mpeterv/argparse | |
0f62817e56a2db5fd14c83be2cdf95a73050ff22 | documentation/manual/tutorials/calcs/dmqmc/heisenberg_reweight.lua | documentation/manual/tutorials/calcs/dmqmc/heisenberg_reweight.lua | sys = heisenberg {
lattice = { {6, 0}, {0, 6} },
ms = 0,
J = -1,
}
qmc_table = {
tau = 0.001,
init_pop = 5e6,
mc_cycles = 10,
nreports = 500,
target_population = 5e6,
shift_damping = 0.1,
initial_shift = -1.0,
state_size = -400,
spawned_state_size = -400,
}
qmc_state, w... | Add input file for heisenberg calculation. | Add input file for heisenberg calculation.
| Lua | lgpl-2.1 | hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande | |
e329ce01f3bb9bbb7bd9445900b9ac36041610d8 | Modules/qGUI/Compass/CardinalElement.lua | Modules/qGUI/Compass/CardinalElement.lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local NevermoreEngine = require(ReplicatedStorage:WaitForChild("NevermoreEngine"))
local LoadCustomLibrary = NevermoreEngine.LoadLibrary
local ICompassElement = LoadCustomLibrary("ICompassElement")
-- A cardinal direction for a compass
-- @author Que... | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local NevermoreEngine = require(ReplicatedStorage:WaitForChild("NevermoreEngine"))
local LoadCustomLibrary = NevermoreEngine.LoadLibrary
local ICompassElement = LoadCustomLibrary("ICompassElement")
-- A cardinal direction for a compass
-- @author Que... | Fix bug with ICompassElement overriding | Fix bug with ICompassElement overriding
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
b811416e0512ebf6a12e0288bad252956d0c9ac7 | lua/entities/gmod_wire_button/cl_init.lua | lua/entities/gmod_wire_button/cl_init.lua |
include('shared.lua')
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_OPAQUE
local halo_ent, halo_blur
function ENT:Initialize()
self.PosePosition = 0.0
end
function ENT:Draw()
baseclass.Get("gmod_button").UpdateLever(self)
self:DoNormalDraw(true,false)
if Lo... |
include('shared.lua')
ENT.Spawnable = false
ENT.AdminSpawnable = false
ENT.RenderGroup = RENDERGROUP_OPAQUE
local halo_ent, halo_blur
function ENT:Initialize()
self.PosePosition = 0.0
end
function ENT:Think()
baseclass.Get("gmod_button").UpdateLever(self)
end
function ENT:Draw()
self:DoN... | Call UpdateLever() in the right way. Fixes a bug where the lever would move faster if you were hovering over it. | gmod_wire_button: Call UpdateLever() in the right way. Fixes a bug where the lever would move faster if you were hovering over it.
| Lua | apache-2.0 | mms92/wire,plinkopenguin/wiremod,rafradek/wire,sammyt291/wire,dvdvideo1234/wire,immibis/wiremod,CaptainPRICE/wire,thegrb93/wire,notcake/wire,garrysmodlua/wire,Python1320/wire,Grocel/wire,mitterdoo/wire,NezzKryptic/Wire,bigdogmat/wire,wiremod/wire |
132fae6bce89ebd49496270304c06d5de3ad2189 | src/genes/expand.lua | src/genes/expand.lua | #! /usr/bin/env luajit
if #arg < 2 then
print (arg [0] .. "<threshold> <input-file> <output-file>")
end
local threshold = tonumber (arg [1])
local input = arg [2]
local output = arg [3]
local size = 0
for line in io.lines (input) do
local first = line:sub (1, 1)
if first == ">" then
size = size + 1
... | Add script to create dictionaries from sequences. | Add script to create dictionaries from sequences.
| Lua | mit | saucisson/dd-words,saucisson/dd-words | |
73bcf230d7a6c777bb0aa0571ef28e9be9987fc8 | hammerspoon/airpods.lua | hammerspoon/airpods.lua | --------------------------------------------------------------------------------
-- Display AirPods battery charge in the macOS menubar.
--------------------------------------------------------------------------------
-- TODO Detect when airpods connect/disconnect so that we can immediately refresh the menubar
functi... | --------------------------------------------------------------------------------
-- Display AirPods battery charge in the macOS menubar.
--------------------------------------------------------------------------------
-- TODO Detect when airpods connect/disconnect so that we can immediately refresh the menubar
functi... | Refresh AirPods battery menubar every 15 seconds | Refresh AirPods battery menubar every 15 seconds
| Lua | mit | jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles |
696a3905ceb134ea3321bbe78feaec1bf0fa3a00 | test/tests/regex.lua | test/tests/regex.lua | local assertEq = test.assertEq
local function log(x) test.log(tostring(x) .. "\n") end
local vi_regex = require('vi_regex')
local compile = vi_regex.compile
local pat = compile('fo+[ab]ar')
assertEq(pat:match("foobar"), {_start=1,_end=6})
assertEq(pat:match("foooobar"), {_start=1,_end=8})
assertEq(pat:match("foblahfo... | local assertEq = test.assertEq
local function log(x) test.log(tostring(x) .. "\n") end
local vi_regex = require('vi_regex')
local compile = vi_regex.compile
local pat = compile('fo+[ab]ar')
assertEq(pat:match("foobar"), {_start=1,_end=6})
assertEq(pat:match("foooobar"), {_start=1,_end=8})
assertEq(pat:match("foblahfo... | Test anchoring at the start. | Test anchoring at the start.
| Lua | mit | jugglerchris/textadept-vi,erig0/textadept-vi,jugglerchris/textadept-vi |
1c388f37e3c20abea7de3ecc51a905608cb99978 | Modules/Client/Haptics/HapticFeedbackUtils.lua | Modules/Client/Haptics/HapticFeedbackUtils.lua | ---
-- @module HapticFeedbackUtils
-- @author Quenty
local HapticService = game:GetService("HapticService")
local HapticFeedbackUtils = {}
function HapticFeedbackUtils.smallVibrate(userInputType, length, amplitude)
length = length or 0.1
amplitude = amplitude or 1
if HapticFeedbackUtils.setSmallVibration(userInp... | --- Clean up utils a bit
-- @module HapticFeedbackUtils
local HapticService = game:GetService("HapticService")
local HapticFeedbackUtils = {}
function HapticFeedbackUtils.smallVibrate(userInputType, length, amplitude)
length = length or 0.1
amplitude = amplitude or 1
if HapticFeedbackUtils.setSmallVibration(user... | Clean up haptic feedback utils | Clean up haptic feedback utils
| Lua | mit | Quenty/NevermoreEngine,Quenty/NevermoreEngine,Quenty/NevermoreEngine |
01107b38c987fc885678e4b6e1c5a9aa6f3d9541 | busted/modules/helper_loader.lua | busted/modules/helper_loader.lua | local utils = require 'busted.utils'
return function()
local loadHelper = function(helper, hpath, options, busted)
local success, err = pcall(function()
if helper:match('%.lua$') or helper:match('%.moon$') then
dofile(utils.normpath(hpath))
else
require(helper)
end
end)
... | local utils = require 'busted.utils'
local hasMoon, moonscript = pcall(require, 'moonscript')
return function()
local loadHelper = function(helper, hpath, options, busted)
local success, err = pcall(function()
if helper:match('%.lua$') then
dofile(utils.normpath(hpath))
elseif hasMoon and hel... | Support loading helper moonscript files | Support loading helper moonscript files
| Lua | mit | o-lim/busted,xyliuke/busted,nehz/busted,istr/busted,sobrinho/busted,ryanplusplus/busted,DorianGray/busted,Olivine-Labs/busted,leafo/busted,mpeterv/busted |
eec999cc638d8a9ce738cd8bb88c43dcfada4580 | tests.lua | tests.lua | debug.breakpoints['tests.lua'] = {5, 10}
i = 10
f = function (a, b)
local c = "test"
for ii = 1,10000,1 do
if ii%1000 == 0 then
print(ii)
end
end
print(i)
end
f({}, nil)
| debug.breakpoints['tests.lua'] = {11}
i = 10
f = function (a, b)
local c = "test"
for ii = 1,10000,1 do
if ii%1000 == 0 then
print(ii)
end
end
print(i)
end
f({}, nil)
| Change the test breakpoint line. | Change the test breakpoint line.
| Lua | mit | laarmen/lua_debug,laarmen/lua_debug |
f8f47b37f9182774f235f6bc00816b3e05bb82b4 | plugins/lua/user_modules/sed.lua | plugins/lua/user_modules/sed.lua | local CircularBuffer = require ("circularbuffer")
sed = sed or {}
sed.messages = CircularBuffer (20)
local persistent = false
local function Handle (name, communityId, message)
local p, a, b = string.match (message, "^([sp])/(.*)/(.*)/$")
if a then
if p == "p" then
persistent = message
end
for i ... | local CircularBuffer = require ("circularbuffer")
sed = sed or {}
sed.messages = CircularBuffer (20)
local persistent = false
local function Handle (name, communityId, message)
local p, a, b = string.match (message, "^([sp])/(.*)/(.*)/$")
if a then
if p == "p" then
persistent = message
if message =... | Enable disabling of persistent replacements | Enable disabling of persistent replacements
| Lua | cc0-1.0 | ModMountain/hash.js,SwadicalRag/hash.js,LennyPenny/hash.js,meepdarknessmeep/hash.js,mcd1992/hash.js |
4916f71ed8228ba1733dc108ac1bef346892d91d | packages/base.lua | packages/base.lua | local class = pl.class()
class.type = "package"
class._name = "base"
class._initialized = false
class.class = nil
function class:_init (_)
self.class = SILE.documentState.documentClass or SILE.scratch.half_initialized_class
if not self.class then
SU.error("Attempted to initialize package before class, should ... | local package = pl.class()
package.type = "package"
package._name = "base"
package._initialized = false
package.class = nil
function package:_init (_)
self.class = SILE.documentState.documentClass or SILE.scratch.half_initialized_class
if not self.class then
SU.error("Attempted to initialize package before cl... | Correct bogus variable naming from 43e682cb | chore(packages): Correct bogus variable naming from 43e682cb
| Lua | mit | alerque/sile,alerque/sile,alerque/sile,alerque/sile |
00e548062a89cc34da37470b3ebde46601abc181 | src/game/StarterPlayer/StarterPlayerScripts/CameraScript.lua | src/game/StarterPlayer/StarterPlayerScripts/CameraScript.lua | -- ClassName: LocalScript
local OFFSET = Vector3.new(-45, 45, 45)
local FIELD_OF_VIEW = 25
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local run = game:GetService("RunService")
camera.FieldOfView = FIELD_OF_VIEW
local function onRenderStep()
local playerPosition = player.Charact... | -- ClassName: LocalScript
local OFFSET = Vector3.new(-45, 45, 45)
local FIELD_OF_VIEW = 25
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local run = game:GetService("RunService")
camera.FieldOfView = FIELD_OF_VIEW
local function lookAt(pos)
local cameraPos = pos + OFFSET
camera.... | Fix camera errors when the player dies | Fix camera errors when the player dies
We didn't check to make sure that the character actually exists before
continuing, so when the player drops into the void and their character is
deleted, we got constant errors from RenderStepped. This fixes that.
| Lua | mit | VoxelDavid/echo-ridge |
79a6ec311ea474f438533123cd1f38de1af64c15 | run_unit_tests.lua | run_unit_tests.lua |
require('test.test_luaunit')
LuaUnit.verbosity = 2
os.exit( LuaUnit.run() )
|
require('test.test_luaunit')
LuaUnit = require('luaunit')
LuaUnit.LuaUnit.verbosity = 2
os.exit( LuaUnit.LuaUnit.run() )
| Make unittest runnable with latest changes. | Make unittest runnable with latest changes.
| Lua | bsd-2-clause | GuntherStruyf/luaunit,GuntherStruyf/luaunit |
2bd58e691cd580ead8a792ad16d01941554b1aee | prototype/luamake/luafile.lua | prototype/luamake/luafile.lua | require("compose")
require("mutation")
local function dumptable(bt, tablename)
local tabledef = {}
local output = {}
local prefix = ""
if tablename then
prefix = "$1."
end
for k, v in pairs(bt) do
if type(k) == "string" then
if type(v) == "table" then
... | require("compose")
require("mutation")
local function dumptable(bt, tablename)
local tabledef = {}
local output = {}
local prefix = ""
if tablename then
prefix = "$1."
end
for k, v in pairs(bt) do
if type(k) == "string" then
if type(v) == "table" then
... | Add TODO on multi-line strings | Add TODO on multi-line strings
| Lua | mit | sjanhunen/yeast |
da2275db33174add986d9542e964270dedff7bac | site/lib/aaa.lua | site/lib/aaa.lua | --[[
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use ... | Add AAA module (primarily made for the ASF) | Add AAA module (primarily made for the ASF)
| Lua | apache-2.0 | rbowen/ponymail,quenda/ponymail,jimjag/ponymail,jimjag/ponymail,rbowen/ponymail,jimjag/ponymail,quenda/ponymail,jimjag/ponymail,Humbedooh/ponymail,quenda/ponymail,Humbedooh/ponymail,rbowen/ponymail,Humbedooh/ponymail | |
00fd9c3c2184c2869c456d1168f7dc3848b6858b | dist/msdos/build.lua | dist/msdos/build.lua | copy {
ins = { "examples/mandel.cow" },
outs = { "$OBJ/dist/msdos/mandel.cow" },
}
cpmify {
ins = { "rt/msdos/cowgol.coh" },
outs = { "$OBJ/dist/msdos/cowgol.coh" },
}
cpmify {
ins = { "rt/common.coh" },
outs = { "$OBJ/dist/msdos/common.coh" },
}
cpmify {
ins = { "dist/msdos/demo.bat" },
outs = { "$OBJ/dist/... | copy {
ins = { "examples/mandel.cow" },
outs = { "$OBJ/dist/msdos/mandel.cow" },
}
cpmify {
ins = { "rt/msdos/cowgol.coh" },
outs = { "$OBJ/dist/msdos/cowgol.coh" },
}
cpmify {
ins = { "rt/common.coh" },
outs = { "$OBJ/dist/msdos/common.coh" },
}
cpmify {
ins = { "dist/msdos/demo.bat" },
outs = { "$OBJ/dist/... | Fix the msdos distribution, now that it uses exes rather than coms. | Fix the msdos distribution, now that it uses exes rather than coms.
| Lua | bsd-2-clause | davidgiven/cowgol,davidgiven/cowgol |
3e161753257ffa0e2ef70e46752271c487ee78b1 | config/nvim/lua/plugins.lua | config/nvim/lua/plugins.lua | return require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use("cormacrelf/dark-notify")
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-vsnip")
use("hrsh7th/nvim-cmp")
use("hrsh7th/vim-vsnip")
use("ishan9299/nvim-solarized-lua")
use("neovim/nvim-lspconfig")
use("nvim-lua/plenary.nvim"... | return require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use("cormacrelf/dark-notify")
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-vsnip")
use("hrsh7th/nvim-cmp")
use("hrsh7th/vim-vsnip")
use("ishan9299/nvim-solarized-lua")
use("neovim/nvim-lspconfig")
use {
"nvim-telescope/t... | Add plenary as an explicit telescope dependency | Add plenary as an explicit telescope dependency
| Lua | mit | sestrella/dotfiles |
0d34fd392e5a5cf980418c7a615e590d1c2b7aa9 | src/game/StarterPlayer/StarterPlayerScripts/CameraScript.lua | src/game/StarterPlayer/StarterPlayerScripts/CameraScript.lua | -- ClassName: LocalScript
local players = game:GetService("Players")
local run = game:GetService("RunService")
local function getTopDownOffset(dist)
return Vector3.new(-dist, dist, dist)
end
local OFFSET = getTopDownOffset(45)
local FIELD_OF_VIEW = 25
local client = players.LocalPlayer
local camera = workspace.Cu... | -- ClassName: LocalScript
local players = game:GetService("Players")
local run = game:GetService("RunService")
local function getTopDownOffset(dist)
return Vector3.new(-dist, dist, dist)
end
local OFFSET = getTopDownOffset(45)
local FIELD_OF_VIEW = 25
local client = players.LocalPlayer
local camera = workspace.Cu... | Set the camera's Focus property | Set the camera's Focus property
| Lua | mit | VoxelDavid/echo-ridge |
5cbb49487c191bc3636dad2ac46f9bf70666a37c | lunitx.lua | lunitx.lua | local atexit = require "atexit"
local lunit = require "lunit"
--for k,v in pairs(debug.getinfo(1,"S")) do print(k,v) end
-- autonameing
-- module("bcrc-test", lunit.testcase, package.seeall)
atexit(function()
local _, emsg = xpcall(function()
lunit.main(arg)
end, debug.traceback)
if emsg then
... | local atexit = require "atexit"
local lunit = require "lunit"
--for k,v in pairs(debug.getinfo(1,"S")) do print(k,v) end
-- autonameing
-- module("bcrc-test", lunit.testcase, package.seeall)
atexit(function()
local _, emsg = xpcall(function()
lunit.main(arg)
end, debug.traceback)
if emsg then
... | Return 1 to OS if any tests fail. | Return 1 to OS if any tests fail.
| Lua | mit | sam-github/lunit,shmul/lunit |
d48464a46ee61a00e50f11015feb3c28fa9316a9 | usr/vendor/genivi/rules.lua | usr/vendor/genivi/rules.lua | define_rule { 'capicxx-dbus-runtime', 'host' }
define_rule { 'audio-manager', 'host' }
define_rule { 'audio-manager-plugins', 'host' }
| define_rule { 'genivi', 'host',
requires = {
'audio-manager',
'audio-manager-plugins',
'capicxx-dbus-runtime',
}
}
| Use requires for generic genivi packages | Use requires for generic genivi packages
| Lua | mit | bazurbat/jagen |
951c72945017355de5d60af9cd41c3aa0ae66dcf | .zbstudio/user.lua | .zbstudio/user.lua | --[[--
Use this file to specify **System** preferences.
Review [examples](+/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg/user-sample.lua) or check [online documentation](http://studio.zerobrane.com/documentation.html) for details.
--]]--
output.fontname = "IBM Plex Mono"
output.fontsize = 18
editor... | --[[--
Use this file to specify **System** preferences.
Review [examples](+/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg/user-sample.lua) or check [online documentation](http://studio.zerobrane.com/documentation.html) for details.
--]]--
output.fontname = "IBM Plex Mono"
output.fontsize = 18
editor... | Remove trailing whitespace on save. | Remove trailing whitespace on save. | Lua | mpl-2.0 | ryanpcmcquen/linuxTweaks |
886548d99ba775b13a890373db577ccb0a22ef30 | 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 unistd = require "posix.unistd"
local function start_perp(config, options)
local perp_base = path.join(config["etc_dir"], "perp")
local args = {
"-0", "api-umbrella (perpboot)",
"-P", "/tmp/perpboot.lock",
"perpboot",
... | local path = require "pl.path"
local setup = require "api-umbrella.cli.setup"
local unistd = require "posix.unistd"
local function start_perp(config, options)
local perp_base = path.join(config["etc_dir"], "perp")
local args = {
"-0", "api-umbrella (perpboot)",
"-P", "/tmp/perpboot.lock",
"perpboot",
... | Fix backgrounding for "api-umbrella start" command. | Fix backgrounding for "api-umbrella start" command.
| Lua | mit | apinf/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,apinf/api-umbrella,NREL/api-umbrella,apinf/api-umbrella,apinf/api-umbrella,apinf/api-umbrella |
68676293a109b558e82cf69b04e8cd714bf1aec2 | triggerfield/zelphiasStream.lua | triggerfield/zelphiasStream.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... | Add special event for new Tanora tempel | Add special event for new Tanora tempel
| Lua | agpl-3.0 | KayMD/Illarion-Content,vilarion/Illarion-Content,Baylamon/Illarion-Content,Illarion-eV/Illarion-Content | |
9102c3633e98b730ada933509ecaf31b0b21e4ad | components/main/kollos/top.lua | components/main/kollos/top.lua | --[[
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies o... | Work on pure Lua IF | Work on pure Lua IF
| Lua | mit | jeffreykegler/kollos,pczarn/kollos,pczarn/kollos,pczarn/kollos,jeffreykegler/kollos,pczarn/kollos,jeffreykegler/kollos,pczarn/kollos,jeffreykegler/kollos,jeffreykegler/kollos | |
c86c1086fc6b0333cc436a10721fc5129da56b22 | source/scenes/sceneList.lua | source/scenes/sceneList.lua | -- TODO: update this to point to the correct scenes
require "source/gameConfig"
local networkingScene = Configuration("Enable Networking") and 'source/scenes/multiPlayer'
return {
{title = "Single Player", scene = 'source/scenes/mapSelect', openAnime = "fade", closeAnime = "fade"},
{title = "Co-... | -- TODO: update this to point to the correct scenes
require "source/gameConfig"
local networkingScene = Configuration("Enable Networking") and 'source/scenes/multiPlayer'
return {
{title = "Single Player", scene = 'source/scenes/mapSelect', openAnime = "fade", closeAnime = "fade"},
{title = "Co-... | Revert "Added verses scene back" | Revert "Added verses scene back"
This reverts commit 0592aeac155f27e62d864770669593ee6ce6e0a3.
This can be enabled via `source/GameConfig`.
| Lua | mit | BryceMehring/Hexel |
849afd9b1e296855deba300d15ff30c132a588e6 | lib/pkg/android-ndk-r16b.lua | lib/pkg/android-ndk-r16b.lua | return {
source = {
type = 'dist',
location = 'https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip',
sha1sum = '42aa43aae89a50d1c66c3f9fdecd676936da6128',
dir = 'android-ndk-r16b'
},
build = {
toolchain = false
},
install = true
}
| return {
source = {
type = 'dist',
location = 'https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip',
sha1sum = '42aa43aae89a50d1c66c3f9fdecd676936da6128',
dir = 'android-ndk-r16b'
},
build = {
toolchain = false
}
}
| Remove now useless install declaration from android-ndk pkg | Remove now useless install declaration from android-ndk pkg
| Lua | mit | bazurbat/jagen |
f7d54ff789833242766d565c79ea2e0d174dde45 | src/lua/global_functions.lua | src/lua/global_functions.lua |
-- This function parses redis server definition using either
-- specific server string for this module or global
-- redis section
function rspamd_parse_redis_server(module_name)
local default_port = 6379
local logger = require "rspamd_logger"
local function try_load_redis_servers(options)
local key = optio... | Add universal function to parse redis servers for plugins | [Feature] Add universal function to parse redis servers for plugins
| Lua | bsd-2-clause | andrejzverev/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,minaevmike/rspamd,minaevmike/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,minaevmike/rspamd,AlexeySa/rspamd,minaevmike/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,... | |
e9b0700035b1f98b766dc3f51200bbcce3115468 | core/inputs-common.lua | core/inputs-common.lua | SILE.inputs.common = {
init = function(fn, t)
local dclass = t.attr.class or "plain"
SILE.documentState.documentClass = SILE.require("classes/"..dclass)
SU.required(t.attr, "papersize", fn)
for k,v in pairs(t.attr) do
if SILE.documentState.documentClass.options[k] then
SILE.documentState... | SILE.inputs.common = {
init = function(fn, t)
local dclass = t.attr.class or "plain"
SILE.documentState.documentClass = SILE.require("classes/"..dclass)
SU.required(t.attr, "papersize", fn)
for k,v in pairs(t.attr) do
if SILE.documentState.documentClass.options[k] then
SILE.documentState... | Use SILE.masterFileName instead of arg[1] | Use SILE.masterFileName instead of arg[1]
The former is more explicit and avoid to rely on global arg.
| Lua | mit | anthrotype/sile,simoncozens/sile,neofob/sile,WAKAMAZU/sile_fe,shirat74/sile,Nathan22Miles/sile,alerque/sile,Nathan22Miles/sile,Nathan22Miles/sile,WAKAMAZU/sile_fe,neofob/sile,anthrotype/sile,shirat74/sile,WAKAMAZU/sile_fe,alerque/sile,alerque/sile,neofob/sile,neofob/sile,simoncozens/sile,simoncozens/sile,shirat74/sile,... |
cee1e36f3f37ad6fad91a12ecd5509d16709c05f | test/tests/subst_mark.lua | test/tests/subst_mark.lua | local assertEq = test.assertEq
local ex = vi_mode.ex_mode.run_ex_command
local key = test.key
local keys = test.keys
test.open('1_10.txt')
local function checkOrig()
return assertEq(buffer:get_text(), [[1
2
3
4
5
6
7
8
9
10
]])
end
checkOrig()
-- Set some marks
keys('4Gma')
keys('7Gmb')
keys('1G')
checkOrig()
e... | Add test of using marks in :s commands. | Add test of using marks in :s commands.
| Lua | mit | jugglerchris/textadept-vi,jugglerchris/textadept-vi | |
19376dc3626cd804518e2cb609353a649fc5c751 | wow/30-Widget.lua | wow/30-Widget.lua | require "wow/Frame";
require "rainback/AnchoredBound";
require "rainback/wow-conversion";
local Widget = OOP.Class(WoW.Frame);
WoW.Widget = Widget;
WoW.RegisterFrameType("Widget", Widget);
function Widget:GetWidget()
return self.widget;
end;
function Widget:SetWidget(widget)
self.widget = widget;
end;
local... | require "wow/Frame";
require "rainback/AnchoredBound";
require "rainback/wow-conversion";
local Widget = OOP.Class(WoW.Frame);
WoW.Widget = Widget;
WoW.RegisterFrameType("Widget", Widget);
Widget:AddDestructor(function(self)
if self:GetWidget() then
self:GetWidget():hide();
end;
end);
function Widget... | Hide the widget when the frame is destroyed | Hide the widget when the frame is destroyed
| Lua | mit | Thonik/rainback |
c2c5ec37299275ed3b837824e914bea1bd9add24 | preference.lua | preference.lua | local loadsave = require( 'lib.loadsave')
local M = {}
M.settings = {}
function M:save()
loadsave.saveTable( self.settings, 'settings.json' )
end
function M:get( name )
return self.settings[ name ]
end
function M:set( name, value )
self.settings[ name ] = value
end
function M:load()
local settings = loadsa... | Update module for save and load settings from files | Update module for save and load settings from files
| Lua | mit | ldurniat/My-Pong-Game,ldurniat/The-Great-Pong | |
28f116505d0486fe26b69063e4d5ce7faf24003e | plugins/lua/user_modules/sed.lua | plugins/lua/user_modules/sed.lua | local CircularBuffer = require ("circularbuffer")
sed = sed or {}
sed.messages = CircularBuffer (20)
local persistent = false
local function Handle (name, communityId, message)
local p, a, b = string.match (message, "^([sp])/(.*)/(.*)/$")
if a then
if p == "p" then
persistent = message
if message =... | local CircularBuffer = require ("circularbuffer")
sed = sed or {}
sed.messages = CircularBuffer (20)
local persistent = false
local function Handle (name, communityId, message)
local p, a, b = string.match (message, "^([sp])/(.*)/(.*)/$")
if a then
if p == "p" then
persistent = message
end
for i ... | Revert "Enable disabling of persistent replacements" | Revert "Enable disabling of persistent replacements"
This reverts commit f8f47b37f9182774f235f6bc00816b3e05bb82b4.
| Lua | cc0-1.0 | meepdarknessmeep/hash.js,SwadicalRag/hash.js,ModMountain/hash.js,mcd1992/hash.js,LennyPenny/hash.js |
ba89680becee250100836d8834a26ac51ef38842 | nyagos.d/brace.lua | nyagos.d/brace.lua | local orgfilter = nyagos.filter
nyagos.filter = function(cmdline)
if orgfilter then
cmdline = orgfilter(cmdline)
end
local last
repeat
last = true
cmdline = cmdline:gsub("(%S*)(%b{})(%S*)", function(left,mid,right)
last = false
local contents = s... | local orgfilter = nyagos.filter
nyagos.filter = function(cmdline)
if orgfilter then
cmdline = orgfilter(cmdline)
end
repeat
local last = true
cmdline = cmdline:gsub("(%S*)(%b{})(%S*)", function(left,mid,right)
local contents = string.sub(mid,2,-2)
loc... | Support empty fragmenets like a{,b}c | Support empty fragmenets like a{,b}c
| Lua | bsd-3-clause | hattya/nyagos,hattya/nyagos,kissthink/nyagos,tyochiai/nyagos,kissthink/nyagos,kissthink/nyagos,hattya/nyagos,nocd5/nyagos,tsuyoshicho/nyagos,zetamatta/nyagos |
55e388aff6bfc2863a727afe893b169060f0f191 | lua/util.lua | lua/util.lua |
--
-- actor.lua
-- Generic utility functions not belonging anywhere else
--
local Util = {}
-- Util.seqDelete() - removes an object from a numerical sequence, to go with
-- table.insert and table.remove.
-- Returns true on success, false if it didn't exist.
function Util.seqRemove(seq, item)
local pos
for i,v in i... | Add new Util module, w/ Util.seqRemove() to remove an item from a sequence | Add new Util module, w/ Util.seqRemove() to remove an item from a sequence
| Lua | bsd-2-clause | deveah/nush | |
35f4b0341d3d08b32f6abb7605a017d0666cdd1a | scripts/sprite.lua | scripts/sprite.lua | require 'class'
require 'dozipfile'
class 'Sprite'
function Sprite:__init( file_base_name )
self.bitmaps = {}
self.frames = {}
self:addFrames( file_base_name )
end
function Sprite:addFrames( file_base_name )
table.insert(self.bitmaps, Bitmap( file_base_name .. '.png' ))
local newFrames = dozipfi... | require 'class'
require 'dozipfile'
class 'Sprite'
function Sprite:__init( file_base_name )
self.bitmaps = {}
self.frames = {}
self:addFrames( file_base_name )
end
function Sprite:addFrames( file_base_name )
local newFrames = dozipfile( file_base_name .. '.lua.gz' )
if newFrames == nil then
... | Make Sprite class not error when frames cannot be loaded. | Make Sprite class not error when frames cannot be loaded.
| Lua | mit | merlinblack/oyunum,merlinblack/oyunum,merlinblack/oyunum,merlinblack/oyunum |
b210f1c829e82649e5fae242c94c9d6dabea1314 | layout-royaloctavo.lua | layout-royaloctavo.lua | CASILE.layout = "royaloctavo"
local class = SILE.documentState.documentClass
SILE.documentState.paperSize = SILE.paperSizeParser("165mm x 250mm")
SILE.documentState.orgPaperSize = SILE.documentState.paperSize
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
... | CASILE.layout = "royaloctavo"
local class = SILE.documentState.documentClass
SILE.documentState.paperSize = SILE.paperSizeParser("165mm x 250mm")
SILE.documentState.orgPaperSize = SILE.documentState.paperSize
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
... | Tweak header and add bottom folio frame to royaloctavo | Tweak header and add bottom folio frame to royaloctavo
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
937d933080f28cdad7a92559537a66401feacd53 | packages/folio.lua | packages/folio.lua | -- Folios class
SILE.require("packages/counters")
SILE.scratch.counters.folio = { value = 1, display = "arabic" }
SILE.registerCommand("folios", function () SILE.scratch.counters.folio.off = false end)
SILE.registerCommand("nofolios", function () SILE.scratch.counters.folio.off = true end)
SILE.registerCommand("nofoli... | -- Folios class
SILE.require("packages/counters")
SILE.scratch.counters.folio = { value = 1, display = "arabic" }
SILE.registerCommand("folios", function () SILE.scratch.counters.folio.off = false end)
SILE.registerCommand("nofolios", function () SILE.scratch.counters.folio.off = true end)
SILE.registerCommand("nofoli... | Fix frame name being hard coded in outputFolio() | Fix frame name being hard coded in outputFolio()
| Lua | mit | simoncozens/sile,simoncozens/sile,alerque/sile,neofob/sile,alerque/sile,neofob/sile,alerque/sile,neofob/sile,neofob/sile,simoncozens/sile,simoncozens/sile,alerque/sile |
0000000187f9aab13edb3176d263bbf5ef1b4c3d | .hammerspoon/init.lua | .hammerspoon/init.lua | require 'expandmode'
require 'movemode'
require 'hs.alert'
require "hs.ipc"
hs.ipc.cliInstall()
local super = {'ctrl', 'alt', 'cmd', 'shift'}
| require 'expandmode'
require 'movemode'
require 'hs.alert'
require "hs.ipc"
if not hs.ipc.cliInstall() then
print('CLI load failed, trying cleanup and load')
hs.ipc.cliUninstall()
if hs.ipc.cliInstall() then
print('CLI load succeeded!')
end
end
local super = {'ctrl', 'alt', 'cmd', 'shift'}
| Make cli install more robust | [hs] Make cli install more robust
| Lua | mit | paradox460/.dotfiles,paradox460/.dotfiles,paradox460/.dotfiles,paradox460/.dotfiles |
0ab07d07e596978174cc732d02970834b8b30dac | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.17"
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... | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.18"
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.18 | Bump release version to v0.0.18
| Lua | mit | hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua |
5276f7247740f7560c279e5ab67d7fc7190bcf0f | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.31"
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.32"
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.32 | Bump release version to v0.0.32
| Lua | mit | hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua |
64950d676d9fa051358db5166a8296ed6db98d83 | src/Generator/premake5.lua | src/Generator/premake5.lua | project "CppSharp.Generator"
SetupManagedProject()
kind "SharedLib"
language "C#"
files { "**.cs", "**verbs.txt" }
excludes { "Filter.cs" }
vpaths { ["*"] = "*" }
dependson { "Std-symbols" }
links
{
"System",
"System.Core",
"CppSharp",
"CppSharp.AST",
"CppSharp.Parser"
}
Set... | project "CppSharp.Generator"
SetupManagedProject()
kind "SharedLib"
language "C#"
files { "**.cs", "**verbs.txt" }
excludes { "Filter.cs" }
vpaths { ["*"] = "*" }
dependson { "Std-symbols" }
links
{
"System",
"System.Core",
"CppSharp",
"CppSharp.AST",
"CppSharp.Parser"
}
Set... | Update Generator project build file to new Premake filter syntax. | Update Generator project build file to new Premake filter syntax.
| Lua | mit | u255436/CppSharp,mono/CppSharp,mono/CppSharp,zillemarco/CppSharp,mohtamohit/CppSharp,u255436/CppSharp,mono/CppSharp,ddobrev/CppSharp,zillemarco/CppSharp,zillemarco/CppSharp,mono/CppSharp,ddobrev/CppSharp,ddobrev/CppSharp,zillemarco/CppSharp,u255436/CppSharp,mohtamohit/CppSharp,mono/CppSharp,mono/CppSharp,u255436/CppSha... |
ac8bad3e623f1df5157adbf8d8f73f6438d5ccf3 | src/conf.lua | src/conf.lua | function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.42"
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.43"
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.43 | Bump release version to v0.0.43
| Lua | mit | hawkthorne/hawkthorne-client-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-server-lua,hawkthorne/hawkthorne-client-lua |
87b68fe2e9f687cb6e5f9e876f7b64506dbdec1e | init.lua | init.lua | -- load location specific data 'altitude', 'ssid' and 'wifipassword'
dofile("location.lua")
function startup()
if file.open("init.lua") == nil then
print("init.lua deleted or renamed")
else
print("Running")
file.close("init.lua")
-- the actual application is stored in 'applicati... | -- load location specific data 'altitude', 'ssid' and 'wifipassword'
dofile("location.lua")
function startup()
if file.open("init.lua") == nil then
print("init.lua deleted or renamed")
else
print("Running")
file.close("init.lua")
-- the actual application is stored in 'applicati... | Change wifi.sta.config call method to reflect the API change : https://github.com/GeoNomad/LuaLoader/issues/5 | Change wifi.sta.config call method to reflect the API change :
https://github.com/GeoNomad/LuaLoader/issues/5
| Lua | mit | vonneudeck/mouldy,vonneudeck/mouldy |
bd88776f556d48c67d62317802d1e8cd03a16124 | show_model_content.lua | show_model_content.lua | require 'paths'
require 'nn'
require 'cutorch'
require 'cunn'
require 'LeakyReLU'
require 'dpnn'
require 'layers.cudnnSpatialConvolutionUpsample'
require 'stn'
OPT = lapp[[
--save (default "logs") subdirectory in which the model is saved
--network (default "adversarial.net... | require 'paths'
require 'nn'
require 'cutorch'
require 'cunn'
require 'cudnn'
require 'dpnn'
OPT = lapp[[
--save (default "logs") subdirectory in which the model is saved
--network (default "adversarial.net") name of the model file
]]
local filepath = paths.concat(OPT... | Fix requires in model shower | Fix requires in model shower
| Lua | mit | aleju/christmas-generator |
7281faeb45658e3918a13adb99265fff603dd85c | npc/base/consequence/gemcraft.lua | npc/base/consequence/gemcraft.lua | require("base.class")
require("npc.base.consequence.consequence")
require("item.gems")
module("npc.base.consequence.gemcraft", package.seeall)
craft = base.class.class(npc.base.consequence.consequence.consequence,
function(self)
npc.base.consequence.consequence.consequence:init(self);
self["perform"] = _... | Add consequence for gem crafting | Add consequence for gem crafting
| Lua | agpl-3.0 | vilarion/Illarion-Content,Illarion-eV/Illarion-Content,KayMD/Illarion-Content,Baylamon/Illarion-Content,LaFamiglia/Illarion-Content | |
fd1f9291fa6fb32381ebfbaac29a8156fc9bd37f | overlay/sdk/hi-linux/rules.lua | overlay/sdk/hi-linux/rules.lua | -- HiSilicon Linux SDK
package { 'make', 'host',
source = 'make-3.81.tar.bz2'
}
package { 'hi-kernel' }
package { 'hi-sdk', 'target',
{ 'build_linux',
{ 'hi-kernel', 'unpack' }
},
{ 'build_common' },
{ 'build_msp' },
}
package { 'ffmpeg', 'target' }
| -- HiSilicon Linux SDK
package { 'make', 'host',
source = 'make-3.81.tar.bz2'
}
package { 'hi-kernel' }
package { 'hi-sdk', 'target',
{ 'build_linux',
{ 'hi-kernel', 'unpack' }
},
{ 'build_common' },
{ 'build_msp' },
}
package { 'libuv', 'target' }
package { 'ffmpeg', 'target' }
pac... | Add karaoke-player to hi-linux build | Add karaoke-player to hi-linux build
| Lua | mit | bazurbat/jagen |
630b112953db67143adc06b3b1df4f950b962b4d | regress/174-cq-close.lua | regress/174-cq-close.lua | #!/bin/sh
_=[[
. "${0%%/*}/regress.sh"
exec runlua "$0" "$@"
]]
require"regress".export".*"
local cq = require"cqueues".new()
cq:close()
check(not pcall(cq.wrap, cq), "cqueue should not allow new threads when closed") -- previously would trigger a segfault, should now error
cq:close()
info("cq:close() was safely ca... | Add test of cq:close() behaviour | Add test of cq:close() behaviour
| Lua | mit | wahern/cqueues,wahern/cqueues | |
d0ff07d2624a2c216900284da9ba8643e1dc9106 | build/scripts/tools/ndk_server.lua | build/scripts/tools/ndk_server.lua | TOOL.Name = "SDKServer"
TOOL.Directory = "../SDK/lib"
TOOL.Kind = "Library"
TOOL.Defines = {
"NDK_BUILD",
"NDK_SERVER"
}
TOOL.Includes = {
"../SDK/include"
}
TOOL.Files = {
"../SDK/include/NDK/**.hpp",
"../SDK/include/NDK/**.inl",
"../SDK/src/NDK/**.hpp",
"../SDK/src/NDK/**.inl",
"../SDK/src/NDK/**.cpp"
}
... | TOOL.Name = "SDKServer"
TOOL.Directory = "../SDK/lib"
TOOL.Kind = "Library"
TOOL.Defines = {
"NDK_BUILD",
"NDK_SERVER"
}
TOOL.Includes = {
"../SDK/include"
}
TOOL.Files = {
"../SDK/include/NDK/**.hpp",
"../SDK/include/NDK/**.inl",
"../SDK/src/NDK/**.hpp",
"../SDK/src/NDK/**.inl",
"../SDK/src/NDK/**.cpp"
}
... | Fix Console.cpp being included in the project | Build/SdkServer: Fix Console.cpp being included in the project
Former-commit-id: 62d706654c398a60946282e112d7e139107ac745 | Lua | mit | DigitalPulseSoftware/NazaraEngine |
79dcf88df0473a1e8f7e01cf30a4041c5681ae52 | lua/example-ffi.lua | lua/example-ffi.lua | ----------------------------------------------------------------------------
-- Define local versions of globals that will be used
----------------------------------------------------------------------------
local base = _G
local ibffi = require("ironbee-ffi")
----------------------------------------------------------... | ----------------------------------------------------------------------------
-- Define local versions of globals that will be used
----------------------------------------------------------------------------
local base = _G
local ibffi = require("ironbee-ffi")
----------------------------------------------------------... | Fix a variable name typo in the lua ffi example module. | Fix a variable name typo in the lua ffi example module.
| Lua | apache-2.0 | ironbee/ironbee,b1v1r/ironbee,b1v1r/ironbee,b1v1r/ironbee,ironbee/ironbee,ironbee/ironbee,b1v1r/ironbee,b1v1r/ironbee,ironbee/ironbee,wmetcalf/ironbee,ironbee/ironbee,wmetcalf/ironbee,b1v1r/ironbee,b1v1r/ironbee,ironbee/ironbee,b1v1r/ironbee,ironbee/ironbee,b1v1r/ironbee,b1v1r/ironbee,ironbee/ironbee,wmetcalf/ironbee,i... |
3a4ee855e77620bd9d8287b16e0834bdd2e2e8f8 | tlua.lua | tlua.lua | yield = coroutine.yield
function print( ... )
local printResult = '';
for i,v in ipairs( {...} ) do
printResult = printResult .. tostring( v ) .. "\t"
end
printResult = "\n" .. printResult
interpreterOutput( printResult )
end
function test()
while( not stop ) do
yield()
en... | yield = coroutine.yield
function print( ... )
local printResult = '';
for i,v in ipairs( {...} ) do
printResult = printResult .. tostring( v ) .. "\t"
end
printResult = "\n" .. printResult
interpreterOutput( printResult )
end
function test()
while( not stop ) do
yield()
en... | Make delay use a tail call. | Make delay use a tail call.
| Lua | mit | merlinblack/tlua,merlinblack/tlua,merlinblack/tlua |
969cd2215b599149f4c5b8a553f1606e64c6a7ab | src/cosy/digest.lua | src/cosy/digest.lua | local Loader = require "cosy.loader"
if _G.js then
local script = Loader.loadhttp "/js/sjcl.js"
--_G.js.global:eval (script)
window.jQuery:globalEval (script)
return function (s)
local out = _G.js.global.sjcl.hash.sha256:hash (s)
return _G.js.global.sjcl.codec.hex:fromBits (out)
end
else
return fun... | local Loader = require "cosy.loader"
if _G.js then
local script = Loader.loadhttp "/js/sjcl.js"
--_G.js.global:eval (script)
window.jQuery:globalEval (script)
return function (s)
local out = _G.js.global.sjcl.hash.sha256:hash (s)
return _G.js.global.sjcl.codec.hex:fromBits (out)
end
else
return fun... | Use sha256 in non js part | Use sha256 in non js part
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
0631d0ef1f603b56fc819616755f9f35e559542b | docs/lua-api/particle.lua | docs/lua-api/particle.lua | --- Provides functions to spawn particles.
-- @module rpgplus.particle
--- Spawns particles at the given location
-- @param location location
-- @param effect effect as string. Can be every value of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html
-- @param options options table with the fields co... | --- Provides functions to spawn particles.
-- @module rpgplus.particle
--- Spawns particles at the given location
-- @param location location
-- @param effect the [effect](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Effect.html) as string
-- @param options options table with the fields count, speed, etc.... | Use markdown for the link to the effects enum. | Use markdown for the link to the effects enum. | Lua | mit | leMaik/RpgPlus |
5cc7d2f555286f7d78c815359020b97293766795 | Quadtastic/Frame.lua | Quadtastic/Frame.lua | local Rectangle = require("Rectangle")
local renderutils = require("Renderutils")
local Frame = {}
local quads = renderutils.border_quads(48, 0, 16, 16, 128, 128, 2)
Frame.start = function(state, x, y, w, h)
-- Draw border
love.graphics.setColor(255, 255, 255, 255)
renderutils.draw_border(stylesprite, quads, x... | local Rectangle = require("Rectangle")
local renderutils = require("Renderutils")
local Frame = {}
local quads = renderutils.border_quads(48, 0, 16, 16, 128, 128, 2)
Frame.start = function(state, x, y, w, h)
-- Draw border
love.graphics.setColor(255, 255, 255, 255)
renderutils.draw_border(stylesprite, quads, x... | Remove hover effect from frame | Remove hover effect from frame
| Lua | mit | 25A0/Quadtastic,25A0/Quadtastic |
25995878df74af0ecaedfef6c92501b44918da89 | train_stops_schedule.lua | train_stops_schedule.lua | /c
function shuffle(list)
for i = #list, 2, -1 do
local j = math.random(i);
list[i], list[j] = list[j], list[i];
end
end
local train = game.player.vehicle.train;
local schedule = { current = 1, records = {} };
function addstop(name)
table.insert(schedule.records, { station = name, wait_conditions = { { type ... | Add train stops schedule toy script | Add train stops schedule toy script
| Lua | mit | Zomis/FactorioMods | |
01e264eed5a0487dfb24a35b80fef8663b06be9e | example/res/quads.lua | example/res/quads.lua | return {
_META = {
image_path = "/Users/moritz/Projects/Quadtastic/example/res/sheet.png",
},
base = {x = 16, y = 27, w = 16, h = 8},
bubbles = {
{x = 2, y = 18, w = 5, h = 5},
{x = 1, y = 25, w = 3, h = 4},
{x = 10, y = 18, w = 5, h = 3},
{x = 7, y = 24, w = 7, h = 6},
{x = 3, y = 8, w ... | return {
_META = {
image_path = "./sheet.png",
},
base = {x = 16, y = 27, w = 16, h = 8},
bubbles = {
{x = 2, y = 18, w = 5, h = 5},
{x = 1, y = 25, w = 3, h = 4},
{x = 10, y = 18, w = 5, h = 3},
{x = 7, y = 24, w = 7, h = 6},
{x = 3, y = 8, w = 5, h = 4},
{x = 10, y = 11, w = 4, h =... | Replace path in example by relative path | Replace path in example by relative path
| Lua | mit | 25A0/Quadtastic,25A0/Quadtastic |
627a7d0dabe6f6710f2af00f42718d5bd12b80e7 | rotterdam/lua/qfinish.lua | rotterdam/lua/qfinish.lua | local working_set, done_set, job_pool = unpack(KEYS)
local timestamp = ARGV[1]
table.remove(ARGV, 1)
local unique_keys = ARGV
if next(unique_keys) == nil then
return {}
end
local zadd_args = {}
for i, unique_key in ipairs(unique_keys) do
zadd_args[2 * i - 1] = timestamp
zadd_args[2 * i] = unique_key
end
... | local working_set, done_set, job_pool = unpack(KEYS)
local timestamp = ARGV[1]
table.remove(ARGV, 1)
local unique_keys = ARGV
if next(unique_keys) == nil then
return {}
end
local zadd_args = {}
for i, unique_key in ipairs(unique_keys) do
zadd_args[2 * i - 1] = timestamp
zadd_args[2 * i] = unique_key
end
... | Clean up job pool when finishing job. | Clean up job pool when finishing job.
| Lua | mit | wglass/rotterdam |
df34ea1e26b7c4817bbd980b381b9869fb081f5b | build/premake4.lua | build/premake4.lua | -- This is the starting point of the build scripts for the project.
-- It defines the common build settings that all the projects share
-- and calls the build scripts of all the sub-projects.
dofile "Helpers.lua"
solution "Cxxi"
configurations { "Debug", "Release" }
platforms { "x32" }
flags { common_flags }
... | -- This is the starting point of the build scripts for the project.
-- It defines the common build settings that all the projects share
-- and calls the build scripts of all the sub-projects.
dofile "Helpers.lua"
solution "Cxxi"
configurations { "Debug", "Release" }
platforms { "x32" }
flags { common_flags }
... | Add the new generator tests project to the master build. | Add the new generator tests project to the master build.
| Lua | mit | mohtamohit/CppSharp,txdv/CppSharp,imazen/CppSharp,ktopouzi/CppSharp,inordertotest/CppSharp,mono/CppSharp,ddobrev/CppSharp,mono/CppSharp,xistoso/CppSharp,xistoso/CppSharp,ddobrev/CppSharp,nalkaro/CppSharp,zillemarco/CppSharp,KonajuGames/CppSharp,txdv/CppSharp,genuinelucifer/CppSharp,inordertotest/CppSharp,mohtamohit/Cpp... |
231d4d50f6a4580bb8fcab974efba9938151bc2e | layout-a5trim.lua | layout-a5trim.lua | local book = SILE.require("classes/book");
book:loadPackage("masters")
book:defineMaster({ id = "right", firstContentFrame = "content", frames = {
content = { left = "22.5mm", right = "100%pw-15mm", top = "20mm", bottom = "top(footnotes)" },
runningHead = { left = "left(content)", right = "right(content)", top = "t... | local class = SILE.documentState.documentClass
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
left = "22.5mm",
right = "100%pw-15mm",
top = "20mm",
bottom = "top(footnotes)"
},
runningHead = {
left = "left(c... | Add folio fram to A5trim and normalize with other layouts | Add folio fram to A5trim and normalize with other layouts
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
e4a71fd1111390cbc2bb7fbb1badf0a44f77cebb | lua/main.lua | lua/main.lua | -- Set the Lua module search path
package.path = './lua/?.lua'
local viewport = require 'engine.viewport'
viewport.create(1280, 720, 'test')
viewport.addNode(require 'imgui')
viewport.run()
| -- Set the Lua module search path
package.path = './lua/?.lua'
-- Load the game engine
local viewport = require 'engine.viewport'
-- Test module loading and binding. Must be called after the engine is loaded (require 'engine.viewport')
require 'tests.mod'
-- Create the viewport
viewport.create(1280, 720, 'Woot Game Egi... | Clean up and add comments | Clean up and add comments
| Lua | mit | lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot,lzubiaur/woot |
c9b70d22aa5d49e987796df3e1ec7f4e0140cb60 | data/input_config.lua | data/input_config.lua | io.write("Here i go again\n");
input.create("horizontal", -- name
false, -- invert?
0.1, -- deadzone, negative direction
0.1, -- deadzone, positive direction
1.0, -- maximum, negative direction
1.0); -- maximum, positive direction
io.write("on my own\n");
input.create("vertical", -... |
-- name | invert? | deadzone, negative | positive | maximum, negative | positive
input.create("horizontal", false, 0.1, 0.1, 1.0, 1.0)
input.create("vertical", false, 0.1, 0.1, 1.0, 1.0)
| Remove debug prints and restructure stuff | Remove debug prints and restructure stuff
| Lua | mit | n00bDooD/geng,n00bDooD/geng,n00bDooD/geng |
e1fd103363ad07c141faca31162cd98fb6f3104c | gm/items/id_3643_crashserver.lua | gm/items/id_3643_crashserver.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... | Add crash script for debugging core dump creation | Add crash script for debugging core dump creation
| Lua | agpl-3.0 | Illarion-eV/Illarion-Content | |
e3ef84ee902fa735fdad72eb9f5e6100861fedf7 | examples/udf/sum_example.lua | examples/udf/sum_example.lua | function sum_single_bin(s)
local function mapper(rec)
return rec['aggbin']
end
local function reducer(val1, val2)
return val1 + val2
end
return s : map(mapper) : reduce(reducer)
end
| local function mapper(rec)
return rec['aggbin']
end
local function reducer(val1, val2)
return val1 + val2
end
function sum_single_bin(stream)
return stream : map(mapper) : reduce(reducer)
end
| Put mapper and reducer out main example function for performance reasons. | Put mapper and reducer out main example function for performance reasons.
| Lua | apache-2.0 | pradeepsrinivasan/aerospike-client-java,Stratio/aerospike-client-java,pradeepsrinivasan/aerospike-client-java,alexandrnikitin/aerospike-client-java,Stratio/aerospike-client-java,wgpshashank/aerospike-client-java,wgpshashank/aerospike-client-java,alexandrnikitin/aerospike-client-java |
705359e3b73ca39a4bf4964d6e9300ab723c12cd | build/scripts/tools/unittests.lua | build/scripts/tools/unittests.lua | TOOL.Name = "UnitTests"
TOOL.Directory = "../tests"
TOOL.EnableConsole = true
TOOL.Kind = "Application"
TOOL.TargetDirectory = TOOL.Directory
TOOL.Defines = {
}
TOOL.Includes = {
"../include"
}
TOOL.Files = {
"../tests/main.cpp",
"../tests/Engine/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraAudio",
"Naz... | TOOL.Name = "UnitTests"
TOOL.Directory = "../tests"
TOOL.EnableConsole = true
TOOL.Kind = "Application"
TOOL.TargetDirectory = TOOL.Directory
TOOL.Defines = {
}
TOOL.Includes = {
"../include"
}
TOOL.Files = {
"../tests/main.cpp",
"../tests/Engine/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraAudio",
"Naz... | Fix linking against Network module | Build/UnitTest: Fix linking against Network module
Former-commit-id: 69422c73fa14328306e372346a2bae2ead5412e0 [formerly bbff8882d6c5b8eb811a04f4f0561161d93dd2aa]
Former-commit-id: 33a1050adac4332ae0c3e9a68c0f5294253a7cc0 | Lua | mit | DigitalPulseSoftware/NazaraEngine |
042ec0b58e22b30f50c6d189ce11964973029c99 | layout-cep.lua | layout-cep.lua | local book=SILE.require("classes/book");
SILE.documentState.paperSize = SILE.paperSizeParser("110mm x 170mm")
SILE.documentState.orgPaperSize = SILE.documentState.paperSize
book:defineMaster({
id = "right", firstContentFrame = "content", frames = {
content = { left = "20mm", right = "100%pw-10mm", top = "20mm",... | local class = SILE.documentState.documentClass
SILE.documentState.paperSize = SILE.paperSizeParser("110mm x 170mm")
SILE.documentState.orgPaperSize = SILE.documentState.paperSize
class:defineMaster({
id = "right",
firstContentFrame = "content",
frames = {
content = {
left = "20mm",
r... | Bring cep layout up to speed with changes to build system | Bring cep layout up to speed with changes to build system
| Lua | agpl-3.0 | alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile |
86178b1e4ca936e2ec7a4516a12144587376361d | sample06/embed.lua | sample06/embed.lua | -- This is an example to demonstrate embedding l2l in another lua program.
-- Run using: lua sample06/embed.lua
local core = require("core")
local obj = core.read(core.reader.tofile([[
(do
(set myvar 4)
(print (map add_one '(1 2 3))))
]]))
local G = core.compiler.environment()
core.eval(obj, ni... | -- This is an example to demonstrate embedding l2l in another lua program.
-- Run using: lua sample06/embed.lua
local core = require("core")
local obj = core.read(core.reader.tofile([[
(do
(set myvar 4)
(print (map add_one '(1 2 3))))
]]))
core.eval(obj, nil, {
add_one = function(x) return x... | Refactor away G variable in sample06. | Refactor away G variable in sample06.
| Lua | bsd-2-clause | carloscm/l2l,meric/l2l,tst2005/l2l |
dfe981427888016f9aca8f6a8e0a2f9be7555e93 | nvim/.config/nvim/plugins/spectre.lua | nvim/.config/nvim/plugins/spectre.lua | vim.api.nvim_set_keymap("n", "<leader>S", ":lua require('spectre').open()<CR>", { noremap = true })
-- search current word
vim.api.nvim_set_keymap("n", "<leader>sw", ":lua require('spectre').open_visual({select_word=true})<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<leader>s", ":lua require('spectre').open... | vim.api.nvim_set_keymap("n", "<leader>S", ":lua require('spectre').open()<CR>", { noremap = true })
-- search current word
vim.api.nvim_set_keymap("n", "<leader>sw", ":lua require('spectre').open_visual({select_word=true})<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<leader>s", ":lua require('spectre').open... | Add mapping to close Spectre | Add mapping to close Spectre
| Lua | mit | il-tmfv/dotfiles |
e8b7029519d218b5064a244c4b5849d6f4cd4c6b | .hammerspoon/modules/screenLockWatcher.lua | .hammerspoon/modules/screenLockWatcher.lua | function ScreenLockWatcher()
local self={}
-- Do some actions upon screen lock/unlock
-- (including screen saver with password)
local caffeineUnmute=false
local caffeineItunesPlayPause=false
function caffeinateCallback(eventType)
if (eventType == hs.caffeinate.watcher.screensDidLock) th... | function ScreenLockWatcher()
local self={}
-- Do some actions upon screen lock/unlock
-- (including screen saver with password)
local caffeineUnmute=false
local caffeineItunesPlayPause=false
function caffeinateCallback(eventType)
if (eventType == hs.caffeinate.watcher.screensDidLock) th... | Delete SSH keys from agent upon screen lock via ssh-agent-ctrl | Delete SSH keys from agent upon screen lock via ssh-agent-ctrl
See script here:
https://github.com/antontsv/home.bin/blob/master/bin/ssh-agent-ctrl
| Lua | apache-2.0 | antontsv/apple.bin,antontsv/apple.bin |
352e4ac75a8b91c454a787829a29e8cf7dba1887 | plugins/mod_motd.lua | plugins/mod_motd.lua | -- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2010 Jeff Mitchell
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local host = module:get_host();
local motd_text = module:get_option("... | -- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Copyright (C) 2010 Jeff Mitchell
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
local host = module:get_host();
local motd_text = module:get_option("... | Add jid support for motd | Add jid support for motd
| Lua | mit | sarumjanuch/prosody,sarumjanuch/prosody |
1045624662d396cad967fec569fd0b8d030e7578 | src/cosy/server/i18n.lua | src/cosy/server/i18n.lua | return {
["message:invalid"] = {
en = "rpc message is invalid",
},
["server:action"] = {
en = "start or stop",
},
["flag:clean"] = {
en = "clean database (start only)",
},
["server:no-operation"] = {
en = "operation {{{operation}}} does not exist",
},
["server:exception"] = {
en = ... | return {
["message:invalid"] = {
en = "rpc message is invalid",
},
["command"] = {
en = "Control the server",
},
["command:start"] = {
en = "Start the server",
},
["command:stop"] = {
en = "Stop the server",
},
["flag:clean"] = {
en = "Clean database",
},
["server:no-operation"... | Add translations messages for server commands. | Add translations messages for server commands.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
f309cee8d6f6111668cc5b61e5d26d5ca63af187 | examples/Tut00/build.lua | examples/Tut00/build.lua | EXAMPLE.Name = "Tut00_EmptyProject"
EXAMPLE.EnableConsole = true
EXAMPLE.Files = {
"main.cpp"
}
EXAMPLE.Libraries = {
"NazaraAudio",
"NazaraCore",
"NazaraGraphics",
"NazaraLua",
"NazaraNetwork",
"NazaraNoise",
"NazaraPhysics",
"NazaraRenderer",
"NazaraUtility",
"NazaraSDK"
}
| EXAMPLE.Name = "Tut00_EmptyProject"
EXAMPLE.EnableConsole = true
EXAMPLE.Files = {
"main.cpp"
}
EXAMPLE.Libraries = {
"NazaraAudio",
"NazaraCore",
"NazaraGraphics",
"NazaraLua",
"NazaraNetwork",
"NazaraNoise",
"NazaraPhysics2D",
"NazaraPhysics3D",
"NazaraRenderer",
"NazaraUtilit... | Fix compilation of Tut00 after Physics change | Example: Fix compilation of Tut00 after Physics change
Had some trouble with spaces | Lua | mit | DigitalPulseSoftware/NazaraEngine |
bb240f529be6b1b320ded09cc4ebdbec84a574da | tests/test-coro-http.lua | tests/test-coro-http.lua | local http = require 'coro-http'
require('tap')(function (test)
test("real http request", function ()
coroutine.wrap(function()
local res, data = http.request('GET', 'http://luvit.io/')
assert(res.code == 301)
local connection = http.getConnection('luvit.io', 80, false)
assert(connection... | local http = require 'coro-http'
require('tap')(function (test)
test("real http request", function ()
coroutine.wrap(function()
local res, data = http.request('GET', 'http://github.com/')
assert(res and (res.code == 301 or res.code == 200))
assert(data)
local connection = http.getConnect... | Update coro-http test and add basic https test | Update coro-http test and add basic https test
| Lua | apache-2.0 | zhaozg/lit,luvit/lit |
fff08edcc86b6fa8de658ee426b02a1c622613ab | init.lua | init.lua | require("packer").startup(function()
use 'wbthomason/packer.nvim'
use 'tpope/vim-fugitive'
use 'tpope/vim-projectionist'
use 'tpope/vim-sensible'
use 'arcticicestudio/nord-vim'
end)
vim.cmd [[autocmd BufWritePre * :%s/\s\+$//e]]
vim.opt.cursorline = true
vim.opt.diffopt:append({'algorithm:patien... | require("packer").startup(function()
use 'wbthomason/packer.nvim'
use 'tpope/vim-fugitive'
use 'tpope/vim-projectionist'
use 'tpope/vim-sensible'
use 'sainnhe/edge'
use 'itchyny/lightline.vim'
end)
vim.cmd [[autocmd BufWritePre * :%s/\s\+$//e]]
vim.opt.cursorline = true
vim.opt.diffopt:appen... | Install lightline and edge colorscheme | nvim: Install lightline and edge colorscheme
Nord is kinda bland. lightline.vim gets the job done for now and does
not require configuration like feline.
| Lua | unlicense | cenouro/dotfiles |
c50c72ab9b4f34f323f8768005306fb91e20e117 | package.lua | package.lua | return {
name = "creationix/lit",
version = "1.1.1",
luvi = {
version = "2.0.1",
flavor = "regular",
},
dependencies = {
"luvit/require@1.0.1",
"luvit/pretty-print@1.0.0",
"luvit/http-codec@1.0.0",
"luvit/json@1.0.0",
"creationix/coro-fs@1.2.3",
"creationix/coro-tcp@1.0.5",
... | return {
name = "luvit/lit",
version = "1.1.1",
luvi = {
version = "2.0.1",
flavor = "regular",
},
dependencies = {
"luvit/require@1.0.1",
"luvit/pretty-print@1.0.0",
"luvit/http-codec@1.0.0",
"luvit/json@1.0.0",
"creationix/coro-fs@1.2.3",
"creationix/coro-tcp@1.0.5",
"cre... | Rename lit name to luvit/lit | Rename lit name to luvit/lit
| Lua | apache-2.0 | kaustavha/lit,zhaozg/lit,james2doyle/lit,DBarney/lit,kidaa/lit,1yvT0s/lit,squeek502/lit,lduboeuf/lit,luvit/lit |
b5cf4d80cf4d9bab3ee95e40eae29f328d7c5c5d | test/alexismartin.lua | test/alexismartin.lua | local Serpent = require "serpent"
local function dump (x)
return Serpent.dump (x, {
indent = " ",
comment = false,
sortkeys = true,
compact = false,
})
end
local Proxy = require "layeredata"
local layer1 = Proxy.new_layer { name = "layer1" }
local layer2 = Proxy.new_layer { name = "layer2" }
... | local Serpent = require "serpent"
local function dump (x)
return Serpent.dump (x, {
indent = " ",
comment = false,
sortkeys = true,
compact = false,
})
end
local Proxy = require "layeredata"
local layer1 = Proxy.new_layer { name = "layer1" }
local layer2 = Proxy.new_layer { name = "layer2" }
... | Add example code to merge the two layers. | Add example code to merge the two layers.
| Lua | mit | cosyverif/layeredata,saucisson/lua-layeredata,saucisson/layeredata |
09111d1323195f1aa2a0c78b027e1d5c6226ec7e | src/cosy/util/tags.lua | src/cosy/util/tags.lua | -- Tags
-- ====
-- Internal mechanisms require to store some information in the data. In
-- order to avoid name conflicts with user defined keys, we use tables as
-- keys for internal information. Such keys are called __tags__.
--
-- ### Usage
--
-- local tags = require "cosy.util" . tags
-- local TAG = t... | -- Tags
-- ====
-- Internal mechanisms require to store some information in the data. In
-- order to avoid name conflicts with user defined keys, we use tables as
-- keys for internal information. Such keys are called __tags__.
--
-- ### Usage
--
-- local tags = require "cosy.util" . tags
-- local TAG = t... | Add a NAME to each tag. | Add a NAME to each tag.
| Lua | mit | CosyVerif/library,CosyVerif/library,CosyVerif/library |
c78b7b1f0edc520f52ac3fd907abfeb9eee87fd5 | premake4.lua | premake4.lua | #!lua
solution "stlsplit"
location ( "." )
targetdir("build")
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings"}
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize", "ExtraWarnings"}
p... | #!lua
solution "stlsplit"
location ( "." )
targetdir("build")
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings"}
configuration "Release"
defines { "NDEBUG" }
flags { "Optimize", "ExtraWarnings"}
p... | Use lib instead of stlsplit to ensure build order | Premake: Use lib instead of stlsplit to ensure build order
| Lua | agpl-3.0 | admesh/stlsplit |
befb57176f20692ce514ebce37282592e6bfe882 | hammerspoon/window-expand.lua | hammerspoon/window-expand.lua | local function pressFn(mods, key)
if key == nil then
key = mods
mods = {}
end
return function() hs.eventtap.keyStroke(mods, key, 1000) end
end
local function remap(mods, key, pressFn)
hs.hotkey.bind(mods, key, pressFn, nil, pressFn)
end
remap({"cmd", "alt", "ctrl", "shift"}, "delete", pressFn({"cmd", ... | local function pressFn(mods, key)
if key == nil then
key = mods
mods = {}
end
return function() hs.eventtap.keyStroke(mods, key, 1000) end
end
local function remap(mods, key, pressFn)
hs.hotkey.bind(mods, key, pressFn, nil, pressFn)
end
remap({"cmd", "alt", "ctrl", "shift"}, "delete", pressFn({"cmd", ... | Add hyper+space for window cycling | Add hyper+space for window cycling
| Lua | mit | bsingr/dotfiles,bsingr/dotfiles |
f8504cfbccf8542e3978088d751d45cf776b600c | lua/exports/mswindows/handles/init.lua | lua/exports/mswindows/handles/init.lua |
local ffi = require 'ffi'
ffi.cdef [[
typedef struct RESOURCE_UPDATE_W RESOURCE_UPDATE_W;
typedef struct RESOURCE_UPDATE_A RESOURCE_UPDATE_A;
typedef struct MODULE MODULE;
typedef struct RESOURCE RESOURCE;
]]
return {
is_invalid = function(handle)
return ffi.cast('intptr_t', handle) == -1
end;
get_inval... |
local ffi = require 'ffi'
ffi.cdef [[
typedef struct RESOURCE_UPDATE_W RESOURCE_UPDATE_W;
typedef struct RESOURCE_UPDATE_A RESOURCE_UPDATE_A;
typedef struct MODULE MODULE;
typedef struct RESOURCE RESOURCE;
typedef struct MICROSOFT_WINDOW MICROSOFT_WINDOW;
]]
return {
is_invalid = function(handle)
return ... | Add nonstandard MICROSOFT_WINDOW handle struct | Add nonstandard MICROSOFT_WINDOW handle struct
| Lua | mit | taxler/radish,taxler/radish,taxler/radish,taxler/radish,taxler/radish,taxler/radish |
d5b4baca572c309421b24456b0367061d65a929a | packages/raiselower.lua | packages/raiselower.lua | SILE.registerCommand("raise", function(options, content)
local height = options.height or 0
height = SILE.parseComplexFrameDimension(height,"h")
SILE.typesetter:pushHbox({
outputYourself= function (self, typesetter, line)
if (type(typesetter.state.cursorY)) == "table" then typesetter.state.cursorY =ty... |
SILE.registerCommand("raise", function(options, content)
local height = options.height or 0
height = SILE.parseComplexFrameDimension(height,"h")
SILE.typesetter:pushHbox({
outputYourself= function (self, typesetter, line)
if (type(typesetter.state.cursorY)) == "table" then typesetter.state.cursorY =t... | Add a lower command too. | Add a lower command too. | Lua | mit | simoncozens/sile,Nathan22Miles/sile,neofob/sile,neofob/sile,shirat74/sile,shirat74/sile,anthrotype/sile,anthrotype/sile,simoncozens/sile,Nathan22Miles/sile,WAKAMAZU/sile_fe,anthrotype/sile,shirat74/sile,alerque/sile,shirat74/sile,Nathan22Miles/sile,neofob/sile,alerque/sile,alerque/sile,WAKAMAZU/sile_fe,simoncozens/sile... |
198692ed350e36bdf1c6d46e79fb2f4af3c99f31 | processing/template.lua | processing/template.lua | -- DAG definition: it is encoded as an array of stages.
Stages = @@STAGES@@;
-- Number of computation nodes in the system
Containers = @@CONTAINERS@@;
-- Number of users accessing the system
Users = @@USERS@@;
-- Distribution of the think time for the users
UThinkTimeDistr = {type = "@@TYPE@@", params = @@PARAMS@@};... | -- DAG definition: it is encoded as an array of stages.
Stages = @@STAGES@@;
-- Number of computation nodes in the system
Nodes = @@CONTAINERS@@;
-- Number of users accessing the system
Users = @@USERS@@;
-- Distribution of the think time for the users
UThinkTimeDistr = {type = "@@TYPE@@", params = @@PARAMS@@};
-- ... | Use 'Nodes' instead of 'Containers' in LUA file | Use 'Nodes' instead of 'Containers' in LUA file
| Lua | apache-2.0 | deib-polimi/Spark-Log-Parser,deib-polimi/Spark-Log-Parser |
f4b175676cee86b2add90ede65df74f4da98ffcb | test/tests/cw.lua | test/tests/cw.lua | -- Test the change word command
test.open('words.txt')
local lineno = test.lineno
local colno = test.colno
local assertEq = test.assertEq
test.key('j')
assertEq(colno(), 0)
assertEq(lineno(), 1)
assertEq(buffer:get_cur_line(), "hey bee cee dee ee eff\n")
-- Test changing the first word
test.key('c', 'w', 'f', 'o', 'o',... | -- Test the change word command
test.open('words.txt')
local lineno = test.lineno
local colno = test.colno
local assertEq = test.assertEq
test.key('j')
assertEq(colno(), 0)
assertEq(lineno(), 1)
assertEq(buffer:get_cur_line(), "hey bee cee dee ee eff\n")
-- Test changing the first word
test.key('c', 'w', 'f', 'o', 'o',... | Add more test cases with counts (now fails). | Add more test cases with counts (now fails).
| Lua | mit | erig0/textadept-vi,jugglerchris/textadept-vi,jugglerchris/textadept-vi |
22edd4d0c58466f01453f41962c36d69289d05b5 | wow/30-Widget.lua | wow/30-Widget.lua | require "wow/Frame";
require "rainback/AnchoredBound";
require "rainback/wow-conversion";
local Widget = OOP.Class(WoW.Frame);
WoW.Widget = Widget;
WoW.RegisterFrameType("Widget", Widget);
Widget:AddDestructor(function(self)
if self:GetWidget() then
self:GetWidget():hide();
end;
end);
function Widget... | require "wow/Frame";
require "rainback/AnchoredBound";
require "rainback/wow-conversion";
local Widget = OOP.Class(WoW.Frame);
WoW.Widget = Widget;
WoW.RegisterFrameType("Widget", Widget);
Widget:AddDestructor(function(self)
if self:GetWidget() then
self:GetWidget():hide();
end;
end);
function Widget... | Put a reasonable maximum size on widgets | Put a reasonable maximum size on widgets
| Lua | mit | Thonik/rainback |
63d4164929f5ba2b9cd4d681212549a6f0513d9f | lampshade/profil-00.lua | lampshade/profil-00.lua | dofile 'lampshade.lua'
local config = {
tolerance = 1,
thickness = 3,
profile_number = 4, -- shall be 20 to be nicer
angle = 30, -- default is zero
bottom = {
external_radius = 100,
internal_radius = 80,
-- radius = at middle
},
upper = {
height = 200,
external_radius... | dofile 'lampshade.lua'
local config = {
scale = 0.25,
tolerance = 1,
thickness = 3,
profile_number = 4, -- shall be 20 to be nicer
angle = 30, -- default is zero
bottom = {
external_radius = 100,
internal_radius = 80,
-- radius = at middle
},
upper = {
height = 200,
... | Set as cut with a scaling factor of 1/4. | Set as cut with a scaling factor of 1/4.
| Lua | mit | loic-fejoz/loic-fejoz-fabmoments,loic-fejoz/loic-fejoz-fabmoments,loic-fejoz/loic-fejoz-fabmoments |
49267b5a003e9145283c043bd523a037d7b38370 | test/lua/unit/smtp_addr.lua | test/lua/unit/smtp_addr.lua | -- SMTP address parser tests
context("SMTP address check functions", function()
local logger = require("rspamd_logger")
local ffi = require("ffi")
require "fun" ()
ffi.cdef[[
struct rspamd_email_address {
const char *raw;
const char *addr;
const char *user;
const char *domain;
const char ... | Add smtp addr unit test | [Test] Add smtp addr unit test
| Lua | apache-2.0 | minaevmike/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,minaevmike/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,minaevmike/rspamd,AlexeySa/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,AlexeySa/rspamd,andrejzverev/rspamd,andrejzverev/rspamd,minaevmike/rspamd,AlexeySa/rspamd,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.