Skip to content

Instantly share code, notes, and snippets.

View jukeShy's full-sized avatar
🏠
Working from home

jukeShy

🏠
Working from home
View GitHub Profile
@jukeShy
jukeShy / gulpfile.js
Created September 3, 2018 10:29
Gulp less setup
let gulp = require('gulp'),
browserSync = require('browser-sync'),
less = require('gulp-less'),
path = require('path')
gulp.task('server', () => {
browserSync({
server: {
baseDir: './'
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 60px; /* bottom = footer height */
}
footer {
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
section {
height: 100%;
width: 100%;
let gulp = require('gulp'),
browserSync = require('browser-sync')
gulp.task('server', () => {
browserSync({
server: {
baseDir: './'
},
notify: false
$(document).ready(function() {
function heightDetection() {
$(secector).css( 'heigth', $(window).heigth() );
};
heigthDetection();
$(window).resise(function() {
heigthDetection();
});
@jukeShy
jukeShy / javascript_oop_prototypal_model.txt
Created February 22, 2017 13:50
JavaScript OOP prototypal model
// prototypal model
var AnswerPrototype = {
constructor: function(value) {
this_val = value;
},
get: function fn1() {
return this_val;
}
}
@jukeShy
jukeShy / javascript_oop_classical_model.txt
Created February 22, 2017 13:42
JavaScript OOP classical model
// Classical modal
function Answer(value) {
this._val = value;
}
Answer.prototype.get = function fn() {
console.log(this._val);
}
var lifeAnswer = new Answer(42);
@jukeShy
jukeShy / simple_closure.txt
Last active January 15, 2017 21:37
Simple closure
var array = [];
function foo() {
var x = 0;
return function count() {
return x++;
};
}
var boo = foo();