yarn add react-native-configreact-native link react-native-config- Create
.envfiles for each configuration. Ex:.env.dev,.env.prod, etc Ex:
API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| import React, {useState} from 'react'; | |
| import {SafeAreaView, StyleSheet, View, Button} from 'react-native'; | |
| import { | |
| RTCView, | |
| mediaDevices, | |
| MediaStream, | |
| MediaStreamConstraints, | |
| RTCPeerConnection, | |
| } from 'react-native-webrtc'; |
| |=-----------------------------------------------------------------------=| | |
| |=-------------=[ 3 Years of Attacking JavaScript Engines ]=-------------=| | |
| |=-----------------------------------------------------------------------=| | |
| |=------------------------------=[ saelo ]=------------------------------=| | |
| |=-----------------------------------------------------------------------=| | |
| The following are some brief notes about the changes that have taken place | |
| since the release of the "Attacking JavaScript Engines" paper [1]. In | |
| general, no big conceptional changes have happened since. Mitigations have | |
| been added to break some of the presented techniques and, as expected, a |
| /* | |
| * Polyfill for createImageBitmap | |
| * https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap | |
| * | |
| * Supports CanvasImageSource (img, video, canvas) sources, Blobs, and ImageData. | |
| * | |
| * From: | |
| * - https://dev.to/nektro/createimagebitmap-polyfill-for-safari-and-edge-228 | |
| * - https://gist.github.com/MonsieurV/fb640c29084c171b4444184858a91bc7 | |
| * Updated by: |
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var elements = document.body.getElementsByTagName('*'); | |
| var items = []; | |
| for (var i = 0; i < elements.length; i++) { | |
| if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
| items.push(elements[i]); | |
| } | |
| } |
| import React, { Component } from "react"; | |
| import { Dimensions, Animated, Text, View } from "react-native"; | |
| const { height, width } = Dimensions.get("window"); | |
| export default class ListItem extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.show = new Animated.Value(0); | |
| } | |
| componentDidMount() { |
| # Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
| # GitLab uses docker in the background, so we need to specify the | |
| # image versions. This is useful because we're freely to use | |
| # multiple node versions to work with it. They come from the docker | |
| # repo. | |
| # Uses NodeJS V 9.4.0 | |
| image: node:9.4.0 | |
| # And to cache them as well. |
| 'use strict'; | |
| const AWS = require('aws-sdk'); | |
| const S3 = new AWS.S3({ | |
| signatureVersion: 'v4', | |
| }); | |
| const sharp = require('sharp'); | |
| const BUCKET = process.env.BUCKET ? process.env.BUCKET : "mybucket"; | |
| const URL = process.env.URL ? process.env.URL : "http://localhost:5858"; // for local development |
yarn add react-native-configreact-native link react-native-config.env files for each configuration. Ex: .env.dev, .env.prod, etc
Ex:API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| # Docker-in-Docker Gitlab runners setup taken from: | |
| # https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca | |
| dind: | |
| restart: always | |
| privileged: true | |
| volumes: | |
| - /var/lib/docker | |
| image: docker:17.09.0-ce-dind | |
| command: | |
| - --storage-driver=overlay2 |
| /* @flow */ | |
| import React, { PureComponent } from 'react'; | |
| import { TouchableHighlight, Image, Dimensions } from 'react-native'; | |
| const { width }: { width: number } = Dimensions.get('window'); | |
| type node = { node: { image: { uri: string } } }; | |
| type State = {}; | |
| type Props = { | |
| item: node, |