Skip to content

Instantly share code, notes, and snippets.

@Nejat
Nejat / wngt-cfg
Last active September 22, 2022 08:27
Unity # use unity hub to manage versions of unitywinget
Citrix Workspace # need the installed version
Visual Studio Community* # use visual studio installer
PowerToys (Preview) # does not update correctly
Microsoft .NET SDK # does not update correctly
Microsoft Visual C++ # use visual studio installer
Windows Software Development Kit # use visual studio installer
JetBrains # use jetbrains toolbox
@Nejat
Nejat / pre-commit-rust
Created December 4, 2022 09:57
git pre-commit hook for rust projects
#!/bin/sh
set -eu
# if ! cargo fmt -- --check
# then
# echo "check/fix fmt issues ..."
# exit -1
# fi
@Nejat
Nejat / winget-updates.nu
Last active April 6, 2024 04:44
Lists and optionally upgrades available WinGet updates. Skips Unknown versions or anything in the skip list
# winget-updates.nu
# GitHub Gists
# this script - https://gist.github.com/Nejat/06c275749b7931857bb4c7604a026877
# example skip config - https://gist.github.com/Nejat/5a41fe09bb27c1bbcf345fb1dea8a234
# powersheel version - https://gist.github.com/Nejat/6cb42f098320cb2fcb57a4e1728ca29e
# output formatting constants
const err_color: string = 'light_red'
const fail_color: string = 'red'
"$schema" = 'https://starship.rs/config-schema.json'
format = """
[](color_orange)\
$os\
$username\
[](bg:color_yellow fg:color_orange)\
$directory\
[](fg:color_yellow bg:color_aqua)\
$git_branch\
@Nejat
Nejat / Cargo.toml
Created January 10, 2025 18:48
general rust crate clippy and profile settings
[workspace.lints.clippy]
cargo = { priority = -1, level = "deny" }
correctness = { priority = -1, level = "deny" }
complexity = { priority = -1, level = "deny" }
nursery = { priority = -1, level = "deny" }
pedantic = { priority = -1, level = "deny" }
perf = { priority = -1, level = "deny" }
style = { priority = -1, level = "deny" }
suspicious = { priority = -1, level = "deny" }
@Nejat
Nejat / setup-bevy-0.15-project-for-android.sh
Last active February 18, 2025 07:44 — forked from hortonew/setup-bevy-0.15-project-for-android.sh
setup-bevy-0.15-project-for-android.sh
#!/usr/bin/env zsh
PROJECT="${1:-bevy_breakout_15}"
BEVY_VERSION="0.15.2"
echo "setting up $PROJECT ..."
cargo new $PROJECT --bin
cd $PROJECT
@Nejat
Nejat / install-rustup
Created March 4, 2025 18:03
lets you install archived versions of rustup for any supported target
#!/usr/bin/env zsh
if [[ $1 =~ "-help|-h" ]]; then
echo
echo "usage: ./install-rustup [version] [target]"
echo
exit
fi