Skip to content

Instantly share code, notes, and snippets.

@awebdeveloper
awebdeveloper / explaining-this.js
Last active November 14, 2017 18:42
Explaining This
var a = 10;
console.log(this.a); //will print 10
function inside() {
var a = 20;
console.log(this.a); //will print 20
}
### Node ###
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
@awebdeveloper
awebdeveloper / .editorconfig
Created April 30, 2017 18:04
Editor Config
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
# We recommend you to keep these unchanged
# ----------------------------------------------------------------------
# Allow concatenation from within specific js and css files
# ----------------------------------------------------------------------
# e.g. Inside of script.combined.js you could have
# <!--#include file="libs/jquery-1.5.0.min.js"-->
# <!--#include file="plugins/jquery.idletimer.js"-->
# and they would be included into this single file.
# This is not in use in the boilerplate as it stands. You may
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: 5bf6c09bfa1297d3692cadd621ef95f1284e33c0
hooks:
- id: trailing-whitespace
- id: check-json
- id: pretty-format-json
args:
- --indent
- '2'
- --no-sort-keys
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 2,
"string-quotes": "double",
"no-duplicate-selectors": true,
"color-hex-case": "lower",
"color-hex-length": "short",
"color-named": "never",
"selector-no-id": true,