I know everyone hates Internet Explorer, and only use Internet Explorer to download Chrome or Firefox.

To avoid you further pain, this is a Powershell script that you can use to install Chrome without even touching IE. Enjoy! :-)

# Install Chrome
$Path = $env:TEMP; 
$Installer = "chrome_installer.exe"; 
Invoke-WebRequest "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer; 
Start-Process -FilePath $Path\$Installer -Args "/silent /install" -Verb RunAs -Wait; 
Remove-Item $Path\$Installer

Quick tip:

I hate having my pictures automatically named like IMG_0384.CR2, because during backups (moving around hard drives, cloud, etc) it happens that I lose the original date of the files. And although I group pictures in folders, it’s still sometimes easy to lost the original date.

So I just created (well, I copied from others but made some adjustments) this helpful Powershell script, which will stamp the filenames with the date when the picture was taken.

# Based on https://ss64.com/ps/syntax-stampme.html
# usage: PS C:\>./stampme.ps1 "F:\somepicture.png"
# usage: PS C:\> foreach ($file in get-ChildItem *.CR2) { ./stampme.ps1 $file.name }


#StampMe.ps1
param( [string] $fileName)

# Check the file exists
if (-not(Test-Path $fileName)) {break}

# Display the original name
"Original filename: $fileName"

$fileObj = get-item $fileName

# https://stackoverflow.com/questions/6834259/how-can-i-get-programmatic-access-to-the-date-taken-field-of-an-image-or-video
try {


  $pic = New-Object System.Drawing.Bitmap($fileName)
  $bitearr = $pic.GetPropertyItem(36867).Value 
  $string = [System.Text.Encoding]::ASCII.GetString($bitearr) 
  $DateTime = [datetime]::ParseExact($string,"yyyy:MM:dd HH:mm:ss`0",$Null)
}
catch 
{
  $DateTime =  (Get-Item $fileName).LastWriteTime
}

# Get the date
#$DateStamp = get-date -uformat "%Y-%m-%d_%H%M%S"
$DateStamp = $DateTime.ToString("yyyy-MM-dd_HHmmss")

$extOnly = $fileObj.extension

if ($extOnly.length -eq 0) {
   $nameOnly = $fileObj.Name
   rename-item "$fileObj" "$DateStamp-$nameOnly"
   }
else {
   $nameOnly = $fileObj.Name.Replace( $fileObj.Extension,'')
   rename-item "$fileName" "$DateStamp-$nameOnly$extOnly"
   }

# Display the new name
"New filename: $DateStamp-$nameOnly$extOnly"

Look how my pictures were badly organized before:

And look how they are much more beautiful now:

Enjoy!

Much better, uh? :-)

After many years using (and enjoying) Git, I had to start using Subversion again on a daily basis.

Git treats ignores on a regular file (.gitignore, whose rules are applied both to the same folder and to all subfolders), while Subversion treats ignores as an svn:property, which makes it harder to add new filemasks to the ignore list.

Using TortoiseSvn you can just click on the “add to ignore list”, but on command line you don’t have that.

This PowerShell function helps you on that. It will extract the svn:ignore property on any folder, include a new pattern to the list of ignores, and update the property. Enjoy!

function Svn-Add-Ignore
{
   param(
     [Parameter(Position=0,mandatory=$true)]
     [string] $folder,
     [Parameter(Position=1,mandatory=$true)]
     [string] $filemask
   )

   if (( Test-Path $folder) -eq $False)
   {
       Write-Host "Path $folder not found" -for red
       Exit 1
   }
   
   $ignores = (svn propget svn:ignore $folder)
   if($ignores)
   {
      $ignores = ($ignores -join "`n" | Out-String).Trim()   # convert multiple lines to single multiline string
      $ignores = $ignores + "`n" + $filemask
   }
   else
   {
      $ignores = $filemask
   }
   svn propset svn:ignore $ignores $folder
}

Sample usage:

Svn-Add-Ignore .\ "bin"
Svn-Add-Ignore .\ "obj"
Svn-Add-Ignore .\ ".vs"
Svn-Add-Ignore .\ "*.user"