(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package main | |
/** | |
* @website http://albulescu.ro | |
* @author Cosmin Albulescu <cosmin@albulescu.ro> | |
*/ | |
import ( | |
"bytes" | |
"fmt" |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"os" | |
"os/exec" | |
"strings" | |
) |
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
#!/bin/bash | |
# This script should have been runned by user (non root) | |
# In case of errors like cannot open display: | |
# 1. Change DISPLAY=:0 for actual working display | |
# 2. Check (and change) permissions of files and dirs in user home dir | |
# specialy when you run this script as root by accident | |
# sometimes dirs like .dconf may be owned as root. | |
# As result vino server will not run under user privileges |
const path = require('path'); | |
function trace(s) { | |
const orig = Error.prepareStackTrace; | |
Error.prepareStackTrace = (_, stack) => stack; | |
const err = new Error(); | |
Error.captureStackTrace(err, arguments.callee); | |
Error.prepareStackTrace = orig; | |
const callee = err.stack[0]; | |
process.stdout.write(`${path.relative(process.cwd(), callee.getFileName())}:${callee.getLineNumber()}: ${s}\n`); |
// NGRX Complete Tutorial Without Pain (Angular6 / RxJS6) | |
// https://medium.com/@andrew.kao/ngrx-complete-tutorial-without-pain-angular6-rxjs6-5511b8cb8dac | |
import { Injectable } from '@angular/core'; | |
import { CanActivate } from '@angular/router'; | |
import { Store, select } from '@ngrx/store'; | |
import { Observable } from 'rxjs'; | |
import { map, take } from 'rxjs/operators'; | |
import * as Auth from '(auth actions)'; | |
import * as fromTeam from '(team main reducer)'; |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
import { Injectable } from '@angular/core'; | |
import { Observable, Observer, Subscription } from 'rxjs'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class AsyncApiCallHelperService { |