Skip to content

Instantly share code, notes, and snippets.

View ajithvgiri's full-sized avatar
👨‍💻
waiting for gradle to finish

Ajith v Giri ajithvgiri

👨‍💻
waiting for gradle to finish
View GitHub Profile
@ajithvgiri
ajithvgiri / fiber_hope_model.dart
Created February 22, 2022 21:16
fiberhopmodel
import 'package:eminencetel/features/data/models/photos_model.dart';
class FiberHopeModel {
String? projectId;
String? projectName;
String? projectDate;
String? mspId;
String? mspName;
String? swcId;
String? swcName;
package ch.milosz.reactnative;
public class AndroidNative {
public static class AppConstants {
public static Boolean isAppForeground = true;
public static Boolean isMeetingStarted = false;
}
}
package ch.milosz.reactnative;
import android.util.Log;
import android.widget.Toast;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
@ajithvgiri
ajithvgiri / FormValidation.kt
Created June 1, 2021 17:16
formvalidation example
private var email = MutableLiveData<String>().apply { value = "" }
private var password = MutableLiveData<String>()
var emailErrorMsg = MutableLiveData<String>()
var passwordErrorMsg = MutableLiveData<String>()
var isEmailErrorMsgEnabled = MutableLiveData<Boolean>()
var isPasswordErrorMsgEnabled = MutableLiveData<Boolean>()
fun performValidation(){
@ajithvgiri
ajithvgiri / PreferenceHelper.kt
Created April 11, 2020 19:54
SharePreference Extension function for Kotlin
import android.content.Context
import android.content.SharedPreferences
object PreferenceHelper {
fun qkopyPrefs(context: Context, name: String = "AppPreference"): SharedPreferences = context.getSharedPreferences(name, Context.MODE_PRIVATE)
inline fun SharedPreferences.edit(operation: (SharedPreferences.Editor) -> Unit) {
val editor = this.edit()
operation(editor)
@ajithvgiri
ajithvgiri / search result.json
Created December 21, 2019 09:49
Online Movies Database Search Result
{
"Search": [
{
"Title": "Harry Potter and the Deathly Hallows: Part 2",
"Year": "2011",
"imdbID": "tt1201607",
"Type": "movie",
"Poster": "https://m.media-amazon.com/images/M/MV5BMjIyZGU4YzUtNDkzYi00ZDRhLTljYzctYTMxMDQ4M2E0Y2YxXkEyXkFqcGdeQXVyNTIzOTk5ODM@._V1_SX300.jpg"
},
{
{
"glossary":{
"title":"example glossary",
"GlossDiv":{
"title":"S",
"GlossList":{
"GlossEntry":{
"ID":"SGML",
"SortAs":"SGML",
"GlossTerm":"Standard Generalized Markup Language",
@ajithvgiri
ajithvgiri / call.html
Created August 15, 2019 07:17
Auto call script for Qkopy
<!DOCTYPE html>
<html>
<body>
<a id="call" href="tel:+91 7907764039">Call</a>
<script>
//Click on load.
window.onload = function () {
document.getElementById('call').click()
# activate the bot only if your IDE/Editor application is active
tell application "Android Studio" # You can change the IDE/Editor name eg: Xcode or Atom
activate
repeat
set title to "Fyru bot"
set message to "I am making auto commit & push"
display notification message with title title sound name "Glass"
# change the project path,commit message and the branch
do shell script "cd Users/ajithvgiri/AndroidStudioProjects/ExampleProject && git add -A && git commit -m 'commit from Fyru bot' && git push origin development"
delay 14400 # you can change the delay time current 14400 seconds = 4 hours
@ajithvgiri
ajithvgiri / DateTimeUtils.kt
Created May 10, 2019 05:10
String to Date & Date to Elapse Time Converstion
//String to Date Conversion
fun toFeedDateParser(strParseDate: String?): Date? {
return if (!strParseDate.isNullOrEmpty()) {
val tz = TimeZone.getTimeZone("UTC")
// DateFormat feedFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ENGLISH);
val feedFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH)
feedFormat.timeZone = tz
var newDate: Date? = null