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
| let gulp = require('gulp'), | |
| browserSync = require('browser-sync'), | |
| less = require('gulp-less'), | |
| path = require('path') | |
| gulp.task('server', () => { | |
| browserSync({ | |
| server: { | |
| baseDir: './' |
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 { | |
| position: relative; | |
| min-height: 100%; | |
| } | |
| body { | |
| margin: 0 0 60px; /* bottom = footer height */ | |
| } | |
| footer { |
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, body { | |
| margin: 0; | |
| padding: 0; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| section { | |
| height: 100%; | |
| width: 100%; |
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
| let gulp = require('gulp'), | |
| browserSync = require('browser-sync') | |
| gulp.task('server', () => { | |
| browserSync({ | |
| server: { | |
| baseDir: './' | |
| }, | |
| notify: false |
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
| $(document).ready(function() { | |
| function heightDetection() { | |
| $(secector).css( 'heigth', $(window).heigth() ); | |
| }; | |
| heigthDetection(); | |
| $(window).resise(function() { | |
| heigthDetection(); | |
| }); |
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
| // prototypal model | |
| var AnswerPrototype = { | |
| constructor: function(value) { | |
| this_val = value; | |
| }, | |
| get: function fn1() { | |
| return this_val; | |
| } | |
| } |
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
| // Classical modal | |
| function Answer(value) { | |
| this._val = value; | |
| } | |
| Answer.prototype.get = function fn() { | |
| console.log(this._val); | |
| } | |
| var lifeAnswer = new Answer(42); |
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
| var array = []; | |
| function foo() { | |
| var x = 0; | |
| return function count() { | |
| return x++; | |
| }; | |
| } | |
| var boo = foo(); |