I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| .idea | |
| node_modules | |
| dist | |
| bower_components | |
| .DS_Store | |
| doc |
| .idea | |
| node_modules | |
| dist | |
| bower_components | |
| .DS_Store | |
| doc |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <style> | |
| * { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <!--Time found that if you used display:none on the parent of the element you want to hide, the bg image will not be downloaded--> | |
| <div style="display: none"> | |
| <div style="background-image: url(https://avatars0.githubusercontent.com/u/6081537?v=3&s=40)"></div> |
| var gulp = require('gulp'); | |
| var less = require('gulp-less'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var LessPluginCleanCSS = require("less-plugin-clean-css"), | |
| cleancss = new LessPluginCleanCSS({advanced: true}); | |
| var LessPluginAutoPrefix = require('less-plugin-autoprefix'), | |
| autoprefix = new LessPluginAutoPrefix({browsers: ["last 2 versions"]}); | |
| gulp.task('default', function () { | |
| gulp.src('./less/project.less') |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <script> | |
| // query string arguments | |
| Copyright (c) 2011 ZURB, http://www.zurb.com/ |
| // Determine if an element is in the visible viewport | |
| function isInViewport(element) { | |
| var rect = element.getBoundingClientRect(); | |
| var html = document.documentElement; | |
| return ( | |
| rect.top >= 0 && | |
| rect.left >= 0 && | |
| rect.bottom <= (window.innerHeight || html.clientHeight) && | |
| rect.right <= (window.innerWidth || html.clientWidth) | |
| ); |
| var d = document.documentElement.style | |
| if (('flexWrap' in d) || ('WebkitFlexWrap' in d) || ('msFlexWrap' in d)){ | |
| alert('ok'); | |
| } |