Skip to content

Instantly share code, notes, and snippets.

View Saabbir's full-sized avatar

Saabbir Hossain Saabbir

View GitHub Profile
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@OliverJAsh
OliverJAsh / README.md
Last active February 24, 2022 05:26
Flexbox gutters

Flexbox gutters

Problem

  • We use flexbox for our layout.
  • We want to add horizontal and vertical gutters inbetween these items.
  • Items wrap according to contents (flex-wrap: wrap), therefore we can't decide when/where to apply gutters using breakpoints.

Solution

@jakub-g
jakub-g / async-defer-module.md
Last active May 6, 2024 16:18
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@bradtraversy
bradtraversy / webdev_online_resources.md
Last active May 3, 2024 12:56
Online Resources For Web Developers (No Downloading)
@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@lgh06
lgh06 / refresh.user.js
Created June 7, 2017 07:06
auto refresh with Tampermonkey
// ==UserScript==
// @name css-refresh
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @require http://cdn.bootcss.com/crypto-js/3.1.2/rollups/sha1.js
// @match http://m.kankan.com/v/*
// @match http://127.0.0.1:8083/*
// @match http://192.168.28.52:8083/*
@sadikaya
sadikaya / git-bash-in-webstorm.md
Last active February 13, 2024 01:23
git bash inside Webstorm terminal

Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.

for 64bit:

"C:\Program Files\Git\bin\sh.exe" --login -i

for 32bit:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
@pkfrom
pkfrom / Sublime Text License Key.md
Last active January 3, 2024 03:25
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
@seanemmel-ba
seanemmel-ba / poll_for_element_helper_fn.js
Created November 20, 2015 16:03
Helper function to poll for DOM els that don't exist on page load (helpful for Optimization platforms). The `this` context is set to the element you poll for in your callback function. Interval times out after 10s by default to prevent endless polling.
/**
* @package N/A
* @version 1.0
* @author Blue Acorn <code@blueacorn.com>, Sean Emmel <sean.emmel@blueacorn.com>
* @copyright Copyright © 2015 Blue Acorn.
*/
/**
* @param {String} - the CSS selector for your element in question