Skip to content

Instantly share code, notes, and snippets.

@ercoppa
ercoppa / Apache Hadoop (local mode) without SSH
Last active June 12, 2025 06:32 — forked from anonymous/start-dfs.sh
Apache Hadoop (local mode) without SSH
cd ~/hadoop/sbin/
# save old scripts
mv start-dfs.sh start-dfs.sh.orig
mv start-yarn.sh start-yarn.sh.orig
mv stop-dfs.sh stop-dfs.sh.orig
mv stop-yarn.sh stop-yarn.sh.orig
touch start-dfs.sh && chmod +x start-dfs.sh
touch start-yarn.sh && chmod +x start-yarn.sh
@109021017
109021017 / current_activity.sh
Created February 3, 2016 09:32
A shell script log the current android top activity
oldActvity=""
displayName=""
currentActivity=`adb shell dumpsys window windows | grep -E 'mCurrentFocus'`
while true
do
if [[ $oldActvity != $currentActivity && $currentActivity != *"=null"* ]]; then
displayName=${currentActivity##* }
displayName=${displayName%%\}*}
echo $displayName
oldActvity=$currentActivity