Skip to content

Instantly share code, notes, and snippets.


Gokulakrishnan Kalaikovan gokulkrishh

View GitHub Profile
gokulkrishh / media-query.css
Last active February 7, 2023 12:07
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
##Device = Desktops
##Screen = 1281px to higher resolution desktops
@media (min-width: 1281px) {
/* CSS */
gokulkrishh /
Last active January 14, 2023 14:02
List of useful npx (Node Package Runner) 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.


gokulkrishh /
Created February 10, 2017 05:21 — forked from jesstelford/
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 /
Last active March 4, 2022 04:12
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.

gokulkrishh / alignments.css
Last active February 7, 2022 15:08
CSS Layout - Align an element Horizontal & Vertical center
View alignments.css
/* HTML */
<div class="container">
<div class="child"></div>
/* Basic Style */
.container {
width: 500px;
gokulkrishh /
Created February 2, 2022 06:00
A list of useful git commands

Git add to be case-senstive

git config core.ignorecase false

Git autocorrections

git config --global help.autocorrect 1
gokulkrishh / Object.create.js
Created March 24, 2019 06:19
A simple polyfil for Object.create method.
View Object.create.js
// without 2nd argument support
if (typeof Object.create !== 'function') {
Object.create = function(o, props) {
function F() {}
F.prototype = o;
return new F();
gokulkrishh / index.js
Last active December 10, 2021 20:17
List the visual studio code installed extensions (
View index.js
#!/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`);
gokulkrishh /
Last active November 12, 2020 20:31
Create a custom (repo name) name in
curl -i -F "url=<repo-url>" -F "code=<repo-name>"

Above command will give you something like