Skip to content

Instantly share code, notes, and snippets.

@ahmed-ansari
ahmed-ansari / docker-help.md
Created July 12, 2023 18:50 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@ahmed-ansari
ahmed-ansari / flatlist-hooks-pagination.js
Created March 9, 2023 15:23 — forked from diegorodriguesvieira/flatlist-hooks-pagination.js
React Native Flatlist hooks pagination example
import ActivityIndicator from '@components/ActivityIndicator';
import Box from '@components/Box';
import { useNavigation } from '@react-navigation/native';
import React, { useEffect, useState } from 'react';
import { FlatList, RefreshControl } from 'react-native';
import { useDispatch, useSelector } from 'react-redux';
import * as Ducks from '../../ducks';
import Item from '../components/Item';
const VIEWABILITY_CONFIG = {
@ahmed-ansari
ahmed-ansari / bitbucket-pipelines.yml
Created February 21, 2023 04:27
react-native-ci-cd-bitbucket
# ANDROID_BUILD_VERSION=30
# ANDROID_TOOLS_VERSION=30.0.3
# NODE_VERSION=14.x
image: reactnativecommunity/react-native-android:5.1
pipelines:
default:
- step:
name: Build Android
caches:
image: ravipoonia/fastlane-android:1.1
pipelines:
pull-requests:
develop:
- step:
name: "Build on docker and push to firebase using fastlane -DEV"
size: 2x
deployment: staging
caches:
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="redux-saga login example">
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.25/browser-polyfill.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.5/redux.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux-saga/1.1.3/redux-saga.umd.min.js"></script>
@ahmed-ansari
ahmed-ansari / withStorage.js
Created January 25, 2021 06:04 — forked from treyhuffine/withStorage.js
A higher-order component to access localStorage
import React from 'react';
const withStorage = (WrappedComponent) => {
class HOC extends React.Component {
state = {
localStorageAvailable: false,
};
componentDidMount() {
this.checkLocalStorageExists();