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;
}
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
using Newtonsoft.Json; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http; | |
namespace WebApplication1.Controllers | |
{ |
// | |
// See https://github.com/louthy/language-ext | |
// | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using LanguageExt; | |
using static LanguageExt.Prelude; |
// used to retrieve template content | |
const templates = new WeakMap; | |
// used to retrieve node updates | |
const updates = new WeakMap; | |
// hyperHTML, the nitty gritty | |
function hyperHTML(chunks, ...interpolations) { | |
// if the static chunks are unknown |
!= | |
!== | |
!=< | |
=| | |
=|| | |
=|: | |
=/ | |
=/= | |
=/< | |
!≡ |
This is some sort of answer to recent posts regarding Web Components, where more than a few misconceptions were delivered as fact.
Let's start by defining what we are talking about.
As you can read in the dedicated GitHub page, Web Components is a group of features, where each feature works already by itself, and it doesn't need other features of the group to be already usable, or useful.
a gist to recap the current status, also available as library picker!
do one thing only and do it well
A very simple comparison table between these two libraries.
uce | lit-element | |
---|---|---|
version | 1.11.9 | 2.4.0 |
license | ISC (simplified MIT) | BSD-3-Clause License |
language | JS w/ TS definition | TS w/ JS transpilation |
size ( brotli ) | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |