This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function monitor_adb () { | |
adb start-server | |
echo "[$(date)] adb started" | |
while [ "$(adb shell echo 1)" ]; do sleep 5; done | |
echo "[$(date)] adb is broken, restarting" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Bitmap getHexagonImage(Bitmap toTransform) { | |
Bitmap output = Bitmap.createBitmap(toTransform.getWidth(), | |
toTransform.getHeight(), Bitmap.Config.ARGB_8888); | |
Canvas canvas = new Canvas(output); | |
int radius = 0; | |
int width = toTransform.getWidth(); | |
int height = toTransform.getHeight(); | |
int centerX = width / 2; | |
int centerY = height / 2; |