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 / 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
@dhruvilp
dhruvilp / words.txt
Created January 27, 2022 21:38
Skribbl custom words
Back seat, Highchair, Rock band, Birthday, Hockey, Sasquatch, Black hole, Hotel, Scrambled eggs, Blizzard, Jump rope, Seat belt, Burrito, Koala, Skip, Captain, Solar eclipse, Chandelier, Light, Space, Crib, Mask, Stethoscope, Cruise ship, Mechanic, Stork, Dance, Mom, Sunburn, Deodorant, Mr Potato Head, Thread, Facebook, Pantyhose, Tourist, Paper plate, United States, Frame, Photo, WiFi, Full moon, Pilgrim, Zombie, Game, Pirate,Brain, Kitten, Playground, Bubble bath, Kiwi,Pumpkin pie, Buckle, Lipstick, Raindrop, Bus, Lobster ,Robot, Car, Lollipop, Sand castle, Castle, Magnet, Slipper, Chain saw, Megaphone, Snowball ,Circus tent, Mermaid, Sprinkler ,Computer, Minivan, Statue of Liberty, Crib ,Mount Rushmore ,Tadpole, Dragon, Music ,Teepee ,Dumbbell ,North pole, Telescope, Train, Ferris wheel ,Owl ,Tricycle, Flag ,Pacifier, Piano,Angry, Fireworks, Pumpkin ,Baby ,Flower ,Rainbow ,Beard, Flying saucer ,Recycle ,Bible, Giraffe ,Sand castle ,Bikini ,Glasses ,Snowflake, Book ,High heel, Stairs, Bucket ,Ice cream cone
@dhruvilp
dhruvilp / useKeyPress.js
Created January 26, 2022 20:45
useKeyPress React Hook
import React from "react";
import { useState, useEffect } from "react";
// Usage
export default function App() {
// Call our hook for each key that we'd like to monitor
const happyPress = useKeyPress("h");
const sadPress = useKeyPress("s");
const robotPress = useKeyPress("r");
const foxPress = useKeyPress("f");
const enterPress = useKeyPress("Enter");
@dhruvilp
dhruvilp / react_hook_interval.js
Created January 24, 2022 16:17
React Hook Interval
import {useEffect} from 'react';
export default function useIntervalHook(minutes = 5) {
const interval = minutes * 60 * 1000;
function refresh(){
fetch('/api/**', {mode: 'no-cors', credentials: 'include'})
.catch(error => {
console.log(`There was a problem... ${error.message}`);
});
@dhruvilp
dhruvilp / ip_to_dns.sh
Created November 16, 2021 02:49
CTF: Ping & get DNS name from a list of IPs saved in a file
#!/bin/zsh
#Ping & get DNS name from a list of IPs saved in a file
#Prompt the user to enter a file name and its path.
read -p "Enter the IP addresses file name / path:" FILE_PATH_NAME
function check_host(){
#if not the IP address value is empty
if [[ -n $IP_ADDRESS ]]