Skip to content

Instantly share code, notes, and snippets.

View rezwan-hossain's full-sized avatar

Rezwan Hossain rezwan-hossain

View GitHub Profile
@rezwan-hossain
rezwan-hossain / Borders bookmarklet
Created November 7, 2020 03:35 — forked from ikenfin/Borders bookmarklet
Bookmarklet to show borders for divs
javascript:if(!window.__debug_div_borders_inited) { var sheet = document.styleSheets[0]; sheet.insertRule('body.__debug_div_borders div { outline: 1px solid green; }', ((sheet.cssRules && sheet.cssRules.length) || 0)); window.__debug_div_borders_inited = true; } document.body.classList.toggle('__debug_div_borders');void(0);
@rezwan-hossain
rezwan-hossain / path.js
Created September 21, 2017 20:22 — forked from creationix/path.js
Simple path join and dirname functions for generic javascript
// Joins path segments. Preserves initial "/" and resolves ".." and "."
// Does not support using ".." to go above/outside the root.
// This means that join("foo", "../../bar") will not resolve to "../bar"
function join(/* path segments */) {
// Split the inputs into a list of path commands.
var parts = [];
for (var i = 0, l = arguments.length; i < l; i++) {
parts = parts.concat(arguments[i].split("/"));
}
// Interpret the path commands to get the new resolved path.
@rezwan-hossain
rezwan-hossain / README.md
Created September 15, 2017 18:24 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@rezwan-hossain
rezwan-hossain / .babelrc
Created May 25, 2017 19:20 — forked from JamieMason/.babelrc
Tree-Shaking with Babel 6, Webpack 2, and React.
{
"presets": [
["es2015", {
"es2015": {
"loose": true,
"modules": false
}
}], "react"
]
}