Skip to content

Instantly share code, notes, and snippets.

Ricardo Pedrosa ricardokdz

Block or report user

Report or block ricardokdz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:34505a57f88d3e5d4706a40e34e15a32
{
"amount": "300",
"currency": "BRL",
"on_behalf_of": "{{SELLER_ID}}",
"customer": "{{BUYER_ID}}",
"payment_type": "boleto",
"payment_method": {
"expiration_date": "{{BOLETO_EXPIRATION_DATE}}",
"billing_instructions": {
"late_fee": {
View gist:dace165c1755eff2a60ddb8e82b5c005
swagger: '2.0'
host: api.zoop.ws
info:
title: Objetos Base
version: "1.1"
securityDefinitions:
basicAuth:
type: basic
security:
View gist:cefe5ec84b75abb33409ded11d7ffe8d
TransactionResponse:
type: object
properties:
id:
type: string
example: 0009462369b14ee596aabfd27faa97f7
status:
type: string
enum:
- new
View component
import React, {Component} from 'react'
import {View, Text, Alert, Button as ReactButton} from 'react-native'
import {Container, Content, Form, Item, Input, Label, Button, Spinner} from 'native-base'
import {bindActionCreators} from 'redux'
import {connect} from 'react-redux'
import {loginByEmail, loginByFacebook} from '../actions/auth'
import {pushSubscribe} from '../actions/device'
// styles
View auth
import apiRegister from '../api/register'
import apiLogin from '../api/login'
import apiLoginFacebook from '../api/login-facebook'
import apiLogout from '../api/logout'
import apiGetUser from '../api/get-user'
import apiPasswordRecovery from '../api/password-recovery'
import apiUpdateUser from '../api/update-user'
import apiSaveAvatar from '../api/save-avatar'
import store from '../store'
View app
import React, {Component} from 'react'
import {View, Text} from 'react-native'
import {Provider} from 'react-redux'
import store from './store'
import SplashScreen from 'react-native-splash-screen'
import push from './push'
import {NavigationActions} from 'react-navigation'
import {createRootNavigator} from './RouterNavigation'
View store
import {AsyncStorage} from 'react-native'
import {compose, createStore, applyMiddleware} from 'redux'
import {reactReduxFirebase, firebaseStateReducer} from 'react-redux-firebase'
import {Provider} from 'react-redux'
import ReduxThunk from 'redux-thunk'
import promiseMiddleware from 'redux-promise'
import {createLogger} from 'redux-logger'
import {getStoredState, persistStore, autoRehydrate} from 'redux-persist'
import reducers from './reducers'
View teste.js
class Home extends Component {
render(){
const Buses = this.props.home.buses.map((b) => {
return (
<MapView.Marker
title={b.title}
description={b.route}
key={b.id}
coordinate={{
latitude: parseFloat(b.latitude),
View gist:a2c96b55b00e9b5a118f7f58adee5a9b
class Register extends Component {
constructor(props){
super(props)
this.state = {}
}
handleSubmit(){
const {name, email} = this.state
this.props.register(name, email)
View seed
Card.create!([
{user_id: 1, card_brand: "mastercard", card_number: "1234-1234-1234-1234", card_expiration_date: "07/2018", card_cvv: "321"}
])
Bus.create!([
{company_id: 1, code: "D0001", plate: "KYH6182", carrying_capacity: 10, station_id: nil},
{company_id: 2, code: "P2017", plate: "KOA3006", carrying_capacity: 50, station_id: nil}
])
Company.create!([
{name: "Expresso Recreio"},
{name: "Ideal"}
You can’t perform that action at this time.