Skip to content

Instantly share code, notes, and snippets.

View heytulsiprasad's full-sized avatar
⚛️
Overreacting

Tulsi Prasad heytulsiprasad

⚛️
Overreacting
View GitHub Profile
@heytulsiprasad
heytulsiprasad / optchains.js
Created October 7, 2020 15:05
Learning about Optional Chaining
// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
// fiddle: https://jsfiddle.net/tulsiprasad/hou3jrf8/120
const user = {
firstName: "Jade",
lastName: "Wilson",
address: {
home: {
street: "2502 Bennie Dr",
state: "Pearson, Georgia(GA)",
@heytulsiprasad
heytulsiprasad / intro.md
Created October 9, 2020 12:07
Alert me extension

🚨 Introducing Alert Me for Google Meet

A Chrome extension that uses the live captioning from a Meet conference to detect when specific words are spoken. You can set your own alert words in the popup interface. Never get caught while slacking off again :)

You can try out the extension by downloading the latest release from GitHub and follow the instructions in README. Link: https://github.com/heytulsiprasad/alert-me-google-meet

I'd love to know your feedback on this and how it can improve. This was my first time getting hands dirty on extensions, I'd love to discuss more ideas in future.

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@heytulsiprasad
heytulsiprasad / infix-postfix.c
Created October 20, 2020 20:01
Write a program for conversion from infix expression to postfix expression
#include<stdio.h>
#include<ctype.h>
char stack[100];
int top = -1;
void push(char x)
{
stack[++top] = x;
}
@heytulsiprasad
heytulsiprasad / postfix-eval.c
Last active October 20, 2020 20:03
Write a program for postfix evaluation
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define MAX 50
int stack[MAX];
char post[MAX];
int top = -1;
void pushstack(int tmp);
void evaluate(char c);
@heytulsiprasad
heytulsiprasad / animate.md
Last active November 16, 2020 17:13
10 tips for animations

Techniques to take care while using animations

1. Don’t change any properties besides opacity or transform!

Even if you think it might be ok, don’t!

2. Hide content in plain sight.

Use pointer-events: none along with no opacity to hide elements

3. Don’t animate everything at the same time.

Rather, use choreography.

@heytulsiprasad
heytulsiprasad / shopify-prop-types.js
Last active November 26, 2020 09:36
Validating prop types of results fetched by Shopify Storefront API
ProductForm.propTypes = {
product: PropTypes.exact({
description: PropTypes.string.isRequired,
descriptionHtml: PropTypes.string.isRequired,
handle: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
options: PropTypes.arrayOf(
PropTypes.exact({
id: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
@heytulsiprasad
heytulsiprasad / a.java
Created December 7, 2020 07:03
Java 1
import java.util.Scanner;
public class Practice {
public static void main(String args[]) {
Scanner scr = new Scanner(System.in);
System.out.println("please enter two numbers");
int a = scr.nextInt();
int b = scr.nextInt();
@heytulsiprasad
heytulsiprasad / fireystore.js
Last active February 22, 2021 17:15
Firestore basics
// Edited this from VS code
var firebaseConfig = {};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();
// Read
db.collection("cafes")
@heytulsiprasad
heytulsiprasad / data_structure.js
Created February 10, 2021 11:23
For lazzzy app
///////////////////////////////////////////////////////////////////
/**
* currentPages is an array of objects which holds each active page
* on the browser.
*
* page: {
* id: <string>,
* url: <string>,
* author: <string>,