Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| #!/usr/bin/env python | |
| # | |
| # import modules used here -- sys is a very standard one | |
| import sys, argparse, logging | |
| # Gather our code in a main() function | |
| def main(args, loglevel): | |
| logging.basicConfig(format="%(levelname)s: %(message)s", level=loglevel) | |
| # Advanced Bash :: Array slicing and compaction in bash | |
| # TL;DR | |
| X=(something 'whatever' "i have more S P A C E S than i can give away. arent you jealous?") | |
| # ${X[@]} the usual whole array | |
| # ${X[@]:index:length} slice from index to index+length-1 inclusive | |
| # ${X[@]::length} slice from 0 to length-1 inclusive | |
| # ${X[@]:index} slice from index to end of array inclusive |
Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| % module must match file name - no dashes `-`. | |
| -module(pipelines). | |
| -compile(export_all). | |
| %% @doc Emmits signals of value V or F() every M miliseconds N times. | |
| %% | |
| %% @param V value to emit | |
| %% @param M milisecond delay | |
| %% @param N number of cycles | |
| %% @param P process |
| import Data.List (nub) | |
| data Move | |
| = Maxi Int | |
| | Mini Int | |
| instance Show Move where | |
| show (Mini n) = "Mini " ++ (show n) | |
| show (Maxi n) = "Maxi " ++ (show n) |
| module BinaryTree where | |
| data BTree | |
| = Leaf | |
| | Node { value :: Int | |
| , leftBTree :: BTree | |
| , rightBTree :: BTree } | |
| instance Show BTree where | |
| show Leaf = "" |
| module Csv where | |
| import Data.List (lines) | |
| type Row = [String] | |
| type Lines = [String] | |
| type Table = [Row] |
| " NOTE: requires +timers | |
| " cache storage | |
| let g:hoogled_completions = {} | |
| " non-function keywords | |
| let g:hoogle_blacklist = [ | |
| \ 'where', | |
| \ 'let', |
| let g:hoogled_signatures = {} | |
| let g:hoogle_blacklist = [ | |
| \ 'where', | |
| \ 'let', | |
| \ 'class', | |
| \ 'then', | |
| \ 'module', | |
| \ 'qualified', | |
| \ 'data', | |
| \ 'type', |
| module WriterMonad | |
| ( logInput | |
| ) where | |
| import Control.Monad.Writer | |
| import Data.Char (isDigit, isLetter, isLower, | |
| isPunctuation, isSpace, isUpper) | |
| logInput :: String -> [String] | |
| logInput xs = |