This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Adds Windows Terminal to the Win+X menu on Windows 10. | |
| .DESCRIPTION | |
| This script downloads pre-hashed Windows Terminal shortcuts and adds them to the Win+X menu. | |
| It creates both regular and administrator versions of Windows Terminal shortcuts. | |
| Original PowerShell shortcuts are backed up before modification. | |
| .NOTES |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $sshServerCapability = Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*'; if ($sshServerCapability.State -ne 'Installed') { Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0; Write-Output "OpenSSH Server installed."; } else { Write-Output "OpenSSH Server is already installed."; }; Set-Service -Name sshd -StartupType 'Automatic'; Write-Output "sshd service startup type set to 'Automatic'."; if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) { Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."; New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22; Write-Output "Firewall Rule 'OpenSSH-Server-In-TCP' created."; } else { Write-Output "Firewall rule 'OpenSSH-Server-In-TCP' already exists."; }; Start-Service -Name sshd; Write-Output "sshd service started."; $serviceStatus = G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| get_pane_info() { | |
| local session=$1 | |
| local window=$2 | |
| local pane=$3 | |
| # Get the pane's PID | |
| local pane_pid=$(tmux display-message -p -t "${session}:${window}.${pane}" '#{pane_pid}') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Exit immediately if a command exits with a non-zero status. | |
| set -e | |
| # Define the URL for the Google signing key and the destination file | |
| GOOGLE_KEY_URL="https://dl-ssl.google.com/linux/linux_signing_key.pub" | |
| KEYRING_PATH="/etc/apt/keyrings" | |
| KEYRING_FILE="${KEYRING_PATH}/google-chrome.gpg" | |
| REPO_FILE="/etc/apt/sources.list.d/google-chrome.list" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Function to install dependencies | |
| install_dependencies() { | |
| sudo apt update | |
| sudo apt install -y build-essential cmake libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev tmux | |
| } | |
| # Function to install Rust and Cargo | |
| install_rust() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo bash -c 'for user_home in /home/*; do [ -d "$user_home" ] && (touch "$user_home/.tmux.conf"; grep -qxF "set -g history-limit 10000" "$user_home/.tmux.conf" || echo "set -g history-limit 10000" >> "$user_home/.tmux.conf"); done; touch /root/.tmux.conf; grep -qxF "set -g history-limit 10000" /root/.tmux.conf || echo "set -g history-limit 10000" >> /root/.tmux.conf; echo "History limit set to 10000 for all users. Reload your tmux sessions."' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo bash -c 'for user_home in /home/*; do [ -d "$user_home" ] && (touch "$user_home/.tmux.conf"; grep -qxF "set -g mouse on" "$user_home/.tmux.conf" || echo "set -g mouse on" >> "$user_home/.tmux.conf"); done; touch /root/.tmux.conf; grep -qxF "set -g mouse on" /root/.tmux.conf || echo "set -g mouse on" >> /root/.tmux.conf; echo "Mouse support added to all .tmux.conf files. Reload your tmux sessions."' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Function to detect OS and architecture | |
| detect_os_arch() { | |
| OS=$(uname | tr '[:upper:]' '[:lower:]') | |
| ARCH=$(uname -m) | |
| case "$OS" in | |
| linux) | |
| if [[ "$ARCH" == "x86_64" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #This script will compile and install a static ffmpeg build with support for nvenc un ubuntu. | |
| #See the prefix path and compile options if edits are needed to suit your needs. | |
| # ripped from https://gist.github.com/Brainiarc7/3f7695ac2a0905b05c5b | |
| # updated to my personal needs | |
| # tested on Ubuntu 22 | |
| # refer here: |
NewerOlder