Skip to content

Instantly share code, notes, and snippets.

View jimmidyson's full-sized avatar

Jimmi Dyson jimmidyson

View GitHub Profile
@fernandohu
fernandohu / Reading configuration files before application startup in Angular2 final release.md
Last active May 8, 2023 16:40
Reading configuration files before application startup in Angular2 final release

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'.

@jimmidyson
jimmidyson / 0_download_openshift.sh
Last active August 29, 2015 14:21
OpenShift Fabric8 start scripts
#!/bin/bash
curl -L https://github.com/openshift/origin/releases/download/v0.5.1/openshift-origin-v0.5.1-ce1e6c4-linux-amd64.tar.gz | tar xzv
#!/bin/bash
for user in "$@"
do
echo "Adding ${user}"
useradd -m ${user}
mkdir /home/${user}/.ssh
curl https://github.com/${user}.keys >> /home/${user}/.ssh/authorized_keys
chmod 700 /home/${user}/.ssh
chmod 600 /home/${user}/.ssh/authorized_keys

Keybase proof

I hereby claim:

  • I am jimmidyson on github.
  • I am jimmidyson (https://keybase.io/jimmidyson) on keybase.
  • I have a public key whose fingerprint is 5E87 7349 6DCB FB12 0E38 4322 2863 494B 281B E805

To claim this, I am signing this object: