Skip to content

Instantly share code, notes, and snippets.

View brentvatne's full-sized avatar
😶‍🌫️
☕️⚛️🏃‍♂️🐶🎸

Brent Vatne brentvatne

😶‍🌫️
☕️⚛️🏃‍♂️🐶🎸
View GitHub Profile
{
"ide": 2349,
"brentvatne": 1944,
"facebook-github-bot": 1355,
"vjeux": 1039,
"nicklockwood": 665,
"mkonicek": 593,
"sahrens": 570,
"amasad": 388,
"jaygarcia": 361,
@brentvatne
brentvatne / gist:403784fa668ae6124030
Created December 6, 2015 19:38
react native android apk
╭─ ~/Desktop/app-release ls -lR | grep '^-' | sort -k 5 -rn
-rwxr-xr-x@ 1 brent staff 4614240 23 Nov 17:11 libjsc.so
-rwxr-xr-x@ 1 brent staff 3884124 25 Nov 16:08 classes.dex
-rwxr-xr-x@ 1 brent staff 1910900 23 Nov 17:11 libjsc.so
-rwxr-xr-x@ 1 brent staff 1307892 23 Nov 17:11 libicu_common.so
-rwxr-xr-x@ 1 brent staff 988820 25 Nov 15:53 libgnustl_shared.so
-rwxr-xr-x@ 1 brent staff 922976 23 Nov 17:11 libicu_common.so
-rwxr-xr-x@ 1 brent staff 661132 25 Nov 15:53 libgnustl_shared.so
-rwxr-xr-x@ 1 brent staff 562556 23 Nov 17:11 libimagepipeline.so
-rwxr-xr-x@ 1 brent staff 316828 23 Nov 17:11 libimagepipeline.so
@brentvatne
brentvatne / contest.md
Last active February 18, 2024 21:08
React.js Conf Contest

React.js Conf tickets, everyone wants them but we only have space for 400 people, and that includes speakers, organizers and everyone’s proud parents and grandparents! If you are into speaking and have time before December 13th, you should submit a 30 minute talk or 5 minute lightning talk proposal. If you’re more into writing than speaking or coding, ReactJSNews is giving away 1 ticket for the best blog post submission. But you probably like programming, so React Native Newsletter & Exponent are giving away two tickets for the best React Native apps made with Exponent! Of course, if you like speaking, writing and programming you should do all of the above.

Details of the contest

  • You make an “app” and publish it to Exponent. You don’t have to open source it, but people
function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
@brentvatne
brentvatne / logs.markdown
Last active August 19, 2025 04:22
Logs for iOS / Android on your computer

Logs in iOS simulator

Option 1: Use GUI log

  1. In simulator, press ⌘ + / or go to Debug -> Open System Log.
  2. That's it.

Option 2: Open it in terminal

  1. Run instruments -s devices
/**
* Copyright 2015-present 650 Industries. All rights reserved.
*
* @providesModule FeedView
*/
'use strict';
var ListViewDataSource = require('ListViewDataSource');
var React = require('react-native');
var RCTScrollViewManager = require('NativeModules').ScrollViewManager;
/**
* @providesModule FeedView
*/
'use strict';
var InteractionManager = require('InteractionManager');
var LayoutAnimation = require('LayoutAnimation');
var ListViewDataSource = require('ListViewDataSource');
var RCTScrollViewManager = require('NativeModules').ScrollViewManager;
var React = require('React');
@brentvatne
brentvatne / SortableListView.js
Created February 1, 2016 05:31 — forked from deanmcpherson/SortableListView.js
React native drag and drop list view in progress
var React = require('react-native');
var {
ListView,
LayoutAnimation,
View,
Animated,
PanResponder,
TouchableWithoutFeedback
} = React;
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule WindowedListView
* @flow
*/
'use strict';
var React = require('React');
var ScrollView = require('ScrollView');
@brentvatne
brentvatne / ViewabilityHelper.js
Created February 9, 2016 21:52 — forked from sahrens/ViewabilityHelper.js
Helper class for WindowedListView
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule ViewabilityHelper
* @flow
*/
'use strict';
const ViewabilityConsts = {
VIEWABLE_PERCENT_THRESHOLD: 50,