Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@WillSams
WillSams / godot_testing_example.sh
Last active June 12, 2024 12:36
Godot Testing Example
rm -rf * .godot
wget -O project.godot \
https://gist.githubusercontent.com/WillSams/a6e3b853595ea6123b5a506acc0ba0a3/raw/f2fab5899029594d66bcba18a2b62cc62927fe81/generic_godot.settings
# download the textures
mkdir {scenes,textures}
wget -O textures/icon.png \
https://github.com/godotengine/godot/blob/master/icon.png?raw=true
wget -O textures/light.png \
https://clipground.com/images/white-light-png-9.png
@WillSams
WillSams / asserts.gd
Last active June 12, 2024 12:37
Asserts for Godot Testing
# Custom assertion function for equality
func assert_equal(actual, expected, message = 'Assertion failed: Values are not equal'):
if actual != expected:
var failure_message = 'Value did not equal: ' + message
push_error(failure_message)
else:
print('Pass')
# Custom assertion function for inequality
@WillSams
WillSams / generic_godot.settings
Created June 4, 2024 10:35
Godot Settings Template
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
iconfig_version=5
@WillSams
WillSams / vimrc
Last active June 14, 2024 11:38
My Linux Mint Vimrc
"'if filereadable("/etc/vim/vimrc")
" source /etc/vim/vimrc
"endif
filetype off
filetype plugin indent on
runtime! plugin/sensible.vim
if has('mouse')
@WillSams
WillSams / vim-in-gitbash.sh
Last active February 14, 2024 23:11
Setting up Vim in Git Bash
#/bin/sh
# https://www.linuxfordevices.com/tutorials/linux/turn-vim-into-an-ide
echo '" Setting some decent VIM settings for programming
" This source file comes from git-for-windows build-extra repository (git-extra/vimrc)
ru! defaults.vim
if has("syntax")
syntax on
@WillSams
WillSams / config.lua-20231005
Last active October 24, 2023 11:22
My LunarVim Config
-- GODOT CONFIGURATION --------------------------------------------
local dap = require('dap')
dap.adapters.godot = {
type = "server",
host = '127.0.0.1',
port = 6008,
}
dap.configurations.gdscript = {
{
@WillSams
WillSams / openplc_install.sh
Last active September 19, 2023 15:27
Open PLC Install
# Open PLC Install
# Editor and runtime
mkdir temp && cd $_
git clone https://github.com/thiagoralves/OpenPLC_v3.git
cd OpenPLC_v3
sudo bash -c "./install.sh linux"
cd ../..
@WillSams
WillSams / will-unity-editor-layout.wlt
Created September 1, 2023 09:34
My Unity Editor Layout
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@WillSams
WillSams / openplc_modbus_examples.json
Last active June 21, 2023 10:06
Node Red / OpenPLC / Modbus
[
{
"id": "bf767ff1cdc5fa2f",
"type": "tab",
"label": "Getting Started",
"disabled": false,
"info": "",
"env": []
},
{
#!/bin/bash
# Discussion, issues and change requests at:
# https://github.com/nodesource/distributions
#
# Script to install the NodeSource Node.js 16.x repo onto a
# Debian or Ubuntu system.
#
# Run as root or insert `sudo -E` before `bash`:
#