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
fun addAlphaToColor(originalColor: String, alpha: Float): String { | |
val alphaFixed = (alpha * 255).roundToLong() | |
var alphaHex = java.lang.Long.toHexString(alphaFixed) | |
if (alphaHex.length == 1) { | |
alphaHex = "0$alphaHex" | |
} | |
return originalColor.replace("#", "#$alphaHex") | |
} | |
fun getColorPalletWithAlpha(color: String, numberOfColors: Int, minAlpha: Float = 0.15f, |
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
# Search filename in stash | |
function gitsearch() | |
{ | |
searchCrit='stash\|'$1 | |
git stash list | while IFS=: read STASH ETC; do echo "$STASH: $ETC"; git diff --stat $STASH~..$STASH --; done | grep -e $searchCrit | |
} | |
alias githunt=gitsearch |
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
import csv | |
import telnetlib | |
def get_auth_code() : | |
with open('/Users/<username>/.emulator_console_auth_token', 'r') as file: # file is in root directory, replace username | |
return file.read() | |
def send_message(session, sender, msg): | |
session.write(bytes("sms send {} {}\n".format(sender, msg), encoding='utf-8')) |
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
# Created by https://www.gitignore.io/api/androidstudio | |
### AndroidStudio ### | |
# Covers files to be ignored for android development using Android Studio. | |
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the ART/Dalvik VM |