Skip to content

Instantly share code, notes, and snippets.

View amaankulshreshtha's full-sized avatar
👨‍💻
Coding

Amaan Kulshreshtha amaankulshreshtha

👨‍💻
Coding
  • Accenture
  • Dubai, United Arab Emirates
View GitHub Profile
@vemarav
vemarav / scrollview_vs_flatlist_vs_recycler_list_view.md
Last active August 9, 2021 11:36
Comparison of react native ScrollView vs FlatList vs RecyclerListView

Memory consumed by FlatList and RecyclerListView is similar, RecyclerListView wins over UI glitches as for large data sets glitches may observed in FlatList

No ScrollView FlatList RecyclerListView
1 No Memory Management Automatic Memory Management Automatic Memory Management (Similar to FlatList)
2 Loads All content at once Loads content as window scrolled Loads content as window scrolled
3 Scroll position is not preserved if data refreshed Scroll position is not preserved if data refreshed Scroll is preserved if data refreshed
4 Observable frame drops Observable frame drops for large data sets (> 1500) No frame drops, Highly Performant
5 Trouble refreshing data Trouble refreshing data Easy to refresh/update data
6 Available in react native import {ScrollView} from 'react-native' Available in react native import {FlatList} from 'react-native' Available via third-party module ` import { RecyclerListView, DataProvider, LayoutProvider } from "r
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active April 16, 2024 14:43
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@yamadayuki
yamadayuki / SampleComponent.js
Created June 19, 2016 14:58
Use keyframes property with React using inline style
import React from 'react';
import injectStyle from './path/to/injectStyle';
export default class SampleComponent extends React.Component {
constructor(props) {
super(props);
const keyframesStyle = `
@-webkit-keyframes pulse {
0% { background-color: #fecd6d; }
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active March 31, 2024 11:57
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@niksumeiko
niksumeiko / handlebars.helpers.ifEquals.js
Created October 1, 2013 12:02
Handlebars.js templates engine custom IF condition helper. Allows to compare values one to each other like you are used to in programming.
// Compares first value to the second one allowing entering IF clouse if true.
// Otherwise entering ELSE clause if exist.
Handlebars.registerHelper('ifEquals', function(a, b, options) {
if (a === b) {
return options.fn(this);
}
return options.inverse(this);
});