type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| #!/bin/bash | |
| # based on https://lebkowski.name/docker-volumes/ | |
| # remove exited containers: | |
| docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
| docker volume ls -qf dangling=true | xargs -r docker volume rm | |
| # remove unused images: | |
| docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| # Borrowed from: | |
| # https://github.com/silven/go-example/blob/master/Makefile | |
| # https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
| BINARY = superdo | |
| VET_REPORT = vet.report | |
| TEST_REPORT = tests.xml | |
| GOARCH = amd64 | |
| VERSION?=? |
| import android.util.Log; | |
| import java.io.IOException; | |
| import java.net.InetAddress; | |
| import java.net.Socket; | |
| import java.net.SocketException; | |
| import java.net.UnknownHostException; | |
| import javax.net.SocketFactory; |
| Install Ruby Gems on Mac OS X without sudo | |
| 1. Add GEM_HOME to your .bash_profile | |
| For example, nano ~/.bash_profile and add | |
| export GEM_HOME=/Users/srinivas/.gem where the path is to your own Home folder | |
| 2. Add the gem executables to your system path | |
| Also in .bash_profile, add | |
| #!/bin/bash | |
| # Creator: Phil Cook | |
| # Email: phil@phil-cook.com | |
| # Twitter: @p_cook | |
| brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | |
| brew_array=("5.6","7.0","7.1","7.2") | |
| php_array=("php@5.6" "php@7.0" "php@7.1" "php@7.2") | |
| valet_support_php_version_array=("php@5.6" "php@7.0" "php@7.1" "php@7.2") | |
| php_installed_array=() |
| -optimizationpasses 5 | |
| -dontusemixedcaseclassnames | |
| -dontskipnonpubliclibraryclasses | |
| -dontskipnonpubliclibraryclassmembers | |
| -dontpreverify | |
| -verbose | |
| #your package path where your gson models are stored | |
| -keep class com.project.models.** { *; } |
| import android.os.SystemClock; | |
| import android.view.View; | |
| import java.util.Map; | |
| import java.util.WeakHashMap; | |
| /** | |
| * A Debounced OnClickListener | |
| * Rejects clicks that are too close together in time. | |
| * This class is safe to use as an OnClickListener for multiple views, and will debounce each one separately. |
Idle mode is a state where the phone has no network connectivity and apps are temporarily suspended. Idle mode gets triggered by one of two ways: an asleep, still, unplugged phone (Doze mode), and when an app has not been opened in a significant amount of time (App Standby Mode). During idle mode via Doze, the phone will wake up periodically for a short amount of time, allowing apps to run and use network connectivity. Using several different methods outlined below, it is possible to wake apps up during idle mode outside of these maintenance windows.
1 hour of being still after the screen turns off.
TBD
| /** | |
| * Typedef annotation listing all permissions | |
| * available in the latest SDK. | |
| * Using this on a method parameter | |
| * or on a method with {@link String} return value | |
| * will trigger value lookup in Android Studio. | |
| * | |
| * @version SDK23 | |
| * @author jmarkovic | |
| */ |