Skip to content

Instantly share code, notes, and snippets.

View hypery2k's full-sized avatar
🎯
Focusing

Martin Reinhardt hypery2k

🎯
Focusing
View GitHub Profile
@hypery2k
hypery2k / Gruntfile.js
Last active August 29, 2015 14:05
ngJEE - app sceleton
'use strict';
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
grunt.loadNpmTasks('grunt-bower-task');
grunt.initConfig({
bower: {
install: {
#galen|spec|v2
# in the new spec lang v2 everything will be done based on indentation
# All sections will have their own structure
#
# Also we will get rid of '@@' symbols for importing, conditions, rules etc.
#
objects (
login-button .login-button
@hypery2k
hypery2k / nice.css
Last active August 29, 2015 14:16
qs_jenkins
.col-xlg-20 {
width: 100%;
}
#main-panel {
width: 100% !important;
}
#!/usr/bin/env node
// clean a specific dir recursivly
// e.g. clean_dir.js ./tmp
var args = process.argv.slice(2),
fs = require('fs'),
dir = args[0];
var deleteFolderRecursive = function(path) {
if( fs.existsSync(path) ) {
@hypery2k
hypery2k / todo-app.component.css
Last active December 16, 2016 11:06
Angular 2 Workshop
hr {
margin: 20px 0;
border: 0;
border-top: 1px dashed #c5c5c5;
border-bottom: 1px dashed #f7f7f7;
}
.learn a {
font-weight: normal;
text-decoration: none;
@hypery2k
hypery2k / keybase.md
Created February 10, 2017 06:42
keybase.md

Keybase proof

I hereby claim:

  • I am hypery2k on github.
  • I am hyper2k (https://keybase.io/hyper2k) on keybase.
  • I have a public key whose fingerprint is 88EF 4441 51FB CEFD 450B 4DA7 8399 7039 462E AFB2

To claim this, I am signing this object:

$('<style>.vis-background,.vis-labelset,.vis-timeline{overflow:hidden}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper::after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-conf
@hypery2k
hypery2k / INSTALL
Created February 7, 2018 14:56
letsencrypt role @ AppAgile
oc create -f letsencrypt-clusterrole.yaml
oc adm policy add-cluster-role-to-user letsencrypt system:serviceaccount:bdkinfrastructure:letsencrypt
oc adm policy add-cluster-role-to-user letsencrypt system:serviceaccount:bdk-fo-dev:letsencrypt
// or maybe cluster-wide for our projects if possible
@hypery2k
hypery2k / rhsso-on-openshift.sh
Created February 22, 2018 14:20 — forked from jpkrohling/rhsso-on-openshift.sh
Red Hat SSO on OpenShift
SECRETS_KEYSTORE_PASSWORD=$(openssl rand -base64 512 | tr -dc A-Z-a-z-0-9 | head -c 17)
oc cluster up --version=latest
oc login -u system:admin
oc new-project redhat-sso
oc create serviceaccount sso-service-account
oc policy add-role-to-user view system:serviceaccount:redhat-sso:sso-service-account
oc create -n openshift -f https://raw.githubusercontent.com/jboss-openshift/application-templates/ose-v1.3.7/jboss-image-streams.json
for template in sso71-https.json \
sso71-mysql-persistent.json \
@hypery2k
hypery2k / RxJS.md
Last active October 27, 2021 13:51
Angular Code Review

Subscribing to Multiple Observables in Angular Components

Angular applications heavily rely on RxJS Observables. While building large front end apps with these technologies we quickly will need to learn how to manage subscribing to multiple Observables in our components. In this post we are going to cover five different ways to subscribe to multiple Observables and the pros and cons of each.

Observables

In our component, we will have three Observables. Each Observable has slightly different behavior. The first Observable emits a single value immediately. The second Observable emits a single value after a couple of seconds. The third Observable emits multiple values one value every second. Below are some functions that return the Observables that we will use in our components.

import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';