Skip to content

Instantly share code, notes, and snippets.

Set salt
- When
1: when the user logs in
2: When the user changes their secret word
- Process
This is the process whereby combination of the secret word and salt along with a generated challenge is stored for later use.
Generate secret challenge
- When
```secured-async-storage```
# Set salt
**When**
1: when the user logs in
2: When the user changes their secret word

secured-async-storage

Set salt

When

1: when the user logs in

2: When the user changes their secret word

@kyle-ssg
kyle-ssg / gist:be6c93273aa4304331713be240ab8225
Created February 16, 2018 10:30
Node Twitter List Follower
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),
@kyle-ssg
kyle-ssg / gist:ddcc0255d5dd66ce572394042282c87d
Created February 16, 2018 10:30
Node Twitter List Follower
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),
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()
// 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',
// 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',
@kyle-ssg
kyle-ssg / MainApplication.java
Created November 16, 2019 10:49
Recording ReactMarker times in react native to track performance
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;
@kyle-ssg
kyle-ssg / bullet-train-deno.js
Last active February 2, 2020 20:45
Trying out deno with Bullet Train
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 {