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.test { | |
useJUnitPlatform() | |
testLogging { | |
exceptionFormat = TestExceptionFormat.FULL | |
events("skipped", "failed", "passed") | |
} | |
} |
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
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Vinay Shenoy", | |
"label": "Engineering Lead at Qweebi", | |
"email": "work@vinaysshenoy.com", | |
"url": "", | |
"summary": "Software Engineer with 10+ years of experience, specializing in developer experience and consistent engineering delivery.", | |
"location": { | |
"countryCode": "SG", |
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
interface Provider<T, U> { | |
fun provide(params: U?): T | |
} | |
class DatabaseProvider: Provider<User, string> { | |
override fun provide(id: string?): User { | |
// Query DB here | |
} | |
} |
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 rm .gitattributes | |
git reset . | |
git checkout . |
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 boolean isColorDark(int color){ | |
double darkness = 1-(0.299*Color.red(color) + 0.587*Color.green(color) + 0.114*Color.blue(color))/255; | |
if(darkness<0.5){ | |
return false; // It's a light color | |
}else{ | |
return true; // It's a dark color | |
} | |
} |
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
find . -type f -print0 | xargs -0 ls -l | sort -k5,5rn > ~/files.txt | |
find -E . -regex '.*\.(jpg|png)' -print0 | xargs -0 ls -l | sort -k5,5rn | |
find -E . -regex '.*\.(jpg|jpeg|png|hdr|exr)' -print0 | xargs -0 stat -f "%N,%z" > ./files.csv |
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 GRADLE_USER_HOME="$HOME/Dev/.gradle" | |
# Delete all gradle log files older than 7 days | |
find $GRADLE_USER_HOME/daemon -type f -mtime +7 -iregex '.*\.\(dmp\|log\)$' -delete |
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
package `in`.obvious.android.bitmaptest | |
import android.graphics.Bitmap | |
import android.graphics.Canvas | |
import android.graphics.Matrix | |
import android.graphics.RectF | |
import android.os.Bundle | |
import android.os.Handler | |
import android.os.Looper | |
import android.view.LayoutInflater |
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
import org.junit.jupiter.api.extension.AfterAllCallback | |
import org.junit.jupiter.api.extension.AfterEachCallback | |
import org.junit.jupiter.api.extension.AfterTestExecutionCallback | |
import org.junit.jupiter.api.extension.BeforeAllCallback | |
import org.junit.jupiter.api.extension.BeforeEachCallback | |
import org.junit.jupiter.api.extension.BeforeTestExecutionCallback | |
import org.junit.jupiter.api.extension.ConditionEvaluationResult | |
import org.junit.jupiter.api.extension.ExecutionCondition | |
import org.junit.jupiter.api.extension.Extension | |
import org.junit.jupiter.api.extension.ExtensionContext |
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
mobius("Login") { | |
state("Default") { | |
events { | |
"InputChanged" leadsTo "Default" | |
"SubmitClicked" leadsTo "ValidateInput" | |
} | |
} | |
transient("ValidateInput") { |