Skip to content

Instantly share code, notes, and snippets.

@ridingwolf
Created December 27, 2017 14:45
Show Gist options
  • Select an option

  • Save ridingwolf/f8cd885c31bdef4a9be29ae8f27461a9 to your computer and use it in GitHub Desktop.

Select an option

Save ridingwolf/f8cd885c31bdef4a9be29ae8f27461a9 to your computer and use it in GitHub Desktop.
React native helpers
function shake -d "shake connected mobile device"
# android, add ios at some point if possible
for deviceInfo in (adb devices -l)
set device (string split " " $deviceInfo)[1]
if [ $device ]; and not string match -a -i -q "list" $device
echo "shaking: $deviceInfo"
adb -s $device shell input keyevent 82
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment