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.
| app.notify = (function() { | |
| // Determine the correct object to use | |
| var notification = window.Notification || window.mozNotification || window.webkitNotification || false | |
| , permission = false | |
| , note; | |
| function init() { | |
| notification && notification.requestPermission(permissionSuccess); | |
| } |
| # 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 |