Skip to content

Instantly share code, notes, and snippets.

import { AppState } from 'react-native';
import timeoutfix from './src/time-out-fix-util';
console.disableYellowBox = true;
class App extends Component {
async componentWillMount() {
timeoutfix();
@libersolis-dev
libersolis-dev / App.js
Last active March 10, 2019 18:47
App.js
import timeoutfix from './src/time-out-fix-util';
console.disableYellowBox = true;
class App extends Component {
async componentWillMount() {
timeoutfix();
}
// in your render method return what you normall would just make sure
// timeoutfix() is called in async componentWillMount()
import { AppState } from 'react-native';
import timeoutfix from './src/time-out-fix-util';
console.disableYellowBox = true;
class App extends Component {
async componentWillMount() {
timeoutfix();
import { AppState } from 'react-native';
import timeoutfix from './src/time-out-fix-util';
console.disableYellowBox = true;
class App extends Component {
async componentWillMount() {
timeoutfix();
@libersolis-dev
libersolis-dev / gist:93a99386e2681a0853e9c36385b8a7c8
Last active March 10, 2019 18:39
React Native timeoutfix.js
import { Platform, InteractionManager } from 'react-native';
const timeoutFix = () => {
const _setTimeout = global.setTimeout;
const _clearTimeout = global.clearTimeout;
const MAX_TIMER_DURATION_MS = 60 * 1000;
if (Platform.OS === 'android') {
const timerFix = {};
const runTask = (id, fn, ttl, args) => {
@libersolis-dev
libersolis-dev / randomNumberGenerator.js
Created January 3, 2018 20:46
JS recipe to generate random whole numbers in a specific range
function generateRandomInteger(min, max) {
return Math.floor((Math.random() * max) + min);
}
@libersolis-dev
libersolis-dev / PULL_REQUEST_TEMPLATE.md
Last active December 11, 2017 07:15
Basic Pull Request Template

Purpose

Testing Instructions

Style and Lint check list

Potential Issues and Resolutions

@libersolis-dev
libersolis-dev / 0_reuse_code.js
Created July 25, 2017 05:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@libersolis-dev
libersolis-dev / The Technical Interview Cheat Sheet.md
Created November 30, 2016 03:37 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.