Skip to content

Instantly share code, notes, and snippets.

View dmnkgrc's full-sized avatar

Dominik Garcia dmnkgrc

  • Getsafe Digital GmbH
  • Germany
View GitHub Profile
@dmnkgrc
dmnkgrc / getsafe_fe.yaml
Last active August 2, 2023 08:26
Getsafe FE setup
name: "Getsafe FE setup"
description: "Sets up tools needed to get started working in FE projects"
steps:
- description: "Install Node related packages"
run:
- brew: fnm yarn
- description: Install development tools
run:
- brew: git gh
- description: "Install 1Password CLI"
@dmnkgrc
dmnkgrc / web-app.yaml
Created July 22, 2023 19:37
Web App setup
name: "Web app setup"
description: "Setup requiredto run web apps"
steps:
- description: "Install Node and Yarn"
run:
- brew: fnm yarn
- description: Install development tools
run:
- brew: git gh
- description: "Install 1Password CLI"
[{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80995,"tid":29955,"ts":0},
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80987,"tid":259,"ts":0},
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80998,"tid":259,"ts":0},
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80987,"tid":25859,"ts":0},
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80995,"tid":259,"ts":0},
{"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80998,"tid":16131,"ts":0},
{"args":{"name":"DedicatedWorker thread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80998,"tid":72995,"ts":0},
{"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":80998,"tid":13571,"ts":0},
{"args":{"name":"CompositorTileWorker2"},"cat":"__metadata","name":"thread_name","ph":"M","
@dmnkgrc
dmnkgrc / SplashScreen.js
Created March 22, 2021 17:11
The Splash Screen component
const Splashscreen = (props) => {
const [hasAnimationPlayedOnce, setHasAnimationPlayedOnce] = React.useState(false)
// We only want to hide the Splash Screen after it has played at least once
const handleAnimationFinish = () => {
setHasAnimationPlayedOnce(true)
}
const isModalVisible = !(props.isAppInitialized && hasAnimationPlayedOnce)
@dmnkgrc
dmnkgrc / Init.js
Created March 22, 2021 17:04
The screen rendered behind the modal
const Init = (props: Props) => {
const { navigation, dispatch } = props
React.useEffect(() => {
dispatch(appInitService.initApp(navigation))
}, [dispatch, navigation])
return null
}
@dmnkgrc
dmnkgrc / App.js
Created March 22, 2021 16:59
Example App.js file for Splash Screen animation
<AppProviders>
<Splashscreen />
<AppWithNavigationState />
</AppProviders>
local claims = {
email_verified: true
} + std.extVar('claims');
local groups = std.extVar('groups');
{
identity: {
traits: {
[if "email" in claims then "email" else null]: claims.email,
local claims = {
email_verified: true
} + std.extVar('claims');
{
identity: {
traits: {
[if "email" in claims then "email" else null]: claims.email,
[if "name" in claims then "name" else null]: claims.name,
[if "picture" in claims then "picture" else null]: claims.picture
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"description": "The user's email address.",
{
"title": "Person",
"type": "object",
"properties": {
"email": {
"description": "The user's email address.",
"type": "string",
"format": "email",
"title": "E-Mail",
"ory.sh/kratos": {