Open a console. Terminal.app on Macs, your shell or whatever on PCs.
Python is easiest:
python -m SimpleHTTPServer 8000
Then go to http://localhost:8000/ in a web browser.
| # save to /etc/nginx/conf.d/gzip.conf | |
| gzip on; | |
| gzip_proxied any; | |
| gzip_types text/plain text/xml text/css application/x-javascript; | |
| gzip_vary on; | |
| gzip_disable "MSIE [1-6]\.(?!.*SV1)"; |
| <link rel="import" href="../core-scaffold/core-scaffold.html"> | |
| <link rel="import" href="../core-header-panel/core-header-panel.html"> | |
| <link rel="import" href="../core-menu/core-menu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-icons/core-icons.html"> | |
| <link rel="import" href="../paper-item/paper-item.html"> | |
| <link rel="import" href="../paper-slider/paper-slider.html"> | |
| <link rel="import" href="../paper-toggle-button/paper-toggle-button.html"> |
| // as seen here: https://github.com/zemirco/flexbox-grid/blob/master/flexbox-grid.styl | |
| @import 'nib' | |
| // variables | |
| var-columns = 12 | |
| var-gutter-width = 1rem | |
| // some styles that apply to all columns - makes final css nicer | |
| $common-column-styles | |
| box-sizing(border-box) |
This is a small collection of scripts showing how to use require.js. It's only one of several ways of setting up a require.js project, but it's enough to get started.
At its core, require.js is about three things:
The following files show how these are achieved.
| AddType image/svg+xml svg | |
| AddType image/svg+xml svgz |
| RewriteEngine On | |
| RewriteCond %{HTTP_USER_AGENT} "ipad" [NC] | |
| RewriteRule ipad.html [L,QSA] |
| // As taken from the UnderscoreJS utility framework | |
| function debounce(func, wait, immediate) { | |
| let timeout | |
| return function() { | |
| let context = this | |
| , args = arguments | |
| let later = function() { | |
| timeout = null |
| .word-break { | |
| -ms-word-break: break-all; | |
| word-break: break-word; | |
| word-wrap: break-word; | |
| -webkit-hyphens: auto; | |
| -moz-hyphens: auto; | |
| hyphens: auto; | |
| } |
| ;(function($) { | |
| var delay = 0; | |
| $.fn.translate3d = function(translations, speed, easing, complete) { | |
| var opt = $.speed(speed, easing, complete); | |
| opt.easing = opt.easing || 'ease'; | |
| translations = $.extend({x: 0, y: 0, z: 0}, translations); | |
| return this.each(function() { | |
| var $this = $(this); |