Skip to content

Instantly share code, notes, and snippets.

View mraible's full-sized avatar

Matt Raible mraible

View GitHub Profile
@mraible
mraible / clone.sh
Created January 18, 2023 17:21
Use JHipster's main branch
git clone https://github.com/jhipster/generator-jhipster.git --depth=1
cd generator-jhipster
npm i
npm link
@mraible
mraible / javaone-2022-jhipster.adoc
Last active October 17, 2022 09:53
JHipster at JavaOne 2022 Hackergarten
@mraible
mraible / mfr.sh
Last active April 3, 2022 01:49
Try JHipster's microfrontend support for React
npm install -g generator-jhipster@7.8
take ~/Downloads/mfr
jhipster jdl reactive-mf --fork # use --client-framework=angularX|vue for other frameworks
@mraible
mraible / pom.xml.patch
Last active March 23, 2022 05:54
JHipster modified for Java on M1
diff --git a/pom.xml b/pom.xml
index 7b8cffc..3640692 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,6 @@
<maven-compiler-plugin.version>3.9.0</maven-compiler-plugin.version>
<maven-javadoc-plugin.version>3.3.2</maven-javadoc-plugin.version>
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
- <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
http://www.slideshare.net/HubSpot/what-would-steve-do-10-lessons-from-the-worlds-most-captivating-presenters
1. Craft a story that captures both heart and mind.
Beginning - Middle - End
2. Create slides that lead your audience to say "YES!".
3. Start by telling us why we should care.
@mraible
mraible / App.test.js
Created November 24, 2020 15:21
App.test.js from CRA with Okta React 4.0.0
import React from 'react';
import ReactDOM from 'react-dom';
import { act } from 'react-dom/test-utils';
import App from './App';
jest.mock('@okta/okta-auth-js', () => {
return {
OktaAuth: jest.fn(() => {
return {
userAgent: 'okta/okta-auth-js',
@mraible
mraible / gist:498df295e7cd8d940e42b2004ab30a83
Created May 7, 2020 21:22
pack with Heroku static buildpack
$ pack build react-pack --builder=heroku/buildpacks --buildpack https://cnb-shim.herokuapp.com/v1/heroku-community/static
latest: Pulling from heroku/buildpacks
Digest: sha256:14c60798f3cf5bcbab867213add52d134af3aaad3064062cafb25177cd48f5ed
Status: Image is up to date for heroku/buildpacks:latest
18: Pulling from heroku/pack
Digest: sha256:a3cb71855f7e399ad079f6f0fa5feb6cc93446a332d9b8ef535ca9a17dac92cf
Status: Image is up to date for heroku/pack:18
Downloading from https://cnb-shim.herokuapp.com/v1/heroku-community/static
3.35 MB/3.35 MB
===> DETECTING
@mraible
mraible / Dockerfile
Created May 3, 2020 02:16
Dockerfile and nginx.conf that supports Angular's path-based routing
FROM node:14.1-alpine AS builder
WORKDIR /opt/web
COPY package.json package-lock.json ./
RUN npm install
ENV PATH="./node_modules/.bin:$PATH"
COPY . ./
RUN ng build --prod
@mraible
mraible / output.md
Created April 17, 2020 01:01
Spring Boot + OAuth 2.0 with Okta in 30 seconds
~ curl https://start.spring.io/starter.zip -d dependencies=web,okta -d baseDir=bootiful-oauth | tar -xzvf -
cd bootiful-oauth
mvn com.okta:okta-maven-plugin:setup
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 57642  100 57598  100    44  81123     61 --:--:-- --:--:-- --:--:-- 81071
x bootiful-oauth/
x bootiful-oauth/.mvn/
x bootiful-oauth/.mvn/wrapper/
@mraible
mraible / angular-size.md
Last active June 7, 2023 08:06
Angular App Size

Angular 8:

  • ES5: 62 + 683 + 6.2 + 176 + 8500
  • ES2015: 50 + 264 + 6.2 + 174 + 7100

With AOT:

  • ES5: 781 + 123 + 1.5 = 905.5
  • ES2015: 664 + 36 + 1.5 = 701.5