Skip to content

Instantly share code, notes, and snippets.

View mrk-han's full-sized avatar
💭
Looking for new opportunities!

Mark Han mrk-han

💭
Looking for new opportunities!
View GitHub Profile
@mrk-han
mrk-han / jenkins-playground-setup.md
Last active August 18, 2023 02:14
Setting up a Jenkins Playground: Download, Setup, Test and Run Groovy Scripts on a Local Jenkins Server Instance with MacOS

Test a Local Jenkins Instance on MacOS: Download, Setup, and Run Groovy Scripts Locally

About

There are many ways to test Jenkins...

Jenkins Pipeline Unit is great but it's generally recommended to keep all of your logic with stages and not get too crazy with custom Groovy in your pipeline. Though, it's a great option if you have a very advanced use-case and want to make sure your code is reliable.

The Replay Pipeline Run Option is awesome if you want to verify a quick change or iterate quickly on a previously setup pipeline. But it only allows for altering Jenkinsfile Code and runs against the production Jenkins Instance.

@mrk-han
mrk-han / movie-to-gif.md
Last active October 7, 2023 11:54
Convert (Screen Capture) .mov files to GIF format using Ffmpeg and Gifsicle. Put GIFs into JIRA and Slack with ease! MacOS

Convert (Screen Capture) .mov files to GIF format using Ffmpeg and Gifsicle (MacOS)

Prompts for path to .mov and allows user to enter a .gif name. Then converts that .mov file to a .gif and saves to ~/Downloads/.

Inspired by: https://gist.github.com/dergachev/4627207

To use:

  • Save the code from this gist into a file and name it something like convert_movie_to_gif.sh, and then run chmod +x ./convert_movie_to_gif.sh to make it executable.
    • If gifsicle isn't installed, the script will tell you.
@mrk-han
mrk-han / AdbCommands
Created October 4, 2019 15:42 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@mrk-han
mrk-han / select_emulator_and_wait_for_boot.sh
Last active February 24, 2024 09:06
Select Emulator, Wait for Emulator to Start, Wait for Emulator to Boot, then Install Android.apk
#!/usr/bin/env bash
####################################################################################
# Adapted from various wait-for-boot scripts found online
# This is the most robust version I could write for MacOS
# MUST have upgraded Bash to run mapfile
# Can adapt the last 2 functions if you want to start an Emulator on CI
# This is part of a script we run locally before starting Appium automation on Android
####################################################################################
@mrk-han
mrk-han / android_grpc_sample_documentation.md
Last active February 27, 2024 06:47
how to use experimental gRPC to control android emulators [Rough fork of GRPC MD from AOSP]

Emulator over gRPC Examples

Thanks to Erwin Jansen for these samples and this readme. (I just formatted this and threw it in a gist to make it more shareable and readable)

Samples can be downloaded here: https://android.googlesource.com/platform/external/qemu/+/refs/heads/emu-master-dev/android/android-grpc/docs/grpc-samples

Caveats: Experimental feature!!

This is currently an experimental feature, and as such there are some things lacking that might be important if you want to use this in production:

@mrk-han
mrk-han / change-accessibility-settings-with-adb.md
Last active March 7, 2024 09:52
Enable and Disable Android Accessibility Settings from the Command Line using ADB (Font scale, talkback, color blind)

Using ADB to control Accessbility settings for easier testing with Android Emulators + Real Devices

It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.

These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.

Credit to James Nitsch for inspiring this, and for figuring out the put commands to enable these settings.

Font Scale (Font Size -- Testing Dynamic Text)

@mrk-han
mrk-han / expo-azure.yml
Last active April 10, 2024 15:13
Simple Guide for a Build and Testing Pipeline with Expo and EAS from Azure Devops CICD (Managed Workflow)
# https://aka.ms/yaml
trigger:
branches:
include:
- main
- releases/*
- hotfix/*
pr:
autoCancel: true
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active May 1, 2024 21:12
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"