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
--- | |
-- HTML builder module. | |
-- Provides a function to easily create HTML tags. | |
-- @module html | |
--- | |
:concat, :remove = table | |
--- | |
-- Creates an HTML tag string. | |
-- The function is accessed via `html[tag_name]`. |
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 lunatik = require "lunatik" | |
local linux = require "linux" | |
local rcu = require "rcu" | |
local runner = rcu and require "lunatik.runner" | |
local thread = require "thread" | |
local function milliseconds() | |
return linux.time() / 1000000 | |
end |
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 lunatik = require("lunatik") | |
local rcu = require("rcu") | |
local data = require("data") | |
return function(self, hsize) | |
hsize = hsize or 1024 | |
local env = lunatik._ENV | |
local box = env[self] |
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 arg = arg | |
local open, popen = io.open, io.popen | |
local execute, time = os.execute, os.time | |
local concat = table.concat | |
local map | |
map = function(self, f) | |
local i, res = 0, { } | |
for x in self do | |
i = i + 1 | |
res[#res + 1] = f(x, i) |
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
#!/bin/sh | |
# SPDX-License-Identifier: AGPL-3.0-or-later | |
# Copyright 2024 Jacob D Ludvigsen (contributions@ingeniorskap.no) | |
# This script bridges basic geolocation info | |
# from GPSD running on the host system into Waydroid. | |
# Current location is parsed from the example "gpscsv" gpsd agent, | |
# and sent via adb to the mock location provider "appium" | |
# running in the Waydroid container. |
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
#!/usr/bin/env bash | |
# This script should be in the folder /etc/kernel/postinst.d/ | |
# It assumes Lunatik sources are in /opt/lunatik | |
KERNEL_RELEASE=$(uname -r) | |
# This ugly hack is needed because Ubuntu has a weird kernel package versionning. | |
KERNEL_VERSION=$( (grep -o '[0-9.]*$' /proc/version_signature 2>/dev/null) || (uname -r | grep -o '^[0-9.]*') ) | |
KERNEL_VERSION_MAJOR=$(echo "${KERNEL_VERSION}" | grep -o '^[0-9]*') | |
LUNATIK_DIR="/opt/lunatik" |
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 read, write | |
do | |
local _obj_0 = io | |
read, write = _obj_0.read, _obj_0.write | |
end | |
local byte, char | |
do | |
local _obj_0 = string | |
byte, char = _obj_0.byte, _obj_0.char | |
end |