Skip to content

Instantly share code, notes, and snippets.

View ExC0d3's full-sized avatar

Abhinav Sharma ExC0d3

View GitHub Profile
@ExC0d3
ExC0d3 / Test.java
Created April 21, 2020 18:33
log4j stack trace with formatting.
package com.weareethic.vertx;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class Test {
public static void call(int i) {
if (i == 0) {
throw new IllegalArgumentException("Reached argument 0");
@ExC0d3
ExC0d3 / example.hs
Created October 15, 2019 23:19
A sample script to find words in a string that are of even length and are also palindromes.
{-
Write a function called `evenAndPalindromeStrings`
that takes a string as an input and returns the
words in the string that are of even length and are
also palindromes.
Input - "abba cbbc cbc"
Ouptut - ["abba","cbbc"]
Psuedo code -
1) Break the string by spaces into a list of words