A Pen by Raphael Adrien on CodePen.
A Pen by Raphael Adrien on CodePen.
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
//TO CALL hotkeys( ALT, '1', function(){ alert('Hello Nurse!!!'); } ); | |
const CTRL = 'ctrl+'; | |
const ALT = 'alt+'; | |
const CTRL_ALT = 'ctrl+alt+'; | |
(function (window) { | |
'use strict'; | |
const _hotkeys = {}; |
I hereby claim:
- I am raphaeladrien on github.
- I am raphaeladrien (https://keybase.io/raphaeladrien) on keybase.
- I have a public key ASCxWb4T4_zK8oZ7DLMpXy58KiTrMvrxlu2LkhIF1hK1jQo
To claim this, I am signing this object:
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
fun main(args: Array<String>) { | |
if(isValid(args[0])) { | |
println("Thanks, the CPF informed is valid") | |
} else { | |
println("Please, inform a valid CPF.") | |
} | |
} | |
fun isValid(cpf: String): Boolean { | |
val formattedCPF = cpf.replace(".", "").replace("-", "") |
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
buildscript { | |
ext { | |
kotlin_version = '1.2.41' | |
spring_boot_version = '2.0.1.RELEASE' | |
mockito_kotlin_version = '1.5.0' | |
} | |
repositories { | |
mavenCentral() | |
} |
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
export const retryFetch = (url, options, retryConf = {maxRetries: 2, delay: 200}) => { | |
return new Promise((resolve, reject) => { | |
const wrappedFetch = ({maxRetries, delay}) => { | |
fetch(url, options) | |
.then(response => { | |
const status = response.status | |
if (status >= 500) { | |
if (maxRetries > 0) { | |
retry(maxRetries, delay) | |
} else { |
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
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
tasks.withType(JavaExec) { | |
doFirst { | |
jvmArgs += '-Xbootclasspath/p:' + projectDir + File.separator + 'alpn-boot-8.1.11.v20170118.jar' | |
println jvmArgs | |
println commandLine | |
} | |
} |
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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
OlderNewer