Skip to content

Instantly share code, notes, and snippets.

@neocris
neocris / explanation.md
Last active December 9, 2020 19:53
css in readme
<!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>
@neocris
neocris / ambaca.md
Last active November 5, 2019 15:22
[float]

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

@neocris
neocris / yui-load.js
Last active October 17, 2019 18:34
[YUI] yui sync load of sorts #load #dependency_injection #require.js #yui #modules
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);
}
@neocris
neocris / tag.html
Last active October 17, 2019 18:09
[Tag] web component #tags #component
(function(){
const template = document.createElement('template');
template.innerHTML = `
<style>
::slotted(*), ::slotted(*:before), ::slotted(*:after) {
box-sizing: border-box;
}
.tags-container {
display: -webkit-flex;
@neocris
neocris / grid.elm
Last active October 17, 2019 18:07
[Grid] #layout #template
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" []
@neocris
neocris / MediaObj.elm
Last active October 17, 2019 18:08
[MediaObj] elm module #mediaobj #component
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
@neocris
neocris / math_solve_forx.md
Last active May 10, 2019 09:24
The Myth that Math is Solving for X

The Myth that Math is Solving for X

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

@neocris
neocris / gist:d0a7a0fe20d324b6f4ced8da546de7d4
Created November 20, 2018 19:55 — forked from nnja/gist:9136152c163091614e70defcf3753d06
How to access the raw markdown source for a github wiki page
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