Skip to content

Instantly share code, notes, and snippets.

Reading data before application startup in Angular 2

In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.

This is how the demonstration will load data:

a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';

b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.

@StephaneTrebel
StephaneTrebel / passgitgpg.md
Created January 3, 2023 14:53 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@StephaneTrebel
StephaneTrebel / 99-noto-mono-color-emoji.conf
Created November 10, 2023 14:33 — forked from yzhernand/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
This config seems to ensure that *all* monospace fonts are affected without breaking
<code> blocks elsewhere. The significant change appears to be setting binding="weak"
on line 22.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.