This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "live-reload-npm-scripts", | |
"version": "1.0.0", | |
"description": "Run 'npm start' to begin developing", | |
"main": "src/index.js", | |
"scripts": { | |
"browserify": "browserify src/index.js -o dist/bundle.js -t [ babelify --presets [ es2015 ] ]", | |
"browsersync:start": "browser-sync start --server --files 'index.html dist/bundle.js'", | |
"browsersync:reload": "browser-sync reload", | |
"reload": "npm run browserify && npm run browsersync:reload", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Atom Styles | |
// theme: one-dark | |
// syntax: apm install oceanic-next | |
atom-text-editor, | |
atom-workspace { | |
font-family: "Fira Code"; // https://github.com/tonsky/FiraCode | |
font-size: 14px; | |
line-height: 1.7; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Angular picture-fill: https://github.com/tinacious/angular-picturefill --> | |
<!-- ng.pictureFill --> | |
<span picture-fill data-alt="Image Description"> | |
<span pf-src="images/image.png" data-media="(min-width: 1px)"></span> | |
<span pf-src="images/image-600.png" data-media="(min-width: 645px)"></span> | |
<span pf-src="images/image-1024.png" data-media="(min-width: 960px)"></span> | |
</span> | |
<span picture-fill data-alt="{{post.thumbnail.description}}" ng-if="post.thumbnail"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- prevents copying --> | |
<body ondragstart="return false;" onselectstart="return false;" oncontextmenu="return false;" onload="clearData();" | |
onblur="clearData();"> | |
<script type="text/javascript"> | |
// IE fix for unselectable | |
var elem = document.getElementById("resume"); | |
elem.unselectable = "on"; // For IE and Opera | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// 1. Revealing Module Pattern | |
var revModule = function (param) { | |
return { | |
// public | |
funk: funk | |
}; | |
// private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="demoApp"> | |
<script type="text/javascript"> | |
angular.module('demoApp', ['ngMessages']); // include ngMessages module | |
angular | |
.module('htmlxprs', []) | |
.directive('usernameValidator', function () { | |
return { | |
restrict: 'AE', | |
require: 'ngModel', | |
link: function ($scope, elem, attrs, ngModel) { |
NewerOlder