Disable version check for GNOME Shell extensions
GNOME Shell extensions are a fantastic way to customize and extend the functionality of your GNOME desktop environment. However, GNOME enforces a version check, meaning that if an extension isn’t explicitly marked as compatible with your current GNOME Shell version, it won’t be loaded. This can be frustrating if you know an extension works fine, or if you’re developing an extension and want to test it easily. Recently the forge extension stopped working on GNOME 48, but it still works well even if it’s marked as incompatible. So, to enable forge again we need to disable this version check. Be aware that this comes with risks, as incompatible extensions can cause instability. Proceed with caution and understand that you’re disabling a safety mechanism. ...
Fastfetch: System Information, Your Way
Tired of plain system info outputs? Fastfetch is a command-line tool (similar to Neofetch) that displays essential system details in a highly customizable and visually appealing format. Get info about your OS, kernel, CPU, GPU, RAM, disk usage, and much more, all presented with colorful ASCII art and configurable layouts. Key Features: Fast performance. Highly customizable output (colors, logos, information displayed). Wide range of supported operating systems. Easy to install. Installation: ...
Script to run tests in Jest and get the coverage for a specific file
I needed to automate the process of running tests in Jest and getting the coverage for a specific file. I created this script to help me with that. #!/bin/bash # Color definitions BLUE='\033[0;34m' GREEN='\033[0;32m' RED='\033[0;31m' YELLOW='\033[1;33m' CYAN='\033[0;36m' NC='\033[0m' # No Color BOLD='\033[1m' # Function to display usage show_usage() { echo -e "${YELLOW}Usage:${NC} $0 [--find-by-name] <relative-file-path> [additional test options]" echo -e "${YELLOW}Examples:${NC}" echo -e " $0 src/components/Button.tsx --watch" echo -e " $0 src/components/Button.tsx --find-by-name --watch" exit 1 } # Initialize variables FIND_BY_NAME=false RELATIVE_FILE_PATH="" # Parse arguments while [[ $# -gt 0 ]]; do case $1 in --find-by-name) FIND_BY_NAME=true shift ;; *) if [ -z "$RELATIVE_FILE_PATH" ]; then RELATIVE_FILE_PATH="$1" else break # Stop parsing and keep remaining args for test options fi shift ;; esac done # Check if a file name is provided if [ -z "$RELATIVE_FILE_PATH" ]; then show_usage fi # Check if the file exists if [ ! -f "$RELATIVE_FILE_PATH" ]; then echo -e "${RED}Error: ${NC}File '${YELLOW}${RELATIVE_FILE_PATH}${NC}' not found. 😕" exit 1 fi FILE_PATH=$(echo "$RELATIVE_FILE_PATH" | cut -d'/' -f3-) # Get just the file name without extension for --find-by-name mode FILE_NAME=$(basename "$RELATIVE_FILE_PATH") FILE_NAME_NO_EXT="${FILE_NAME%.*}" # Construct the corresponding test file path TEST_FILE_NAME="${FILE_PATH%.*}.test" if [ "$FIND_BY_NAME" = true ]; then # Search by file name TEST_PATH=$(find "tests" -type f \( -name "${FILE_NAME_NO_EXT}.test.tsx" -o -name "${FILE_NAME_NO_EXT}.test.ts" \)) else # Original search by path TEST_PATH=$(find "tests" -type f \( -path "*/${TEST_FILE_NAME}.tsx" -o -path "*/${TEST_FILE_NAME}.ts" \)) fi # Check if the test file exists if [ -z "$TEST_PATH" ]; then echo -e "${RED}Error: ${NC}Test file for '${YELLOW}${RELATIVE_FILE_PATH}${NC}' not found in 'tests' directory. 😕" echo -e "Test file name: ${YELLOW}${FILE_NAME_NO_EXT}.test.tsx${NC}" echo -e "${YELLOW}Hint:${NC} If you're looking for a file by name, try using the --find-by-name flag." exit 1 fi # Print test information with styling echo -e "\n${BLUE}╔════════════════════════════════════════════════════════════╗${NC}" echo -e "${GREEN}▶ Running Coverage Test${NC}" echo -e "${CYAN}📁 Source file:${NC} ${RELATIVE_FILE_PATH}" echo -e "${CYAN}🧪 Test file:${NC} ${TEST_PATH}" echo -e "${CYAN}⚙️ Options:${NC} $@" echo -e "${BLUE}╚════════════════════════════════════════════════════════════╝${NC}\n" yarn test "$TEST_PATH" --coverage --collectCoverageFrom="$RELATIVE_FILE_PATH" "$@" Usage Test cases are in the tests folder. The script will search for the test file by path by default, if you want to search by name, you can use the --find-by-name flag. ...
Create pull requests descriptions using Aider and OpenRouter
In order to reduce the amount of time I spend on writing pull request instructions, I’ve been using Aider with OpenRouter to generate them. Requirements OpenRouter key Aider .env file with OPENROUTER_API_KEY variable How does it work? Aider is a tool that uses AI to help you write code. It’s a chatbot that can help you write code, fix bugs, and even write tests. OpenRouter is a tool that allows you to route requests to different APIs. In this case, we’ll use it to route the request to Aider. ...
Tailscale with NordVPN at the same time on GNU/Linux
By default, NordVPN does not allow users to connect to Tailscale. This is because NordVPN blocks Tailscale traffic. To solve this, you just need to execute the following commands: nordvpn whitelist add subnet 100.64.0.0/10 nordvpn whitelist add subnet fd7a:115c:a1e0::/48 nordvpn whitelist add port 41641 Then, restart the NordVPN connection: nordvpn d nordvpn c US Finally, if you are not connected to Tailscale, then connect to Tailscale: sudo tailscale up --accept-routes --shields-up