Skip to content

Instantly share code, notes, and snippets.

@perunt
perunt / auto_scroll.sh
Created May 1, 2025 12:32 — forked from naqvitalha/auto_scroll.sh
Adb auto scroll
#!/bin/bash
# Continuous ADB Scroll Down Script with Speed Control
# Continuously swipes down a fixed distance until manually stopped (Ctrl+C).
# An optional speed multiplier can be provided as an argument.
# Usage: ./adb_scroll.sh [SPEED_MULTIPLIER]
#
# Arguments:
# SPEED_MULTIPLIER: Optional. Multiplier for swipe speed. Higher is faster (shorter duration). Default: 1
#
#!/bin/bash
# =============== CONFIGURATION ===============
APP_PACKAGE="com.expensify.chat.dev"
LOG_FILE="performance_log.csv"
# Test parameters
NUM_SCROLLS=65 # Number of regular scrolls DOWN
NUM_FAST_UP=25 # Number of rapid scrolls UP
NUM_FAST_DOWN=25 # Number of rapid scrolls DOWN
@perunt
perunt / bidirectional_list.txt
Last active December 13, 2023 16:32
Bidirectional list
import React, { useState, useRef } from 'react';
import { StyleSheet, View, Text, Button } from 'react-native';
import FlatList from '@components/FlatList/MVCPFlatList'
function App() {
const dat = generatePosts(5000)
const [data, setData] = useState(dat.slice(2000, 2100));
const loadNewerChats = () => {
@perunt
perunt / compareVersions.js
Last active November 22, 2021 15:16
compareVersions
/**
* Simply compares two string version values.
*
* Example:
* versionCompare('1.1', '1.2') => -1
* versionCompare('1.1', '1.1') => 0
* versionCompare('1.2', '1.1') => 1
* versionCompare('2.23.3', '2.22.3') => 1
*
* Returns:
Init-work
import React, {
useRef,
useMemo,
useState,
useCallback,
useEffect,
} from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';
import {
PanGestureHandler,
@perunt
perunt / .zshrs
Created June 14, 2019 08:20
.zshrs
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/apiko252/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@perunt
perunt / cloudSettings
Created March 15, 2019 13:23
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-03-15T13:14:13.486Z","extensionVersion":"v3.2.7"}