Start MSYS/MinGW32 shell
msys64/msys2_shell.cmd -mingw32
or
w64devkit.exe
Go into base directory and make
| #!/usr/bin/lua | |
| sh = function(...) | |
| local cmd = table.concat({...}, ' ') | |
| return os.execute(cmd) | |
| end | |
| shout = function(...) | |
| local cmd = table.concat({...}, ' ') | |
| local out = assert(io.popen(cmd)):read '*all' | |
| assert(type(out) == 'string') |
~/.oci/configNote: Get a suitable public key PEM for step 4 from an existing private key with:
ssh-keygen -e -m PKCS8 -f oci_api_privkey.pem
| #!/usr/bin/env lua | |
| server_domain = assert(..., 'Pass server domain as first argument') | |
| -- Convenience functions for running shell commands | |
| sh = os.execute | |
| shout = function(cmd) | |
| local out = assert(io.popen(cmd)):read '*all' | |
| assert(type(out) == 'string') | |
| return out:sub(0, -2) -- drop trailing newline | |
| end |
| #!/usr/bin/lua | |
| -- This script replaces one of the extension ids hardcoded in Chromium | |
| -- with our own desired app extension id so it can function again. | |
| -- See https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/extensions/extension_status_utils.cc;l=30 | |
| local filename = ... | |
| assert(filename, "missing filename") | |
| local file = assert(io.open(filename, 'r+b')) | |
| local bin = file:read '*a' | |
| local kk_appid = 'idgiipeogajjpkgheijapngmlbohdhjg' |
| #From https://github.com/camenduru/stable-diffusion-webui-colab | |
| #Modified to use user selected model checkpoint passed in as first argument | |
| cd /content | |
| env TF_CPP_MIN_LOG_LEVEL=1 | |
| apt -y update -qq | |
| wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4 | |
| env LD_PRELOAD=/content/libtcmalloc_minimal.so.4 |
| #!/usr/bin/lua | |
| --[[ | |
| Intended for SteamOS v3.4.8 build 20230508.1. | |
| Usage: | |
| sudo steamos-readonly disable | |
| sudo chmod +x patch_konsolecursor.lua | |
| sudo patch_konsolecursor.lua /usr/lib/libkonsoleprivate.so.22.08.2 | |
| sudo steamos-readonly enable |
I hereby claim:
To claim this, I am signing this object:
| package = "LuaCOM" | |
| version = "scm.moteus-1" | |
| source = { | |
| url = "https://github.com/moteus/luacom/archive/master.zip", | |
| dir = "luacom-master", | |
| } | |
| description = { | |
| summary = "Use COM libraries from Lua", | |
| detailed = [[ | |
| LuaCOM is an add-on library to the Lua language that allows Lua programs to use and implement objects that follow Microsoft's Component Object Model (COM) specification and use the ActiveX technology for property access and method calls. ]], |
| -- Monte Carlo Simulation of state machine in paper | |
| -- Make one attempt to reach state 1000, fail at zero | |
| function attempt (p) | |
| local state = 2 | |
| local ups = 1 | |
| while state > 0 do | |
| if state > 1000 then | |
| -- attempt succeeded |