git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| // Usage: | |
| // p(instance)('privateMethod)(arg1, arg2, arg3) | |
| class PrivateMethodCaller(x: AnyRef, methodName: String) { | |
| def apply(_args: Any*): Any = { | |
| val args = _args.map(_.asInstanceOf[AnyRef]) | |
| def _parents: Stream[Class[_]] = Stream(x.getClass) #::: _parents.map(_.getSuperclass) | |
| val parents = _parents.takeWhile(_ != null).toList | |
| val methods = parents.flatMap(_.getDeclaredMethods) | |
| val method = methods.find(_.getName == methodName).getOrElse(throw new IllegalArgumentException("Method " + methodName + " not found")) |
| #! /bin/bash | |
| USER=$1 | |
| PASS=$2 | |
| usermod --password $(echo $PASS | openssl passwd -1 -stdin) $USER |
| val inputClassName = "" // Type input class name which you want to find. Example - org/apache/hadoop/fs/s3a/S3AFileSystem.class | |
| import java.net.URLClassLoader | |
| import java.net.URL | |
| import java.io.File | |
| def list_urls(cl: ClassLoader): Array[java.net.URL] = cl match { | |
| case null => Array() | |
| case u: java.net.URLClassLoader => u.getURLs() ++ list_urls(cl.getParent) | |
| case _ => list_urls(cl.getParent) |
| def list_urls(cl: ClassLoader): Array[java.net.URL] = cl match { | |
| case null => Array() | |
| case u: java.net.URLClassLoader => u.getURLs() ++ list_urls(cl.getParent) | |
| case _ => list_urls(cl.getParent) | |
| } | |
| val urls = list_urls(getClass.getClassLoader).distinct | |
| println(urls.filterNot(_.toString.contains("ivy")).mkString("\n")) |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream