Skip to content

Instantly share code, notes, and snippets.

View gokulkrishh's full-sized avatar

Gokulakrishnan Kalaikovan gokulkrishh

View GitHub Profile
@gokulkrishh
gokulkrishh / media-query.css
Last active August 27, 2026 05:07
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@gokulkrishh
gokulkrishh / useful-npx-commands.md
Last active August 11, 2026 21:00
List of useful npx (Node Package Runner) commands (https://git.io/useful-npx-commands)

NPX (NPM Package Runner) Commands

List of useful npx (NPM Package Runner) commands.

What is NPX?

Using NPX we can execute/run node binaries without the need to install it locally or globally.

Commands

@gokulkrishh
gokulkrishh / event-loop.md
Created February 10, 2017 05:21 — forked from jesstelford/event-loop.md
Event Loop and Call Stack

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@gokulkrishh
gokulkrishh / index.js
Last active December 7, 2024 19:15
List the visual studio code installed extensions (https://git.io/installed-vscode-extenstions)
#!/usr/bin/env node
const { exec } = require('child_process');
exec('code --list-extensions', (err, stdout) => {
if (err) console.log('Error occurred', err);
const extensions = stdout.split('\n').filter(extension => extension);
console.log(`\n✅ Installed VS Code Extensions: ${extensions.length} \n`);
"workbench.editor.customLabels.patterns": {
"**/app/**/page.tsx": "${dirname}.${extname}",
"**/app/**/layout.tsx": "${dirname}/layout.${extname}",
"**/components/**/index.tsx": "${dirname}/index.${extname}",
"**/index.ts": "${dirname}/index.${extname}"
}
@gokulkrishh
gokulkrishh / margin-collapsing.md
Last active September 16, 2024 16:34
margin collapsing in css

There are two main types of margin collapse:

  • Collapsing margins between adjacent elements
  • Collapsing margins between parent and child elements

Using a padding or border will prevent collapse only when Collapsing is between parent and children. Also, any value of overflow different from its default (visible) applied to the parent will prevent collapse.

Thus, both overflow: auto and overflow: hidden will have the same effect.

##shortcuts
alias s='git status'
# Easy Navigation
alias ..="cd .."
alias ...="cd ../.."
alias p="cd ~/practices"
alias w="cd ~/workspace"
# Tools
@gokulkrishh
gokulkrishh / my-vs-code-ext.sh
Created March 1, 2023 14:09
my-vs-code-ext
code --install-extension bradlc.vscode-tailwindcss --force &
code --install-extension christian-kohler.path-intellisense --force &
code --install-extension CodeSandbox-io.codesandbox-projects-theme --force &
code --install-extension csstools.postcss --force &
code --install-extension dbaeumer.vscode-eslint --force &
code --install-extension esbenp.prettier-vscode --force &
code --install-extension gera2ld.markmap-vscode --force &
code --install-extension ms-vscode.sublime-keybindings --force &
code --install-extension ms-vsliveshare.vsliveshare --force &
code --install-extension Prisma.prisma --force &
@gokulkrishh
gokulkrishh / frontend-developer-roadmap.html
Created February 24, 2023 08:34
A personalised frontend developer road based on my 10 years experience as frontend developer.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Markmap</title>
<style>
* {
margin: 0;