- Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot
- Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
#!/usr/bin/lua5.1 | |
--- Async/Await for Lua 5.1 | |
-- This script implements async/await functions for Lua, allowing tasks to | |
-- be queued and scheduled independently. | |
-- | |
-- This is just an example and has a bunch of issues, isn't tested, isn't | |
-- even actually used anywhere; I basically just got bored and had one of | |
-- those "what if?" type ideas 6 hours ago. | |
local co_create = coroutine.create |
#!/usr/bin/env -S PATH="/usr/local/bin:${PATH}" python3 | |
from datetime import datetime, timedelta | |
from monobankua import Monobank | |
from operator import attrgetter | |
TOKEN = 'xxx' | |
def icon(): |
--[[ | |
https://github.com/yongkangchen/lua-await/blob/master/sync.lua | |
MIT License | |
Copyright (c) 2016 Yongkang Chen lx1988cyk#gmail.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, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | |
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
function parse_json_date(json_date) | |
local pattern = "(%d+)%-(%d+)%-(%d+)%a(%d+)%:(%d+)%:([%d%.]+)([Z%+%-])(%d?%d?)%:?(%d?%d?)" | |
local year, month, day, hour, minute, | |
seconds, offsetsign, offsethour, offsetmin = json_date:match(pattern) | |
local timestamp = os.time{year = year, month = month, | |
day = day, hour = hour, min = minute, sec = seconds} | |
local offset = 0 | |
if offsetsign ~= 'Z' then | |
offset = tonumber(offsethour) * 60 + tonumber(offsetmin) | |
if xoffset == "-" then offset = offset * -1 end |
local s = [[Hello\u003F World\u0021]] | |
------------------------------------------------------------------------------- | |
local string = string | |
local char, format, gmatch, gsub, sub = string.char, string.format, string.gmatch, string.gsub, string.sub | |
local tonumber = tonumber | |
local UESCAPE_PATTERN = "\\u([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])" | |
-- Converts a fully uescaped string back to normal. | |
function string:from_uescape() | |
local out = "" | |
for i = 1, #self, 6 do |
#!/usr/bin/python | |
# Python port of keepass2john from the John the Ripper suite (http://www.openwall.com/john/) | |
# ./keepass2john.c was written by Dhiru Kholia <dhiru.kholia at gmail.com> in March of 2012 | |
# ./keepass2john.c was released under the GNU General Public License | |
# source keepass2john.c source code from: http://fossies.org/linux/john/src/keepass2john.c | |
# | |
# Python port by @harmj0y, GNU General Public License | |
# |
local bytecodes = {} | |
local BC, run_function = {} | |
local VARG_CONST = {} | |
local lujlu_mt_funcs | |
local lujlu_cache = setmetatable({}, {__mode = "k"}) | |
local lujlu_identifier_mt = { | |
__tostring = function(self) | |
return tostring(lujlu_cache[self].data) | |
end, |
local red = Color(255,0,0) | |
local green = Color(0,255,0) | |
local function log(color,s) | |
MsgC(color,s .. "\n") | |
end | |
function mdmp(out) | |
local files,_ = file.Find("*.mdmp","BASE_PATH") | |
if out then log(red,"Found " .. #files .. " files!") end |