Skip to content

Instantly share code, notes, and snippets.

View braghome's full-sized avatar
🎯
Focusing

Manav Brar braghome

🎯
Focusing
  • Carita Revolution
  • Dublin, Ca
View GitHub Profile
public class RetrierTest {
private static int count = 0;
@Rule public RetryRule rule = new RetryRule();
@Test
@Retry
public void failsFirst() throws Exception {
count++;
assertEquals(2, count);
@braghome
braghome / VeryString.kt
Last active April 21, 2021 00:00
some missing code on vegeta2102 blog trying to add it back in
private val charList = listOf<Char>('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
val isValidCharacters: (Char) -> Boolean = {c -> charList.contains(Character.toLowerCase(c))}
val isCharNumberUnderScore: (String) -> Boolean = { s: String ->
val allValid = s.all { ch ->
isValidCharacters(ch) || Character.valueOf(ch).isDigit() || Character.valueOf(ch) == '_'
}
allValid
}

Keybase proof

I hereby claim:

  • I am braghome on github.
  • I am bargari (https://keybase.io/bargari) on keybase.
  • I have a public key ASCRYTwvk0CiAHqRmiGf8pwq8YUkFagrtAyxF0Npu4DaMwo

To claim this, I am signing this object: