Skip to content

Instantly share code, notes, and snippets.

View glachancecmaisonneuve's full-sized avatar

Guillaume Lachance glachancecmaisonneuve

  • College de Maisonneuve
  • Montreal, QC
View GitHub Profile
@glachancecmaisonneuve
glachancecmaisonneuve / sha-1.js
Last active April 11, 2023 01:11 — forked from lusbuab/sha-1.js
Calculating SHA-1 in the Browser
async function sha1(str) {
const buffer = new TextEncoder("utf-8").encode(str);
const hash = await crypto.subtle.digest('SHA-1', buffer)
const hexCodes = [];
const view = new DataView(hash);
for (let i = 0; i < view.byteLength; i += 1) {
const byte = view.getUint8(i).toString(16).padStart(2, '0')
hexCodes.push(byte);
}
return hexCodes.join('');
@glachancecmaisonneuve
glachancecmaisonneuve / undef.md
Created March 12, 2019 22:27 — forked from hmemcpy/undef.md
Disabling Visual Studio Git Provider

Here's how to disable the package that is responsible for loading the Git source control support in Visual Studio. Use at your own risk!

  • Create a file called devenv.pkgundef and place it next to devenv.exe in you Visual Studio's Common7\IDE (you'll need elevation for this)
  • Add the following entries to the file:
[$RootKey$\Packages\{7fe30a77-37f9-4cf2-83dd-96b207028e1b}]
[$RootKey$\SourceControlProviders\{11b8e6d7-c08b-4385-b321-321078cdd1f8}]
  • Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration