Skip to content

Instantly share code, notes, and snippets.

@mrcunninghamz
mrcunninghamz / XLIFFtoLazyLoadResources.md
Last active January 22, 2024 08:47
XLIFF to lazy loaded resource files for i18next

Abstract

In the case you are given an XLIFF file from your translation service and would like to convert it to resource files that can be utilized by your javascript application utilizing i18next.

Notes

The following piece of javascript can be used as a build step for your node project. In my case it runs in a react application and is set to run with the command npm run build:resources by adding build:resources to the script secion of our project's package.json. This utilizes and follows file location conventions from the i18next-http-backend library.

Code

const fs = require('fs');
const xliff = require('xliff')
@mrcunninghamz
mrcunninghamz / SelfSignedCert.md
Last active May 11, 2024 04:17
Creating a self signed certificate in a pfx format on a mac.

Create Self Signed Certificate using OpenSSL on a Mac

Introduction

Every now and then I need to create a self signed certificate in azure for something. In my particular case its Azure B2C. I am using a mac so its not simply just running something like

New-SelfSignedCertificate `
    -KeyExportPolicy Exportable `
    -Subject "CN=yourappname.yourtenant.onmicrosoft.com" `
 -KeyAlgorithm RSA `