(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.
| // Part of https://github.com/chris-rock/node-crypto-examples | |
| // Nodejs encryption of buffers | |
| var crypto = require('crypto'), | |
| algorithm = 'aes-256-ctr', | |
| password = 'd6F3Efeq'; | |
| var fs = require('fs'); | |
| var zlib = require('zlib'); |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| // App | |
| import { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'app', | |
| template: '<span>{{ sayHello() }}</span>', | |
| }) | |
| export class App { | |
| public name: string = 'John'; |
| import { Component, Input, AfterViewInit } from '@angular/core'; | |
| import { NgModel, DefaultValueAccessor, NgControl } from '@angular/forms'; | |
| import { Http, Headers, RequestOptions } from '@angular/http'; | |
| @Component({ | |
| selector: 'app-file-uploader', | |
| template: '<input type="file" (change)="updated($event);">', | |
| providers: [NgModel, DefaultValueAccessor] | |
| }) | |
| export class FileUploaderComponent implements AfterViewInit { |
Prerequisite: dnf install golang
geth with useraddgeth fast sync the blockchain, geth --fast --cache 1024geth --rpc as user geth and watch to see that the blockchain continues to sync properlygeth.service file (also in this gist) in /usr/lib/systemd/system//etc/systemd/system/multi-user.target.wants/geth.service to /usr/lib/systemd/system/geth.servicesystemctl enable geth followed by systemctl start geth| //you do not necessary need all of the following, i copy/pasted a piece from | |
| //one of my projects. | |
| var express = require('express'); | |
| var fs = require('fs'); | |
| var Busboy = require('busboy'); | |
| var mime = require('mime'); | |
| var https = require('https'); | |
| var querystring = require('querystring'); | |
| var router = express.Router(); |
| upload(files) { | |
| const config = { | |
| onUploadProgress: function(progressEvent) { | |
| var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
| console.log(percentCompleted) | |
| } | |
| } | |
| let data = new FormData() | |
| data.append('file', files[0]) |