This file contains hidden or 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
| { | |
| "vars": { | |
| "@gray-base": "#000", | |
| "@gray-darker": "lighten(@gray-base, 13.5%)", | |
| "@gray-dark": "lighten(@gray-base, 20%)", | |
| "@gray": "lighten(@gray-base, 33.5%)", | |
| "@gray-light": "lighten(@gray-base, 46.7%)", | |
| "@gray-lighter": "lighten(@gray-base, 93.5%)", | |
| "@brand-primary": "darken(#428bca, 6.5%)", | |
| "@brand-success": "#5cb85c", |
This file contains hidden or 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
| # Scroll Trigger | |
| scrollTrigger = (layer, source, start, overFunc, underFunc) -> | |
| # Setup | |
| layer.globalY = layer.convertPointToScreen().y | |
| layer.offsetStart = (layer.globalY+source.contentInset.top)-start | |
| # Checker | |
| triggerChecker = () -> | |
This file contains hidden or 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
| # Affordances | |
| affordances = [] | |
| createAffordances = (index) -> | |
| affordances[index].onMouseOver -> | |
| document.body.style.cursor = "pointer" | |
| affordances[index].onMouseOut -> | |
| document.body.style.cursor = "auto" | |
| for i in [0...affordances.length] |
This file contains hidden or 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 React, { Component } from 'react'; //import 'React' default export, and { Component } non-default export from react | |
| import fetch from 'isomorphic-fetch'; // isomorphic-fetch is used for both server side and client side 'fetch' (see https://github.com/matthew-andrews/isomorphic-fetch) | |
| // App.css was a hangover from the create-react-app, it's not really needed for this basic example | |
| const url = 'https://api.tfl.gov.uk/BikePoint'; // API | |
| class App extends Component { // This is the same as 'extends 'React.Component' |
This file contains hidden or 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 App extends React.Component { | |
| render() { | |
| return ( | |
| <ul> | |
| <Data /> | |
| </ul> | |
| ) | |
| } | |
| } |
This file contains hidden or 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
| // Refresh by executing the fuction every 45 seconds | |
| setInterval(() => this._fetchArrivalTimes(), 45000); |
This file contains hidden or 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
| git remote set-url origin NEWURL |
This file contains hidden or 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
| react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug | |
| cd android | |
| ./gradlew assembleDebug | |
| adb install -r ./app/build/outputs/apk/app-debug.apk |
This file contains hidden or 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
| sdk.dir = /Users/diegooriani/Library/Android/sdk |
This file contains hidden or 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 React from 'react' | |
| import styled from 'styled-components' | |
| const Tab = ({ onClick, isSelected, children }) => { | |
| const TabWrapper = styled.li` | |
| width: 48px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 20px; |
OlderNewer