Skip to content

Instantly share code, notes, and snippets.

View 8naf's full-sized avatar
🐉
sleepy

Mai Anh Khoa 8naf

🐉
sleepy
View GitHub Profile
@8naf
8naf / grpc-http-status-mapper.ts
Created August 8, 2023 13:38
Map status from GRPC to HTTP for NestJS
import { status as GrpcStatus } from '@grpc/grpc-js';
import { HttpStatus } from '@nestjs/common';
// REF: https://cloud.google.com/apis/design/errors#handling_errors
const httpCodeMapper = {
[GrpcStatus.OK]: HttpStatus.OK,
[GrpcStatus.INVALID_ARGUMENT]: HttpStatus.BAD_REQUEST,
[GrpcStatus.FAILED_PRECONDITION]: HttpStatus.BAD_REQUEST,
[GrpcStatus.OUT_OF_RANGE]: HttpStatus.BAD_REQUEST,
[GrpcStatus.UNAUTHENTICATED]: HttpStatus.UNAUTHORIZED,
@8naf
8naf / Remove Office 2016 Product Key.md
Last active August 8, 2023 13:33 — forked from giordanocardillo/README.MD
Remove Office 2016 Product Key
  1. Open a command prompt as Administrator
  2. In the command prompt, type the following:
  • Office 2016 (32-bit) on a 32-bit version of Windows

    cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

  • Office 2016 (32-bit) on a 64-bit version of Windows

    cscript "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" /dstatus

  • Office 2016 (64-bit) on a 64-bit version of Windows