Skip to content

Instantly share code, notes, and snippets.

@pbalan
pbalan / localhost-ssl-certificate.md
Created June 29, 2023 02:00 — forked from ethicka/localhost-ssl-certificate.md
Localhost SSL Certificate on Mac OS

🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!


This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

<?php
namespace App\Exceptions;
use Exception;
use Nuwave\Lighthouse\Exceptions\RendersErrorsExtensions;
class GraphQLException extends Exception implements RendersErrorsExtensions
{
/**
@pbalan
pbalan / loopback-context-issue.js
Created March 7, 2018 09:49
Context data gets lost when changing database
Model.observe('before save', (ctx, next) => {
const promises = [];
let userId = null;
if (undefined !== ctx.options.accessToken) {
userId = ctx.options.accessToken && ctx.options.accessToken.userId;
}
ctx.hookState.relations = {};
/* istanbul ignore if */
/* istanbul ignore else */
@pbalan
pbalan / npm-debug.log
Created February 28, 2018 11:27
npm scope package install error
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using npm@5.3.0
3 info using node@v8.9.4
4 verbose npm-session 13addf517d0a8cc2
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall @weflex/studio-web@1.32.1
7 info lifecycle @weflex/studio-web@1.32.1~preinstall: @weflex/studio-web@1.32.1
8 silly install loadCurrentTree
9 silly install readLocalPackageData