Skip to content

Instantly share code, notes, and snippets.

@jineshqa
jineshqa / disable-swipe-tutorial.sh
Created September 12, 2024 05:30 — forked from kinwahlai/disable-swipe-tutorial.sh
Disable swipe tutorial for simulator (ios13 above)
#!/bin/bash
# This script archive 2 things here
# 1. boot the fresh simulator once, so we can reduce the boot time in UI test
# 2. Simulator shows swipe tutorial on first use of keyboard (iOS13 above), this script will set simulator preferences so it wont show the tutorial
function get_simulator_udid() {
echo '' | xcrun simctl list devices | grep "iPhone" | grep -v "unavailable" | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$'
}
@jineshqa
jineshqa / Makefile
Created January 11, 2019 18:21 — forked from pietbrauer/Makefile
Shutdown and reset all iOS Simulators
erase_sim:
./reset_sim.sh 2>/dev/null; true
@jineshqa
jineshqa / XCUIApplication+Scrolling.swift
Created November 14, 2018 19:33 — forked from ryanmeisters/XCUIApplication+Scrolling.swift
Scrolling helpers automated ui tests using XCUIApplication
extension XCUIApplication {
private struct Constants {
// Half way accross the screen and 10% from top
static let topOffset = CGVector(dx: 0.5, dy: 0.1)
// Half way accross the screen and 90% from top
static let bottomOffset = CGVector(dx: 0.5, dy: 0.9)
}
var screenTopCoordinate: XCUICoordinate {
@jineshqa
jineshqa / downgrade.md
Created November 14, 2017 05:29 — forked from danjesus/downgrade.md
Downgrade Jenkins Version

How to downgrade a jenkins version by command line

  • First locate your jenkins.war file, most of time it is located in /usr/share/jenkins
  • Rename jenkins.war to jenkins.war.old mv jenkins.war jenkins.war.old
  • Get a version from jenkins example: http://updates.jenkins-ci.org/stable-2.32/latest/jenkins.war sudo wget http://updates.jenkins-ci.org/stable-2.32/latest/jenkins.war
  • Now start or restart jenkins service sudo service jenkins restart