Skip to content

Instantly share code, notes, and snippets.

View dhruvilp's full-sized avatar
💭
👨‍💻 working on something really cool

Dhruvil Patel dhruvilp

💭
👨‍💻 working on something really cool
View GitHub Profile
@dhruvilp
dhruvilp / maint.dart
Created January 23, 2023 02:56
Flutter Responsive Layout App
import 'package:flutter/material.dart';
var defaultBackgroundColor = Colors.grey[300];
var appBarColor = Colors.grey[900];
var myAppBar = AppBar(
backgroundColor: appBarColor,
title: const Text(' '),
centerTitle: false,
);
var drawerTextColor = TextStyle(
@dhruvilp
dhruvilp / main.dart
Created January 18, 2023 21:42
Parallax effect for landing page
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@dhruvilp
dhruvilp / main.dart
Created January 2, 2023 05:37
Flutter SIngle Select Buttonnbar
import 'package:flutter/material.dart';
final List<Widget> buttons = <Widget>[
Row(
children: const [
Text('APPLE'),
SizedBox(width: 5),
Icon(Icons.sunny),
],
),
@dhruvilp
dhruvilp / main.dart
Created November 22, 2022 23:02
Dart JSON Pretty print
import 'dart:convert';
void main(List<String> arguments) async {
final jsonResponse = jsonDecode(
"JSON");
// final data = jsonResponse["sid_01"];
JsonEncoder encoder = JsonEncoder.withIndent(' ');
String prettyprint = encoder.convert(jsonResponse);
print(prettyprint);
@dhruvilp
dhruvilp / main.dart
Created October 22, 2022 04:17
Flutter: Custom Tab Bar Widget
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
static const String _title = 'Flutter Code Sample';
@override
@dhruvilp
dhruvilp / notes.md
Created July 25, 2022 15:14
System Design 101

Fundamentals of System Design

  • Introduction to System Design
  • The System Design Interview
  • How to Answer System Design Questions
  • System Design Principles
  • How to Answer Web Protocol Questions in a System Design Interview
  • How to Cover Load Balancing in a System Design Interview
  • How to Answer Questions About CDNs in a System Design Interview
  • How to Answer Questions About APIs in System Design Interviews
@dhruvilp
dhruvilp / attachment-retrieval.py
Last active July 22, 2022 22:16
retrieving-attachments-from-exchange-mailbox-using-python
# source: https://www.moh10ly.com/retrieving-attachments-from-exchange-mailbox-using-python/
from exchangelib import DELEGATE, IMPERSONATION, Account, Credentials, EWSDateTime, EWSTimeZone, Configuration, NTLM, GSSAPI, CalendarItem, Message, Mailbox, Attendee, Q, ExtendedProperty, FileAttachment, ItemAttachment, HTMLBody, Build, Version, FolderCollection
credentials = Credentials(username='moh10ly\info', password='PWD')
ews_url = 'https://mail.moh10ly.com/EWS/exchange.asmx'
ews_auth_type = 'NTLM'
@dhruvilp
dhruvilp / notes.md
Last active June 30, 2022 21:25
Blockchain Learning Guide

Topics:

Foundations of Blockchain

Much of the use of blockchain is tied to the concept of “stores of value.” Thus it is important to understand the history and context of monetary instruments, fiat currency, and the innovation that blockchain brings as a store of value and a tool for a broad range of business applications. Learn how to explain the origin and workings of blockchain technology.

Transacting on the Blockchain

One of the most prolific and public applications of blockchain technology is to cryptocurrencies. As such, it is important to understand how cryptocurrencies work and when it is appropriate to use them. Understand the key elements of blockchain technology and how to apply it across business models. Learn how to explain the value of “alternative” stores of value such as cryptocurrencies.

Solving Problems with Blockchain

Understand when to apply blockchain technology, and just as importantly, when blockchain does not add value. Learn about distributed ledger technology, Bit

@dhruvilp
dhruvilp / main.dart
Last active May 12, 2022 12:55
Flutter Workshop Demo
// Get more Flutter packages and plugins at https://pub.dev
import 'package:flutter/material.dart'; // Material UI widgets
import 'package:http/http.dart' as http; // http package
import 'dart:convert'; // json handler package
import 'defaults.dart'; // default strings and constants
// =============================================================================
// FILE: weather_model.dart
// =============================================================================
@dhruvilp
dhruvilp / dart_vul.txt
Created March 16, 2022 16:56
Dart/Flutter Vulnerabilities Management
1. Github Security Advisories: https://github.com/dart-lang/sdk/security/advisories
2. CVE.report: https://cve.report/software/dart/dart_software_development_kit
Android/iOS Scanning:
1. https://github.com/MobSF/Mobile-Security-Framework-MobSF