Skip to content

Instantly share code, notes, and snippets.

View GammaGames's full-sized avatar
🎃
👉😎👉 zoop

Jesse GammaGames

🎃
👉😎👉 zoop
View GitHub Profile
@GammaGames
GammaGames / colors.code-snippets
Created September 27, 2024 17:43
vscode snippets for hex color using the defaults from semnatic-ui
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
@GammaGames
GammaGames / shakeable_camera.gd
Last active July 31, 2024 08:16 — forked from sjvnnings/shakeable_camera.gd
An easy to use screenshake system in Godot 4. Built with areas and simple to modify.
# Based on a video by Pefeper: https://youtu.be/1i5SB8Ct1y0
# Shakable.gd
extends Area3D
@export var camera : Camera3D
@export var trauma_reduction_rate := 1.0
@export var max_x := 10.0
@export var max_y := 10.0
@export var max_z := 5.0
@GammaGames
GammaGames / inheritance.lua
Created June 30, 2024 06:30
Inheritance test for the Playdate SDK's object system
class("Parent").extends()
function Parent:foo()
print("parent-foo")
end
function Parent:bar()
print("parent-bar-1")
self:foo()
print("parent-bar-2")
end
@GammaGames
GammaGames / gitea.log
Created June 25, 2024 21:42
slow gitea logs
gitea | 2024/06/25 15:30:49 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/repos/org/repo for 192.168.144.2:0, 200 OK in 17.5ms @ repo/repo.go:523(repo.Get)
gitea | 2024/06/25 15:30:49 ...eb/routing/logger.go:102:func1() [I] router: completed GET /org/repo.git/info/refs?service=git-upload-pack for 192.168.144.2:0, 401 Unauthorized in 0.9ms @ repo/githttp.go:517(repo.GetInfoRefs)
gitea | 2024/06/25 15:30:49 ...eb/routing/logger.go:102:func1() [I] router: completed GET /org/repo.git/info/refs?service=git-upload-pack for 192.168.144.2:0, 200 OK in 17.4ms @ repo/githttp.go:517(repo.GetInfoRefs)
gitea | 2024/06/25 15:30:49 ...eb/routing/logger.go:102:func1() [I] router: completed POST /org/repo.git/git-upload-pack for 192.168.144.2:0, 200 OK in 20.8ms @ repo/githttp.go:477(repo.ServiceUploadPack)
gitea | 2024/06/25 15:30:49 ...eb/routing/logger.go:102:func1() [I] router: completed GET /api/v1/repos/org/repo/contents/renovate.json for 192.168.144.2:0, 200 OK in 62.6ms @ repo/file.go:891
@GammaGames
GammaGames / purl.sh
Created March 7, 2024 16:54
purl - curl endpoint and print non-200 statuses (ping + curl)
#!/usr/bin/env bash
_val=`curl -Isk $2 | grep HTTP | cut -d ' ' -f2`
echo "$(date) $_val"
_diff=0
while :
do
_val2=`curl -Isk $2 | grep HTTP | cut -d ' ' -f2`
if [ "$_val" != "$_val2" ]; then
@GammaGames
GammaGames / config.json
Created May 22, 2023 19:04
Process png files to a json file
{
"objects": {
"#000000": {
"image": "/assets/images/rock"
}
},
"#ac3232": {
"player": {}
}
}
@GammaGames
GammaGames / ui.lua
Last active April 19, 2023 18:02
Playdate confirmation dialogue/input prompt with playout library (https://github.com/potch/playout)
local pd <const> = playdate
local gfx <const> = Graphics
local box = playout.box.new
local text = playout.text.new
local window = {
padding = 8,
border = 2,
borderRadius = 1,
@GammaGames
GammaGames / Paginate.lua
Last active January 2, 2024 22:24
Paginate helper library in Lua (for the Playdate)
Paginate = {}
function Paginate.read(filename)
local lines = {}
local file = File.open(filename, File.kFileRead)
local line = file:readline()
while line do
table.insert(lines, line)
line = file:readline()
end
@GammaGames
GammaGames / beehave_debug.gd
Last active August 11, 2022 05:26
debug helper for beehave
extends BeehaveNode
class_name BeehaveDebug, "../icons/tree.svg"
export(NodePath) var _beehave_tree
var beehave_tree : BeehaveRoot setget set_beehave_tree
export(Theme) var theme
export(Color) var tick_color := Color.whitesmoke
export(Color) var success_color := Color.forestgreen
@GammaGames
GammaGames / Grapple.gd
Created May 13, 2022 13:03
Simple “yanking” implementation of a grappling hook for VR in Godot
extends "res://Tools/UsableObject.gd"
var using = false
onready var ray = $Raycast
onready var hook = $Hook
onready var rope = $Rope
onready var laser = $Laser
onready var indicator = $Indicator
onready var initial_transform = transform
var hook_body = null