Skip to content

Instantly share code, notes, and snippets.


Gokulakrishnan Kalaikovan gokulkrishh

View GitHub Profile
gokulkrishh / media-query.css
Last active Sep 24, 2022
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 Sep 16, 2022
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 Feb 10, 2017 — 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 Mar 4, 2022
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 Feb 7, 2022
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 Feb 2, 2022
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 Mar 24, 2019
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 Dec 10, 2021
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 Nov 12, 2020
Create a custom (repo name) name in
curl -i -F "url=<repo-url>" -F "code=<repo-name>"

Above command will give you something like