Skip to content

Instantly share code, notes, and snippets.

View cw6365's full-sized avatar
💭
Commercial software developer

Chris Ward cw6365

💭
Commercial software developer
View GitHub Profile
@steprobe
steprobe / vimspector-mocha.json
Last active January 6, 2024 14:24
Vimspector + mocha
...
"configuration": {
"request": "launch",
"name": "Debug mocha Test",
"type": "node",
"program": "${workspaceRoot}/node_modules/mocha/bin/mocha",
"env": {
"NODE_ENV": "test"
},
"args": [
@fernandoaleman
fernandoaleman / mysql2-m1.md
Last active February 11, 2025 21:06
How to install mysql2 gem on m1 Mac

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

@dmikey
dmikey / pkcs10Generator.js
Created June 25, 2021 17:26 — forked from tcd93/pkcs10Generator.js
Simple way to generate certificate signing request (CSR) with X.509 using Javascript
import * as asn1js from 'asn1js';
import { getCrypto, getAlgorithmParameters, CertificationRequest, AttributeTypeAndValue } from 'pkijs/build'
import { arrayBufferToString, toBase64 } from 'pvutils';
//https://github.com/PeculiarVentures/PKI.js/blob/31c10e9bb879cac59d710102adf4fd7bd61cd66c/src/CryptoEngine.js#L1300
const hashAlg = 'SHA-256'
const signAlg = 'ECDSA'
/**
* @example
* createPKCS10({ enrollmentID: 'user1', organizationUnit: 'Marketing', organization: 'Farmer Market', state: 'M', country: 'V' })