Skip to content

Instantly share code, notes, and snippets.

View ForwardFeed's full-sized avatar

ForwardFeed

View GitHub Profile
@ForwardFeed
ForwardFeed / rust.json
Last active May 29, 2026 15:56
Bevy Snippets (VSCodium || VSCode)
"BevyPrelude": {
"prefix": "BevyPrelude",
"body": [
"use bevy::prelude::*;",
""
]
},
"BevyPlugin": {
"prefix": "BevyPlugin",
"body": [
@ForwardFeed
ForwardFeed / main.rs
Created May 27, 2026 19:52
Bevy Pixel Perfect Picking example fix
use bevy::{
asset::uuid::Uuid, camera::{
NormalizedRenderTarget, RenderTarget, visibility::RenderLayers
}, color::palettes::css::GRAY, ecs::message::MessageCursor, picking::{
PickingSystems, pointer::{Location, PointerId, PointerInput}
}, prelude::*, render::render_resource::{
Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages,
}, window::{PrimaryWindow, WindowResized}
};
use rust_sc2::prelude::UnitTypeId::{self, *};
#[derive(Default, Debug, Clone, PartialEq)]
pub enum StructureHitboxCornerRadius{
#[default]
None,
Radius(f32),
Unhandled,
}
@ForwardFeed
ForwardFeed / RandomFile.vue
Last active July 26, 2025 16:02
Vue3 TS, Custom Directive (tooltip example)
<script lang="ts" setup>
// use the directive with: v-tooltip
</script>
<template>
<button class="border" v-tooltip="{text: 'some text', color: 'red-200'}">
<span>{{ text }}</span>
</button>
</template>
@ForwardFeed
ForwardFeed / linux_bash_soundboard_init.sh
Created July 14, 2025 16:58
Linux: merge a real microphone with virtual microphone into a mixed virtual microphone to make a soundboard.
#! /bin/env bash
# I use the default microphone,
# but at the end of the script, the default microphone will change (at least on my end)
# to the virt microphone for some reason that I may fix oneday
REAL_MIC=$(pactl get-default-source)
MIX_MIC="mix_mic"
VIRT_MIC_NAME="virt_mic"
VIRT_MIC_PATH="/tmp/$VIRT_MIC_NAME"
@ForwardFeed
ForwardFeed / update_godot.sh
Last active May 2, 2025 07:41
Update the godot engine automatically with a bash script
#!/bin/env bash
# Please note that, this script is a bit useless
# As you could simply install godot with packet manager
# This script:
# 1) Find the lastest stable version for linux of godot from the github repository
# 2) Check if it has already been downloaded
# 3) If not, it download and extract it
# 4) Update the godot desktop, i have crafted mine so it's something one exept not to have.