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 / git-cheat-list.md
Created December 3, 2017 21:16
Git cheat list
@mrk-han
mrk-han / index.md
Created February 27, 2018 01:58 — forked from ericandrewlewis/index.md
C++ Pointer Tutorial

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.

@mrk-han
mrk-han / ViewGroupUtils.java
Created July 31, 2019 02:03 — forked from orip/ViewGroupUtils.java
Find all Android views tagged with a given value. Similar to document.getElementsByClassName in JavaScript/DOM to find elements with a given class. Based on this StackOverflow answer by Shlomi Schwartz: http://stackoverflow.com/a/8831593/37020
package com.onavo.android.common.ui;
import android.view.View;
import android.view.ViewGroup;
import java.util.LinkedList;
import java.util.List;
/**
* Based on http://stackoverflow.com/a/8831593/37020 by by Shlomi Schwartz
@mrk-han
mrk-han / appium_prerun.sh
Created January 9, 2020 22:38
Appium Pre-Run Script
#!/usr/bin/env bash
########################################################################
# Goal: Run this script and start automating!
# 1) Pull all changes for Appium/iOS/Android repo
# 2) Build iOS App then Copy to Appium Repo
# 3) Build Android App then Copy to Appium Repo
# 4) Allow user to choose emulator, launch emulator, install app
########################################################################
@mrk-han
mrk-han / tag_a_new_commit.md
Created March 9, 2020 18:09
If you need to tag a new commit, but haven't published to Maven Central yet

How to change a Git tag to reference a new commit

If you accidentally tag the wrong commit, or if you have a new commit before publishing then you may be able to re-tag without incrementing your library's version #

Delete Remote Tag

git push origin :refs/tags/0.21.0

Delete Local Tag

@mrk-han
mrk-han / Android-Resources.md
Last active August 21, 2020 07:55
Android Resources

A mind dump of resources for learning Android Development

Brief Overview

I learned from a combination video tutorials (CasterIO) , online classes (Udacity) , blogs (medium posts) , forums (/r/androiddev) , and the developer.android documentation, codelabs, and javadocs. Also, I follow anyone I learned from on Twitter so I could get more insight into the android ecosystem. I got a copy of the Android Big Nerd Ranch book but I’m not much of a book person when I’m on my computer, I mostly just google and SO stuff instead.

Udacity Courses

I got my start learning through Udacity’s courses which were made in partnership with Google

@mrk-han
mrk-han / gist:4a8d59a3b7a3eb7883cb804632e6640f
Last active April 7, 2021 20:36
A rough documentation of setting up MERN environment on a Fresh Centos 7 Server on Digital Ocean

Context

Reverse Proxy?

Or just use Node

  • We had the opportunity of setting up a fresh Digital Ocean server running CentOS 7, and opt'd for this for simplicity and for the fun experience of learning how to set up a fresh CentOS 7 Server to be used with the MERN stack.
  • In our scenario, Node can listen on port 80 and we should be good to go...
@mrk-han
mrk-han / ubuntu-android.txt
Last active September 20, 2022 23:52
Setting up Linux Environment to run Espresso tests on Android x86 Emulator
# Android w/ x86 Emulator
## SETUP
sudo -S apt-get update && sudo apt-get upgrade -y
sudo -S apt-get install zip unzip wget git curl vim openjdk-8-jdk qemu-kvm -y
sudo -S adduser $USER kvm
mkdir -p Android/platforms
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android/
@mrk-han
mrk-han / Android-emulator-haxm-installation.yml
Created October 20, 2022 20:41
Installing HAXM on GitHub Action macOS-11 and macOS-12 agents
# Minorly adjusted from https://gist.github.com/badsyntax/ce848ab40b952d944c496575d40e5427 and https://github.com/igorboskovic3/actions-test/actions/runs/3239143575/workflow
name: HAXM Installation before Android Test Snippet
# Controls when the workflow will run
on:
workflow_dispatch:
jobs:
install-haxm-and-run-emulator:
@mrk-han
mrk-han / Android-emulator-haxm-installation-with-android-emulator-runner.yml
Created October 21, 2022 20:19
Installing HAXM on GitHub Action macOS-11 and macOS-12 agents using reactivecircus/android-emulator-runner action
# Minorly adjusted from https://gist.github.com/badsyntax/ce848ab40b952d944c496575d40e5427 and https://github.com/igorboskovic3/actions-test/actions/runs/3239143575/workflow
name: HAXM Installation before Android Test Snippet
# Controls when the workflow will run
on:
workflow_dispatch:
jobs:
install-haxm-and-run-emulator: