/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.net.ConnectivityManager | |
| import android.net.LinkProperties | |
| import android.net.Network | |
| import android.net.NetworkCapabilities | |
| import android.net.NetworkRequest | |
| import android.net.wifi.WifiManager | |
| import android.os.Build | |
| import android.util.Log |
| private fun setupNestedScrollViewEndlessScroll() { | |
| nsvUserDetail.setOnScrollChangeListener( NestedScrollView.OnScrollChangeListener { v, _, scrollY, _, oldScrollY -> | |
| val lastView = v.getChildAt(v.childCount - 1) | |
| if (lastView != null && (scrollY >= (lastView.measuredHeight - v.measuredHeight)) && scrollY > oldScrollY) { | |
| loadMoreRepos() | |
| } | |
| }) | |
| ViewCompat.setNestedScrollingEnabled(rvList, false) | |
| } |
| import java.util.* | |
| import java.util.concurrent.TimeUnit | |
| class EventTimer private constructor() { | |
| private val events = mutableMapOf<String, Long>() | |
| fun start(eventName: String) { | |
| val writeTime = System.nanoTime() | |
| synchronized(events) { |
| ## Note: This file is optional but good to have in case you somehow get stuck in No Sleep mode. | |
| # Starting main script | |
| echo "Starting script..."; | |
| echo "" | |
| echo "Enter password to update sleep settings: " | |
| sudo echo "Reverting any still-un-revered settings and going to sleep..." | |
| sudo pmset -a disablesleep 0 | |
| sudo pmset sleepnow | |
| echo "" |
| # Starting main script | |
| echo "Starting script..."; | |
| echo "" | |
| echo "Enter password to update sleep settings: " | |
| sudo echo "Disabling sleep..." | |
| # Creating helper process | |
| echo "# This is a helper script. Do not run manually." > ~/Desktop/PauseSleep/DontSleepHelper.sh | |
| echo "sudo pmset -a disablesleep 1" >> ~/Desktop/PauseSleep/DontSleepHelper.sh | |
| echo "rm -f ~/Desktop/PauseSleep/DontSleepHelper.sh" >> ~/Desktop/PauseSleep/DontSleepHelper.sh |
| package io.jboxx; | |
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Method; | |
| public class Main { | |
| public static class Builder { |
| #!/bin/bash | |
| ### How to use it? ### | |
| ## just run it like common bash script "sh weather-status.sh -c={CITY_NAME}" | "sh weather-status.sh --city={CITY_NAME}" | |
| for i in "$@" | |
| do | |
| case $i in | |
| -c=*|--city=*) | |
| CITY="${i#*=}" |
| allprojects { | |
| gradle.projectsEvaluated { | |
| tasks.withType(JavaCompile) { | |
| options.compilerArgs << "-Xmaxerrs" << "1000" | |
| } | |
| } | |
| } |
| public interface GoodViewListener { | |
| /** | |
| * Interface definition for a callback to be invoked when a view is clicked. | |
| */ | |
| public interface OnClickListener { | |
| /** | |
| * Called when a view has been clicked. | |
| * | |
| * @param v The view that was clicked. | |
| */ |