Skip to content

Instantly share code, notes, and snippets.

import { enableProdMode, NgZone } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { Router } from '@angular/router';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import singleSpaAngular from 'single-spa-angular';
import { singleSpaPropsSubject } from './single-spa/single-spa-props';
if (environment.production) {
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
import React from 'react'
import ReactDOM from 'react-dom'
import singleSpaReact from 'single-spa-react'
import { property } from 'lodash'
import setPublicPath from './set-public-path.js'
const reactLifecycles = singleSpaReact({
React,
ReactDOM,
loadRootComponent: () => import(/* webpackChunkName: "react-app" */'./App.js').then(property('default')),
FROM node:14.15 as build-deps
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
RUN yarn build
FROM nginx:1.12-alpine
COPY --from=build-deps /usr/src/app/build /usr/share/nginx/html
EXPOSE 80
const crypto = require('crypto');
// Encrypt a message with a secret key
const message = 'This is a secret message';
const secretKey = 'This is a secret key';
// Create a 256-bit cipher key and initialization vector
const cipherKey = crypto.createHash('sha256').update(secretKey).digest();
const iv = crypto.randomBytes(16);
@zinevych
zinevych / main.go
Created June 28, 2023 12:10
CRUD generated as output of Copilot X
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
type User struct {