Skip to content

Instantly share code, notes, and snippets.

View thekarthiksankar's full-sized avatar
:octocat:
Daemon started

Karthik thekarthiksankar

:octocat:
Daemon started
View GitHub Profile
# List all the files in a folder with line count
$ wc -l `find -name '*.ext'`
@thekarthiksankar
thekarthiksankar / git-commands.sh
Created February 24, 2020 08:52
Git commands reference
# TAGS
# Delete remote tag
git push --delete origin tagname
@thekarthiksankar
thekarthiksankar / build.gradle
Last active July 7, 2021 02:46
Android: Import package from GitHub
// app level build.gradle
android {
def githubProperties = new Properties()
githubProperties.load(new FileInputStream(rootProject.file('github.properties')))
repositories {
maven {
name = "GitHubPackages"
/* Configure path to the library hosted on GitHub Packages Registry
@thekarthiksankar
thekarthiksankar / EmailRegex.kt
Created July 17, 2021 05:25
Email regex for android
import java.util.regex.Pattern
fun isEmailValid(email: String): Boolean {
return Pattern.compile(
"^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]{1}|[\\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"
+ "([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$"
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true