View MMKV Test
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 { AsyncStorage } from "react-native"; | |
import MMKVStorage from 'react-native-mmkv-storage'; | |
var MMKVInstance; | |
const testObj = { | |
data: [ | |
{ | |
"_id": "5ef864ad075a9aa8d12f3d88", | |
"index": 0, | |
"guid": "b238c1fe-2dde-4a8a-be14-8343eb359d39", | |
"isActive": true, |
View Bullet Train Feature Flags V2.1.2
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
[ | |
{ | |
"description": "Whether to show the try it buttons", | |
"name": "try_it", | |
"type": "FLAG" | |
}, | |
{ | |
"description": "Allows for new user overrides UX", | |
"name": "improved_identity_overrides", |
View flags
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
[ | |
{ | |
"description": "Whether to show the try it buttons", | |
"name": "try_it", | |
"type": "FLAG" | |
}, | |
{ | |
"name": "segments", | |
"description": "Determines whether users can see the 'Segments' option in the navigation panel", | |
}, |
View App.js
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 React, {PureComponent} from 'react'; | |
import {Animated, View, StyleSheet, Text, Easing} from 'react-native'; | |
export default class App extends PureComponent { | |
static displayName = 'TheComponent'; | |
animatedValue = new Animated.Value(0); | |
render() { | |
// Coordinates of the parent View | |
const width = 50; |
View bullet-train-deno.js
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 fetch; | |
let AsyncStorage; | |
const BULLET_TRAIN_KEY = "BULLET_TRAIN_DB"; | |
const defaultAPI = 'https://api.bullet-train.io/api/v1/'; | |
const BulletTrain = class { | |
constructor(props) { | |
if (props.fetch) { | |
fetch = props.fetch; | |
} else { |
View MainApplication.java
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
package com.perf; | |
import android.app.Application; | |
import android.content.Context; | |
import com.facebook.react.PackageList; | |
import com.facebook.react.ReactApplication; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.soloader.SoLoader; | |
import java.lang.reflect.InvocationTargetException; |
View webpack.dev.config.js
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
// webpack.config.dev.js | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const path = require('path'); | |
const whitelabel = typeof process.env.WHITELABEL === 'undefined' ? false : process.env.WHITELABEL; | |
const styles = whitelabel ? path.join(__dirname, `../web/styles/whitelabel/${process.env.WHITELABEL}`) : path.join(__dirname, '../web/styles'); | |
module.exports = { | |
devtool: 'cheap-module-eval-source-map', | |
mode: 'development', |
View gist:8a4bcdc998738e719b71167736f4c1db
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
// webpack.config.dev.js | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const path = require('path'); | |
const whitelabel = typeof process.env.WHITELABEL === 'undefined' ? false : process.env.WHITELABEL; | |
const styles = whitelabel ? path.join(__dirname, `../web/styles/whitelabel/${process.env.WHITELABEL}`) : path.join(__dirname, '../web/styles'); | |
module.exports = { | |
devtool: 'cheap-module-eval-source-map', | |
mode: 'development', |
View Write data to Bluetooth Low Energy Devices
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 React, {Component, PropTypes} from 'react'; | |
import {BleManager} from 'react-native-ble-plx'; | |
const TheComponent = class extends Component { | |
displayName: 'TheComponent' | |
constructor(props, context) { | |
super(props, context); | |
this.state = {}; | |
this.manager = new BleManager() |
View gist:ddcc0255d5dd66ce572394042282c87d
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
const admin = require("firebase-admin"); | |
const Twit = require('twit') | |
const serviceAccount = require("./firebase-service-account.json"); | |
const config = require('../config').twitter; | |
const T = new Twit(config) | |
const _ = require('lodash'); | |
const SIMULATE = false; | |
console.log(JSON.stringify(config, null, 2)) | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), |
NewerOlder