Skip to content

Instantly share code, notes, and snippets.

View ramvvram's full-sized avatar

Ramachandran Varadarajan ramvvram

View GitHub Profile
@ramvvram
ramvvram / introduction.md
Created September 26, 2023 00:51 — forked from tanaypratap/introduction.md
A web developer roadmap for aspiring web developers

using the roadmap

This document should be viewed as an overall guide on what needs to be learnt. If you're an aspiring web dev, treat this as a signpost.

effective way of learning

  • Learn by doing. Practice the code examples yourself.
  • Then creating end to end projects is the best way to assemble all your learning at one place and boost your confidence.

do at your own pace

@ramvvram
ramvvram / introduction.md
Created September 26, 2023 00:51 — forked from tanaypratap/introduction.md
A web developer roadmap for aspiring web developers

using the roadmap

This document should be viewed as an overall guide on what needs to be learnt. If you're an aspiring web dev, treat this as a signpost.

effective way of learning

  • Learn by doing. Practice the code examples yourself.
  • Then creating end to end projects is the best way to assemble all your learning at one place and boost your confidence.

do at your own pace

@ramvvram
ramvvram / useDebounce.js
Created March 30, 2023 10:12 — forked from ali-sabry/useDebounce.js
This hook will allow me to debounce any function that I want to run after a certain delay. For example, if I have an input field that triggers a search function on every keystroke, this hook will prevent unnecessary API calls by delaying the search function until the user stops typing for a certain period.
import { useState, useEffect } from 'react';
export const useDebounce = (value, delay) => {
const [debouncedValue, setDebouncedValue] = useState(value);
useEffect(() => {
const timer = setTimeout(() => {
setDebouncedValue(value);
}, delay);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Font-Stacks</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="main.css"/>
<style>
p:first-of-type{
font-family: 'Come for lunch', Arial, Helvetica, sans-serif;
@ramvvram
ramvvram / filterArray.js
Created December 5, 2022 03:55 — forked from jherax/arrayFilterFactory.1.ts
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {