When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}| if (!('localStorage' in window)) { | |
| window.localStorage = { | |
| _data : {}, | |
| setItem : function(id, val) { return this._data[id] = String(val); }, | |
| getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, | |
| removeItem : function(id) { return delete this._data[id]; }, | |
| clear : function() { return this._data = {}; } | |
| }; | |
| } |
| # requires ~/.aws/config or $ aws configure to work | |
| alias inst="aws ec2 describe-instances --output text|grep INSTANCES|cut -f10,14" |
| function getType (value) { | |
| let type = typeof value; | |
| if (type === 'object') { | |
| return value ? Object.prototype.toString.call(value).slice(8, -1) : 'null'; | |
| } | |
| return type; | |
| } | |
| [NaN, 0, 1, Infinity, // numbers | |
| null, undefined, false, 'str', // other primitives |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body ng-app="APP"> | |
| <div ng-controller="ctrl"> | |
| <div scope-test |
| /** | |
| * This file/module contains all configuration for the build process. | |
| */ | |
| /** | |
| * Load requires and directory resources | |
| */ | |
| var join = require('path').join, | |
| bowerrc = JSON.parse(require('fs').readFileSync('./.bowerrc', {encoding: 'utf8'})), | |
| bowerJSON = bowerrc.json.replace(/^\.?\/?/, './'), |
| angular.module('directives.scrollSpy', []) | |
| .directive('spy', ($location) -> | |
| restrict: 'A' | |
| require: '^scrollSpy' | |
| link: (scope, elem, attrs, scrollSpy) -> | |
| attrs.spyClass ?= 'active' | |
| elem.click (e) -> | |
| e.stopPropagation() |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Building a router</title> | |
| <script> | |
| // Put John's template engine code here... | |
| (function () { | |
| // A hash to store our routes: |