Skip to content

Instantly share code, notes, and snippets.

View krishtoautomate's full-sized avatar

krishtoautomate krishtoautomate

View GitHub Profile
@insidegui
insidegui / devicectl.sh
Created October 19, 2023 21:58
Helper functions for using devicectl to kill processes on connected iOS devices
# Add to your zsh profile
function devicepid() {
if [ -z "$1" ]; then
echo "Usage: devicepid <device-name> <search>"
echo "Example: devicepid 'iPhone 15 Pro Max' SpringBoard"
return 1
fi
if [ -z "$2" ]; then
@biwkf
biwkf / gist:b0ebb9940e6341ed5e588f148b4381a8
Created February 27, 2019 15:10
Automating deeplinks with Appium on iOS real device
/* On a real device it is not possible to simply call driver.get("url"), doing so will open SIRI and query with "url" resulting in a search.
Instead we can take advantage of Safari's launch parameters and pass deep link URL as argument.
Below is an example: */
String deepLinkURL = "deeplink://";
driver.executeScript("mobile: terminateApp", ImmutableMap.of("bundleId", "com.apple.mobilesafari"));
List args = new ArrayList();
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@serhatbolsu
serhatbolsu / gist:40ca473991232c578173
Created July 9, 2015 08:13
Grid Capability Matcher for Appium deviceName
package qualify.appium;
import org.openqa.grid.internal.utils.DefaultCapabilityMatcher;
import java.util.Map;
/**
* This class is for nodes to determine Capability Matching using deviceName.
* For Capability Matcher change:
* - java -jar QualifyMatcher.jar -role hub -capabilityMatcher qualify.appium.QualifyMatcher