How to recover lost Chrome bookmarks after sync

In the %userprofile%+AppData\Local\Google\Chrome\User Data\Default
folder in Windows, there is a file called Bookmarks -> replace it with the Bookmarks.bak or use windows file history function.

(Backup bookmarks.bak before as well)

More info here:
How can I restore bookmarks after sync – Google Product Forums

https://superuser.com/questions/480670/undo-google-sync-in-chrome

Productivity Tips for Visual Studio 2017

I’ve written a few blog posts thus far regarding Visual Studio 2017, so I thought I would take some time to discuss the features that were introduced in this latest version that might help your productivity, or that you just may find useful.

You’ll notice that the title of this post mentions that they are “secret”. This is because all of these features are disabled by default, so you’ll need to enable them, either locally (per project) or globally, to take advantage.

Source: “Secret” Productivity Tips for Visual Studio 2017 – CodeProject

How do I get NuGet to re-install/update all the packages in the packages.config?

Reinstall all packages in project:
Update-Package -reinstall -Project YourProjectName
Reinstall package “Antlr” in project:
Update-Package -reinstall Antlr -Project YourProjectName

See more here:

The following command will update all packages in every project to the latest version available from nuget.org.
Update-Package
You can also restrict this down to one project.
Update-Package -Project YourProjectName
If you want to reinstall the packages to the same versions as were previously installed then you can use the -reinstall argument with Update-Package command.
Update-Package -reinstall
You can also restrict this down to one project.
Update-Package -reinstall -Project YourProjectName
The -reinstall option will first uninstall and then install the package back again into a project.
Or, you can update the packages using the Manage Packages dialog.

Source: How do I get NuGet to install/update all the packages in the packages.config? – Stack Overflow

 

SourceTree very slow when switching repository tabs

My SourceTree GIT manager was freezing for 5-10 seconds when switching between repositories.

These commands fixed the issue:

$ git config --global core.preloadindex true
$ git config --global core.fscache true
$ git config --global gc.auto 256

Also in combination with adding GIT program folder and SourceTree program folder to excluded paths for Windows Defender (antivirus scanner). The switch between tabs is now instant.

Source: SourceTree very slow with many repositories

Chrome DevTools – Save updated js, html and css files to disk from Chrome

Set up persistent authoring in Chrome DevTools so you can both see your changes immediatedly and save those changes to disk.

Source: Set Up Persistence with DevTools Workspaces | Web Tools – Google Developers

Deleting Data in SQL Server with TRUNCATE vs DELETE commands

TRUNCATE TABLE is a statement that quickly deletes all records in a table by deallocating the data pages used by the table. This reduces the resource overhead of logging the deletions, as well as the number of locks acquired; however, it bypasses the transaction log, and the only record of the truncation in the transaction logs is the page deallocation. Records removed by the TRUNCATE TABLE statement cannot be restored. You cannot specify a WHERE clause in a TRUNCATE TABLE statement, it is all or nothing. The advantage to using TRUNCATE TABLE is that in addition to removing all rows from the table it resets the IDENTITY back to the SEED, and the deallocated pages are returned to the system for use in other areas.

In addition, TRUNCATE TABLE statements cannot be used for tables involved in replication or log shipping, since both depend on the transaction log to keep remote databases consistent.

TRUNCATE TABLE cannot used when a foreign key references the table to be truncated, since TRUNCATE statements do not fire triggers. This could result in inconsistent data because ON DELETE/UPDATE triggers would not fire. If all table rows need to be deleted and there is a foreign key referencing the table, you must drop the foreign key and then recreate it.

Source: Deleting Data in SQL Server with TRUNCATE vs DELETE commands

Simple tool for analyzing IIS logs

The IIS server logs looks something like this:

#Software: Microsoft Internet Information Services 8.0
 #Version: 1.0
 #Date: 2016-04-19 00:47:15
 #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken

This simple to use tool parses those logfiles and creates a html file that opens in the web browser and presents the data in a nice simple way complete with graphs.

Download “WebLog Expert Lite” for free.

Source: WebLog Expert Download

Setting custom background color on a web page in Chrome

“Care your eyes” – extension for Chrome:

Change a webpage’s background color to reseda or night mode to protect your eyes from intensity of white or other lightness color.

https://chrome.google.com/webstore/detail/care-your-eyes/fidmpnedniahpnkeomejhnepmbdamlhl

 

“Deluminate” – extension for Chrome:

Invert the brightness of the web without changing the colors! Useful as a night mode to darken most bright web sites (like Google), or just for making the web soothing black instead of glaring white. Similar to the “High Contrast” or “Hacker Vision” extensions, but tries not to ruin images by blowing out the contrast or changing the colors.

https://chrome.google.com/webstore/detail/deluminate/iebboopaeangfpceklajfohhbpkkfiaa