sindresorhus/css-in-readme-like-wat
You can put HTML (actually XHTML) and CSS inside a <foreignObject>
tag inside a SVG file inside an <img>
tag inside your readme. 🤯
Thanks to @Richienb for sharing the trick in this pull request.
sindresorhus/css-in-readme-like-wat
You can put HTML (actually XHTML) and CSS inside a <foreignObject>
tag inside a SVG file inside an <img>
tag inside your readme. 🤯
Thanks to @Richienb for sharing the trick in this pull request.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>App Shell</title> | |
<link rel="manifest" href="/manifest.json"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="styles/inline.css"> | |
</head> |
Alves dos Reis had opened a small checking account with the National City Bank of New York. It took eight days for a check issued in Europe to reach New York by sea. With $40,000 worth of such checks ($600 million today), Reis bought control of Ambaca. When he controlled the company’s reserves he was able to cable the money to New York and make good the checks
app.ports.baseurl.subscribe(function(src) { | |
$.get(src).done(function(d){ //beware of cors | |
document.querySelector("base").href = src; //check whether remote doc base meta tag is setted otherwise | |
var srcs = nosrcs = [], $htm = $(d).appendTo('<div>').parent(),i=0; | |
$htm.find('script').each(function(i,s){ | |
if($(s).is('[src]')){ | |
srcs.push((new URL($(s).attr('src'),'http://www.cm-tvedras.pt')).href); | |
} |
(function(){ | |
const template = document.createElement('template'); | |
template.innerHTML = ` | |
<style> | |
::slotted(*), ::slotted(*:before), ::slotted(*:after) { | |
box-sizing: border-box; | |
} | |
.tags-container { | |
display: -webkit-flex; |
div [ class "container" ] | |
[ div [ class "header" ] | |
[ text "HEADER" ] | |
, div [ class "menu" ] | |
[ text "MENU" ] | |
, div [ class "content" ] | |
[ text "CONTENT" ] | |
, div [ class "footer" ] | |
[ text "FOOTER" ] | |
, node "style" [] |
module MediaObj exposing (mediabox, ModStyles(..)) | |
import Element exposing (Element, el, text, row, column, empty, image, link) | |
import Element.Attributes exposing (alignLeft, alignRight, moveUp, spacing, height, width, maxWidth, maxHeight, px, fill, center, padding, property) | |
import Element.Events exposing (on, onClick) | |
import Color | |
import Style | |
import Style.Color as Color | |
import Style.Background as Background | |
import Style.Border as Border |
2013-10-29
I read an article in the Atlantic today, titled The Myth of 'I'm Bad at Math'. It made some very good points, of course the main one being that all scientific evidence points to the belief that skill in mathematics (skill in anything, really) has very little to do with genetics and almost everything to do with practice. This is an important point to make and one that I wish everyone would
https://raw.github.com/wiki/user/repo/page.md?login=login&token=token |
import Data.Monoid (Monoid, (<>)) | |
-- writer monad. is a way to put a monad structure on tuples | |
-- see https://wiki.haskell.org/Monoid#On_the_Writer_monad | |
{- | |
(w,x) >>= f = | |
case f x of | |
(v, y) -> (w <> v, y) | |
-} | |
-- the monoidal instance of tuple/product allows accumulating -<>- successive 'logs' -a<>c- for each computation -gx,fb |