Skip to content

Instantly share code, notes, and snippets.

View Ismoh's full-sized avatar
🐔
bwok bwok bwokaaak

Torben H. Ismoh

🐔
bwok bwok bwokaaak
View GitHub Profile
@enghqii
enghqii / main.lua
Created August 30, 2016 10:26
Lua Coroutine Example
queue = {}
queue_max = 100
producer = coroutine.create(function ()
while #queue < queue_max do
local item = "Hello! "..#queue
table.insert(queue, item)
-- print(item .. " inserted")
end
@iamalbert
iamalbert / test.lua
Created August 31, 2016 09:11
lua coroutine vs plain loop
require 'sys'
local n = 100000
local seq = {}
for i = 1, n do seq[i] = i end
local bs = 405
local plainLoop = function()
local yield = {}
for i = 1, #seq do
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active March 6, 2026 03:16
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@nicolasdao
nicolasdao / open_source_licenses.md
Last active February 15, 2026 16:39
What you need to know to choose an open source license.
@hazzard993
hazzard993 / luarocks-installation-windows10.md
Last active September 21, 2024 10:03
LuaRocks installation guide for Windows 10 users

Via Windows Linux Subsystem (WSL)

The luarocks package can be installed on a Windows Linux Subsystem.

Once installed, to use it, use luarocks inside a WSL shell or wsl luarocks within a Windows shell.

wsl                             # Enter WSL shell (if installed and enabled)
sudo apt-get update             # Update package lists (otherwise luarocks may not be found)
sudo apt-get install luarocks # Install luarocks
@luismts
luismts / GitCommitBestPractices.md
Last active March 13, 2026 04:06
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@martinklepsch
martinklepsch / README.md
Last active November 17, 2022 09:59
`deps.lua` is an all-in-one script containing your declarative list of dependencies and installing any missing ones.

deps.lua is an all-in-one script containing your declarative list of dependencies and installing any missing ones.

Kind of like Clojure's deps.edn except that the dependencies and code to download them are bundled in one package.

  • add link from file to gist so people can find back to here
  • add entries to .gitignore if available
  • ? if file ends in .fnl, download fennel.lua and compile to respective .lua file location

Usage in a fennel script

@Shoozza
Shoozza / install_luarocks_windows_10.md
Last active March 10, 2024 09:34
Installing Luarocks on Windows with MSYS2 and gcc

Installing Luarocks on Windows

Getting Luarocks to work on Windows 8.1/10 with MSYS2 gcc (mingw64)

1. MSYS2 installation

  1. Visit https://www.msys2.org/
  2. Click on the link next to "Download the installer"
  3. Run the installer
  4. Add "C:\msys64\usr\bin" to path
@Makeshift
Makeshift / tutorial.md
Last active February 14, 2026 15:26
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

local imgui = load_imgui({version="1.0.0", name="test"})
function OnWorldPreUpdate()
if imgui.Begin("Main Window Title") then
local available_width, available_height = imgui.GetContentRegionAvail()
if imgui.BeginChild("TopLeft", 0.2 * available_width, 200, true) then
imgui.Text("TopLeft")
imgui.EndChild()