Skip to content

Instantly share code, notes, and snippets.

Duduman Bogdan Vlad dudumanbogdan

  • Pentalog
  • Iasi
Block or report user

Report or block dudumanbogdan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Some Tricks for Troubleshooting

You can use these API calls in your code if you need to, but I've actually found them quite useful when on the console in Chrome:

require.defined(moduleId) - returns true if your moduleId has been defined and is ready for use.

require.specified(moduleId) - returns true if your moduleId has been listed as a dependency by another defined module. Note that just because this returns true doesn't mean your moduleId is ready to use (don't you just love asynchrony?).

requirejs.s.contexts._.config - I learned about this from Vernon Kesner. This is technically a "back door/undocumented" call - so it could change or disappear without warning. However it returns a very useful object full of configuration info, see below: Chrome Console results for requrejs.s.conects._.config

View SassMeister-input-HTML.html
<button type="button">I look amazing</button>
View SassMeister-input-HTML.html
<div class="container">
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
dudumanbogdan /
Created Apr 6, 2016 — forked from maxogden/
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

dudumanbogdan / OpenWithSublimeText3.bat
Created Jan 20, 2016 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
View OpenWithSublimeText3.bat
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
View criticalcss-bookmarklet-devtool-snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles =;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
View criticalcss.html
<!DOCTYPE html>
<meta charset=utf-8 />
<title>JS Bin</title>
<h2>Original CSS</h2>
<style style="display: block; white-space: pre; font-family: monospace">
h2 { margin:0; }
You can’t perform that action at this time.