Skip to content

Instantly share code, notes, and snippets.

View wagneradrian's full-sized avatar

Adrian Wagner wagneradrian

View GitHub Profile
@wagneradrian
wagneradrian / cw-console-writeline-vscode-csharp.md
Created October 12, 2025 08:12
C# VS Code Shortcut for Console.WriteLine();

Those who use C# in VS Code can change the cw snippet from System.Console.WriteLine(); to Console.WriteLine(); by creating or overriding a custom snippet.

  1. Open Command PalettePreferences: Configure User Snippets
  2. Choose either C# (for project-only) or New Global Snippets file (for all projects).
  3. Add this snippet:
{
  "Console WriteLine": {
    "prefix": "cw",
 "body": ["Console.WriteLine($1);"],
@wagneradrian
wagneradrian / macOS_Overwrite_Modified_Date_with_Creation_Date.md
Created March 12, 2025 20:07
MacOS - Overwrite modified date with creation date
  1. Place all files where the modification date should be overwritten with the creation date in one folder.
  2. Open Terminal and navigate to the folder containing the files.
  3. Run the script below.
for file in *; do
    if [ -f "$file" ]; then
        creation_date=$(stat -f "%SB" -t "%m/%d/%Y %H:%M:%S" "$file")
        SetFile -m "$creation_date" "$file"
    fi
done
@wagneradrian
wagneradrian / yes-www.md
Created November 28, 2024 22:04
www or not

www is not deprecated

This page is intended for webmasters who are looking for information about whether or not to use www in their canonical website URLs.

First, a bit of terminology. The domain name without www is sometimes referred to as a naked domain, and I’ll refer to it as such here.

Why should you use www?

You should use www because today you have a small website, and tomorrow you want a big website. Really big.