This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:math'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.local/bin/bashmarks.sh | |
source ~/.bashrc | |
source ~/.profile | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias pgs="phonegap serve" | |
alias vim="mvim --remote-tab-silent" | |
alias composer="php /usr/bin/composer.phar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<CompareWrapper> | |
{this.renderPlayers} | |
</CompareWrapper> | |
renderPlayers(playerIDs, addPlayer) { | |
return playerIDs.map((playerID) => | |
<PlayerWrapper id={playerID}> | |
{(player) => this.renderPlayer(player, addPlayer)} | |
</PlayerWrapper> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Link { | |
url: String! | |
description: String! | |
} | |
type Query { | |
allLinks: [Link] | |
} | |
schema { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@flow | |
import type { ComponentType } from 'react'; | |
import React from 'react'; | |
import styled from 'styled-components'; | |
type Align = 'flex-start' | 'flex-end' | 'center'; | |
type Props = { | |
align?: Align; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt_decode from 'jwt-decode'; | |
import { setTokens } from '../actions'; | |
import { SET_TOKEN, CLEAR_TOKEN } from '../actions/types'; | |
import * as api from '../api'; | |
const prefix = /^@REQUEST\//; | |
const refreshToken = (refresh_token, dispatch) => | |
api.refresh_token(refresh_token) //call refresh token api | |
.then(({ authToken, refreshToken }) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TextChanges extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
animation: new Animated.Value(0), | |
currentText: '', | |
oldText: '' | |
}; | |
} | |
startAnimation() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//let stepOptions = options.slice(0, options.length); | |
let stepOptions = options.map(({title}, i) => { title, index: [i] }); | |
stepOptions.splice(1, 0, { title: 'Best of Both', index: [0, 1] }); | |
{stepOptions.map((({title, index}), i) => <CheckBox label={title} key={i} value={this.isSelected(index)} onChange={() => onChange(index)} />)} | |
isSelected(index) { | |
const { value } = this.props; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test { | |
tokens$: Observable; | |
message$: Observable; | |
constructor() { | |
this.tokens = Observable.create((observer) => { | |
this.getToken(observer); | |
this.messaging.onTokenRefresh(() => this.getToken(observer)); | |
}); |
NewerOlder