(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.
use the build in sizes like @dimen/text_size_body_2_material
or style/TextAppearance.Material.Headline
.
Simple helper file for standard text sizes in material design. The sizes are provided by the material design documentation https://www.google.com/design/spec/style/typography.html#typography-roboto
1.3.1 |
//This command must occur after you create your tracker object and before you use any of the enhanced ecommerce specific functionality. | |
ga('require', 'ec'); |
/** | |
* RxJava2 and Retrofit 2.2.0 compatible factory, | |
* which wraps the {@link RxJava2CallAdapterFactory} and takes care of the error conversion. | |
* | |
* Based on: https://github.com/square/retrofit/issues/1102#issuecomment-241250796 | |
*/ | |
public class RxErrorHandlingCallAdapterFactory extends CallAdapter.Factory { | |
private final RxJava2CallAdapterFactory mOriginalCallAdapterFactory; | |
private RxErrorHandlingCallAdapterFactory() { |
/* | |
* Migration | |
*/ | |
'use strict'; | |
module.exports = { | |
up: function(queryInterface, Sequelize) { | |
return queryInterface.createTable('Users', { | |
firstName: { | |
type: Sequelize.STRING | |
}, |
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
// There are many complicated solutions out there. | |
// In fact, it's pretty easy to autoscale an image if you know the original dimensions. | |
// Otherwise, see Image.getSize. It should be easy to create a custom component that | |
// leverages Image.getSize to use this technique | |
// | |
import React, { Component } from 'react'; | |
import { StyleSheet, Image, View } from 'react-native'; | |
… // inside render() | |
<View style={styles.responsiveContainer}> |
'use strict'; | |
const AmqpClient = require('amqplib'); | |
const Promise = require('bluebird'); | |
const contentTypeJson = 'application/json'; | |
const contentEncoding = 'utf8'; | |
const config = { | |
exchanges: [ | |
{ name: 'A_COMMENT_CREATED', type: 'fanout' }, | |
{ name: 'A_COMMENT_DELETED', type: 'fanout' }, |