object SimpleStopwatch {
suspend fun <T> runWithStopWatch(log: Logger, tag: String, block: suspend () -> T): T {
val start = System.currentTimeMillis()
val result = block()
val executionTime = System.currentTimeMillis() - start
log.info("=======> $tag took ${executionTime}ms to finish")
return result
}
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Portfólio</title> | |
<style> | |
body { | |
background-color: #000000; |
This file contains 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
public interface IRepository<T> | |
{ | |
Task Insert(T entity); | |
Task<T> Get(T Id); | |
Task Update(T entity); | |
Task Delete(T entity); | |
} | |
public interface IUserRepository : IRepository<User> { | |
} |
This file contains 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
public void Update(User user) | |
{ | |
var result = db.Users.SingleOrDefault(currentUser => currentUser.Id == user.Id); | |
if (result != null) | |
{ | |
db.SaveChanges(); | |
} | |
} |
Option | Resolution |
---|---|
Unspecified | Unspecified reason |
CustomerCancellation | The customer requested a cancellation |
TimeoutWaitingForResponse | Timeout waiting for a response |
UnexpectedResponse | The received response message was different than expected, e.g., an HTTP 500 status |
This file contains 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
git add --all | |
git commit -m "$1" | |
git push -u origin master | |
echo "\n\n\n" | |
echo " ( ) (@@) ( ) (@) () @@ O @ O @" | |
echo " (@@@)" | |
echo " ( ) **********************" | |
echo " (@@@@) *** DEMO PUBLISHED ***" |
This file contains 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
# Black 0;30 Dark Gray 1;30 | |
# Red 0;31 Light Red 1;31 | |
# Green 0;32 Light Green 1;32 | |
# Brown/Orange 0;33 Yellow 1;33 | |
# Blue 0;34 Light Blue 1;34 | |
# Purple 0;35 Light Purple 1;35 | |
# Cyan 0;36 Light Cyan 1;36 | |
# Light Gray 0;37 White 1;37 | |
# .---------- constant part! | |
# vvvv vvvv-- the code from above |
This file contains 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
path="$PWD" | |
for item in $(find "$path" -name \*.jar) | |
do | |
filename=`basename $item` | |
if grep -q "sdk" <<<$filename; then | |
7z d "$item" org/apache/commons/codec/language/bm/ | |
fi | |
done |
dependencies {
// todas aquelas libs maravilhosas que já conhecemos
// compile project(':logger') <- antiga referência
compile 'com.jgabrielfreitas:logger:1.0.0'
}
NewerOlder