Skip to content

Instantly share code, notes, and snippets.

View raveesh-me's full-sized avatar
🦁
Honesty, Humility, Patience, Pride.

Raveesh Agarwal raveesh-me

🦁
Honesty, Humility, Patience, Pride.
View GitHub Profile
@raveesh-me
raveesh-me / gist:fe0a210324fb65131b458d86473838ac
Created October 7, 2024 16:45
RBAC / Extension Guard for functions that take in an action
// Extension functions
// Generic Programming
extension XFunctionGuard<T extends Function> on T {
T callWithGuard(String action) {
if (action != "callable") {
throw Exception();
}
return this.call;
}
@raveesh-me
raveesh-me / flutter_qa_hiring_challenge.md
Last active June 7, 2024 06:19
GoHighLevel QA Hiring Challenge

Motivation

The GHL Mobile Application is built with flutter, in the dart programming language. Flutter comes with its own hamcrest-inspired matcher-type testing framework and an integration test driver.

If you join the Mobile Team as an SDET, your work will be:

  1. Adding more test cases to testrail, increasing our regression test coverage and building up our regression test suite
  2. Automating these tests with the integeration test drivers and commiting these tests directly to the repository
  3. On every potential release candidate, perform end-to-end regression testing including manually testing all the cases which are not covered by automation suite of integration tests
@raveesh-me
raveesh-me / first_working_example.dart
Last active September 28, 2021 02:54
Reactive Persistence: First working example
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
/// # Reactive persistence with Hive Value Listener
main() async {
/// Initialize Hive on flutter | boilerplate
await Hive.initFlutter();
runApp(MyApp());
}
@raveesh-me
raveesh-me / main.dart
Last active January 18, 2021 08:56
Maps and Nulls
/// MapContainer is a class that can have an optionally null map
class MapContainer{
final Map<String, String>? map;
MapContainer(this.map);
}
void main() {
/// dart added support to null aware subscript operator in the NNBD features update.
/// See: https://github.com/dart-lang/language/issues/376
/// See: https://nullsafety.dartpad.dev/f6866ea63dde8098f68ffd39ed944555/
@raveesh-me
raveesh-me / ct_shared_source_LICENSE
Last active April 28, 2020 06:26
Cookytech Shared Source License V1.0
CTPL Shared Source License 1.0
------------------------------
Copyright 2020, Cookytech Technologies Private Limited.
All rights reserved.
#TL;DR:
This is not an open-source license.
Redistribution and use in source and binary forms, with or without
modification, are NOT permitted.
@raveesh-me
raveesh-me / main.dart
Created February 22, 2020 13:33
Multiple Futures
void main() async {
List<String> strings = [
'jgjjhga',
'tyuyua',
'afghf',
'dsfsd',
'trrt',
'zxczx',
'a',
'asd',
void main() {
var anda = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var divisibleByTwo = (int i) {
return i % 2 == 0;
};
var greaterThanThree = (int i) {
return i > 3;
};
import 'dart:async';
import 'dart:core';
import 'package:flutter_ritetag/model/client.dart';
import 'package:flutter_ritetag/network/network_calls.dart';
import 'package:meta/meta.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'user_info.dart';
@raveesh-me
raveesh-me / user_info_manager.dart
Last active September 20, 2018 07:57
UserInfoManager InheritedWidget
class UserInfoManager extends InheritedWidget {
final Key key;
final ManagedUserInfo managedUserInfo;
final Widget child;
final Function() refreshManagedUserInfo;
UserInfoManager(
{@required this.managedUserInfo,
@required this.child,
@required this.setManagedUserInfo,
@raveesh-me
raveesh-me / introrx.md
Created August 28, 2018 05:25 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing