This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "PLoop" | |
require "PLoop.System.UnitTest" | |
-- Function defintion in _G | |
function UnitName() | |
return "player" | |
end | |
-- Define an interceptor | |
PLoop(function(_ENV) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
lua_shared_dict plbr_session_storage 10m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "PLoop" (function(_ENV) | |
-- Declare the namespace | |
_G.Defold = namespace "Defold" | |
-- Register it as global, so can be easily accessed | |
Environment.RegisterGlobalNamespace(Defold) | |
-- Define the base script class | |
__Sealed__() | |
class "Script" (function(_ENV) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scorpio "Test" (function(_ENV) | |
function FillPolygon(points) | |
-- Calc the center point | |
local n = #points | |
if n < 3 then return end | |
local cx, cy = 0, 0 | |
for i = 1, n do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scorpio "AshToAshSkin" "" | |
pcall(Style.RegisterSkin, "5MSkin") | |
DEFAULT_COLOR = Color("|c222222ff") | |
LOW_HEALTH_COLOR = Color.WHITE | |
HEALTHBAR = (Scorpio.IsRetail or Scorpio.IsBCC or IsAddOnLoaded("LibHealComm-4.0") or pcall(_G.LibStub, "LibHealComm-4.0")) and "PredictionHealthBar" or "HealthBar" | |
Style.UpdateSkin("5MSkin", { | |
[AshToAsh.AshUnitFrame] = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local create = coroutine.create | |
local resume = coroutine.resume | |
local running = coroutine.running | |
local status = coroutine.status | |
local wrap = coroutine.wrap | |
local yield = coroutine.yield | |
local tinsert = table.insert | |
local tremove = table.remove |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class "FileController" (function(_ENV) | |
inherit "Controller" | |
-- GET /file/download?name=test&fields=["name","age"] | |
__Action__("download", HttpMethod.GET) | |
__Form__{ -- Form验证并自动按照结构组织数据,下面的fields是字符串数组 | |
name = String, | |
fields = struct { String }, | |
} | |
__File__() __Iterator__() -- 申明返回为文件,并且使用迭代器的形式返回数据 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local create = coroutine.create | |
local resume = coroutine.resume | |
local running = coroutine.running | |
local status = coroutine.status | |
local wrap = coroutine.wrap | |
local yield = coroutine.yield | |
local tinsert = table.insert | |
local tremove = table.remove | |
local PREPARE_CONFIRM = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scorpio "SpellCooldown" "" | |
class "Scorpio.Widget.SpellCooldownPanel" (function(_ENV) | |
inherit "ElementPanel" | |
import "System.Reactive" | |
class "Icon" { Frame } | |
__Indexer__() __Observable__() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scorpio "MinimmapPatch" "" | |
MinimapZoneTextButton:SetParent(Minimap) | |
MinimapZoneTextButton:ClearAllPoints() | |
MinimapZoneTextButton:SetPoint("BOTTOMLEFT", Minimap, "TOPLEFT", 0, 4) | |
MinimapZoneTextButton:SetPoint("BOTTOMRIGHT", Minimap, "TOPRIGHT", 0, 4) | |
MinimapZoneText:ClearAllPoints() | |
MinimapZoneText:SetAllPoints() | |
MinimapZoneText.JustifyH = "CENTER" |
NewerOlder