Skip to content

Instantly share code, notes, and snippets.

@kmafeni04
kmafeni04 / lapis-gen.lua
Last active August 28, 2024 22:12
Generates files to be used with the Lapis web Framework
#!/bin/lua5.1
-- Generates a new file/files in a lapis project from a gen-type
-- REQUIREMNTS:
-- lua5.1, luarocks
--
-- Save this script in your $PATH as lapis-gen and give the file execute permissions (chmod +x lapis-gen)
--
-- Usage: lapis-gen [-h] <command>
@kmafeni04
kmafeni04 / lapis-new.lua
Last active August 16, 2024 14:53
Lapis project initialise script
#!/bin/lua5.1
-- Lapis project initialise script
-- REQUIREMENTS:
-- lua5.1, luarocks, git
-- USAGE:
-- Save this script in your $PATH as lapis-new and give the file execute permissions (chmod +x lapis-new)
-- Run either:
@kmafeni04
kmafeni04 / lapis-new.sh
Last active August 13, 2024 14:43
Lapis project initialisation script
#!/bin/bash
# NOTE: rewritten in lua, https://gist.github.com/kmafeni04/7c5a40443a9f5fd9d31e73a4bc7c47b0
echo "What would you like to name the project?:"
read -r project_name
mkdir "$project_name"
cd "$project_name" || return
luarocks install lapis --lua-version=5.1