Posts

Convert SQL Server Varbinary to Byte Array

I had a need to convert the HEX output from SQL Server Management Studio's Results to Grid output of a varbinary column  back to the byte array of the file it represented. I couldn't find an all-in-one script online, so I thought I'd create this C# gist. (original parse script here ) https://gist.github.com/aaronhoffman/ad16b27d14e2f5d7e16c Hope this helps, Aaron

PowerShell - List File Line Count For Files in a Directory that Match a Given Pattern

I had a need to get the total count of all lines, for a given set of .csv files. For example, there are 5 files each with 1000 lines, I wanted a script that would output: 1000, 1000, 1000, 1000, 1000. I could not find a script or command to do this, so I wrote one in PowerShell. Enjoy List File Line Count For Files in a Directory that Match a Given Pattern https://gist.github.com/aaronhoffman/416b88e64b970c4c9cb4 hope this helps, Aaron

Always Open Google Chrome with Default User Active from Taskbar

Image
Users in Google Chrome are great. I wish every browser had a similar feature. If you have multiple browser windows open at once running different users (one for work email, one for personal, for example) a downside is that whichever browser window you close last will be the User that is used when you open Chrome again. However, by modifying the taskbar shortcut you can override this functionality and always have your "Default" user be used. Right click on the Google Chrome taskbar icon, then right click on the "Google Chrome" entry in the popup menu. (Apparently Windows Print Screen does not work if the taskbar is active, so I had to take a picture on my phone...) In the Google Chrome Properties shortcut settings window that appears, append `  --profile-directory="Default" ` to the end of the Target value. And that's it. Now when this shortcut is used Google Chrome should open using the default profile no matter which User was associa