Skip to content

Instantly share code, notes, and snippets.

View petebacondarwin's full-sized avatar

Pete Bacon Darwin petebacondarwin

View GitHub Profile

Fetching from a Worker to a local self-signed HTTPS server

  • Certificate Authority
    • Generate a root key (provide a password):

      openssl genrsa -des3 -out rootCA.key 2048

    • Generate a root certificate

      openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 730 -out rootCert.pem

  • Server certificate
polyfills-es2017.11bc46ccab0394a024d2.js:1 A preload for 'https://next.angular.io/generated/navigation.json' is found, but is not used because the request headers do not match.
g @ polyfills-es2017.11bc46ccab0394a024d2.js:1
src_app_custom-elements_toc_toc_module_ts-es2017.1337522d0bd53e657011.js:1 Failed to load resource: the server responded with a status of 404 ()
main-es2017.b7522200ac5e9b2c76f8.js:1 ERROR Error: [DocViewer] Error preparing document 'guide/angular-compiler-options': ChunkLoadError: Loading chunk src_app_custom-elements_toc_toc_module_ts failed.
(error: https://next.angular.io/src_app_custom-elements_toc_toc_module_ts-es2017.1337522d0bd53e657011.js)
at Object.a.f.j (runtime-es2017.a003c870ae813ea3fd3e.js:1)
at runtime-es2017.a003c870ae813ea3fd3e.js:1
at Array.reduce (<anonymous>)
at Function.a.e (runtime-es2017.a003c870ae813ea3fd3e.js:1)
at loadChildren (main-es2017.b7522200ac5e9b2c76f8.js:1)
@petebacondarwin
petebacondarwin / gist:b645b4d374bd966f18ae008d56dde643
Created September 2, 2021 19:31
Cycles in common libraries
@alfresco/adf-core/esm2015/form/components/widgets/container/container.widget.js -> @alfresco/adf-core/esm2015/form/components/form-field/form-field.component.js -> @alfresco/adf-core/esm2015/form/services/form-rendering.service.js -> @alfresco/adf-core/esm2015/form/components/widgets/index.js -> @alfresco/adf-core/esm2015/form/components/widgets/container/container.widget.js
@alfresco/adf-core/esm2015/form/components/widgets/tabs/tabs.widget.js -> @alfresco/adf-core/esm2015/form/components/form-field/form-field.component.js -> @alfresco/adf-core/esm2015/form/services/form-rendering.service.js -> @alfresco/adf-core/esm2015/form/components/widgets/index.js -> @alfresco/adf-core/esm2015/form/components/widgets/tabs/tabs.widget.js
@covalent/core/esm2015/data-table/data-table.component.js -> @covalent/core/esm2015/data-table/data-table-column/data-table-column.component.js -> @covalent/core/esm2015/data-table/data-table.component.js
@delon/abc/esm2015/se/se-container.component.js -> @delon/abc/esm2015/se/se-title
@petebacondarwin
petebacondarwin / results.txt
Created February 5, 2018 21:33
Unhandled Exception Trimming
======================
Firefox on Android
======================
something terrible has happened. oh no. oh no.
[email protected]:31:29
[email protected]:12200:20
[email protected]
======================
Safari 11
======================
@petebacondarwin
petebacondarwin / app,component.ts
Created January 5, 2017 16:16
VS Code - Angular Language Service - transitive exports bug
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<h1>
{{title | bang}}
</h1>
`,
styles: []
<!DOCTYPE html>
<html ng-app="roydor">
<head>
<meta charset="utf-8" />
<title>AngularJS test</title>
<script src="angular.js"></script>
</head>
<body>
import {Modal} from './interfaces'
export interface MyModal extends Modal {
new(message: string): this
}
///////////
// obviously this is contrived because you are unlikely to want a singleton modal instance
angular.module('foo').value('myModalInstance', new MyModal('some message'));

@cheatsheetSection Class decorators @cheatsheetIndex 4 @description {@target ts js}import {Directive, ...} from 'angular2/angular2';{@endtarget} {@target dart}import 'package:angular2/angular2.dart';{@endtarget}

@cheatsheetItem syntax(ts js): `@Component({...})

@petebacondarwin
petebacondarwin / index.html
Created November 25, 2015 10:21
AngularJS issue 13374
<!DOCTYPE html>
<html>
<head>
<script src="https://code.angularjs.org/1.4.8/angular.js"></script>
<script type="text/javascript">
angular.module('app', [])
.run(function($http, $log) {
var _url = 'test.pdf';