Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Working on @m8finder

Marvin Heilemann muuvmuuv

💻
Working on @m8finder
View GitHub Profile
@muuvmuuv
muuvmuuv / hide-angular-component.ts
Last active Jun 10, 2021
Hide Angular element from dom with Angular animations
View hide-angular-component.ts
@Component({
animations: [
trigger('visible', [
state(
'false',
style({
height: '0',
display: 'none',
})
),
@muuvmuuv
muuvmuuv / cypress-plugin-use-puppeteer.js
Last active Jun 10, 2021
Use puppeteer browser with Cypress to avoid installing browsers on your system yourself or in CI
View cypress-plugin-use-puppeteer.js
const puppeteer = require('puppeteer')
/**
* Because no browsers are bundled with Cypress we will use the already installed
* puppeteer binary that we use for Karma. This function returns information
* about the latest downloaded binary for Chrome by Puppeteer. It works for now
* but might throw errors in future, it is a workaround not a plugin.
*
* @see https://docs.cypress.io/guides/guides/launching-browsers.html#Customize-available-browsers
*/
@muuvmuuv
muuvmuuv / nginx-brotli.Dockerfile
Last active Jun 10, 2021
Dockerfile which compiles brotli from source
View nginx-brotli.Dockerfile
ARG version
ARG timezone=Europe/Berlin
ARG modules_dir="/usr/lib/nginx/modules"
################################################################
# BUILDER
#
# Compile brotli and zstd from source to use it in a standard
# NGINX image container.
@muuvmuuv
muuvmuuv / angular-example-data.ts
Last active Jul 5, 2021
Prepare your Angular application with example data without deploying it to production
View angular-example-data.ts
import { Storage } from '@capacitor/storage'
import * as ME from 'src/data/me.json'
import { STORAGE_KEY_ME_DATA } from './app/models/auth'
/**
* Prepare the application for development by pushing some example
* data into the cache. See {@link main.ts} for implementation details.
*/