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
-- This function takes a floating point value, and turns it into a floating
-- point value whose binary representation matches the first floating point
-- value.
--
-- For instance, the floating point number (A) 305419896.0 (hex 0x12345680) is encoded like this: 0x4d91a2b4
-- The floating point number (B) 5.69046046576341273665e-28 is encoded like this: 0x12345680
--
-- The function takes the number A and turns it into the number B.
--
-- This is used to place specific binary values into memory.
@dextercd
dextercd / PhysBodySetTransform.cpp
Last active December 29, 2022 01:57
BlueAmulet's PhysBodySetTransform body function
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <iterator>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <dbghelp.h>
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()
@Makeshift
Makeshift / tutorial.md
Last active May 6, 2024 17:17
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

@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
@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

@luismts
luismts / GitCommitBestPractices.md
Last active May 22, 2024 13:33
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.

@hazzard993
hazzard993 / luarocks-installation-windows10.md
Last active December 19, 2023 18:07
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
@nicolasdao
nicolasdao / open_source_licenses.md
Last active May 22, 2024 10:39
What you need to know to choose an open source license.
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 21, 2024 15:55
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