Skip to content

Instantly share code, notes, and snippets.

@lcustodio
lcustodio / output
Last active July 15, 2016 10:42
easy-webpack/config-less
***
less config:
...
require('@easy-webpack/config-less')
({ filename: 'styles.css', allChunks: false, sourceMap: false }),
...
***
@lcustodio
lcustodio / string.prototype.js
Created October 15, 2015 13:08
String prototypes
(function () {
'use strict';
var proto = String.prototype;
if (undefined === proto.startsWith) {
/**
* Returns true if the string starts with the given one
*
* @param {String} str
@lcustodio
lcustodio / hierarchy.js
Created September 4, 2015 20:06
Simple explanation between classes, prototypes and properties in javascript
//Class
function MyClass() {
this.ownMember = 123;
}
//Prototype declaration
MyClass.prototype = {
prototypeMember: 456
};
@lcustodio
lcustodio / showAlert.js
Created August 31, 2015 10:34
In order to find where any alert box comes from.
//Open the debugger console, type the following:
var _alert = window.alert;
window.alert = function () { debugger; _alert.apply(this, arguments); }
//Do not reload the page!
//When the alert will be called, it breaks in the debugger and you have access to the call stack.
//Credits to @ArnaudBuchholz