import Data.Functor.Yoneda
import Data.Char
import Data.Kind
infixr 5
·
type List :: (Type -> Type) -> Constraint
class List f where
#! /bin/bash | |
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69) | |
# Download latest Golang release for AMD64 | |
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz | |
set -euf -o pipefail | |
# Install pre-reqs | |
sudo apt-get install python3 git -y | |
o=$(python3 -c $'import os\nprint(os.get_blocking(0))\nos.set_blocking(0, True)') |
--Roughly based on https://github.com/Gabriel439/Haskell-Morte-Library/blob/master/src/Morte/Core.hs by Gabriel Gonzalez et al. | |
data Expr = Star | Box | Var Int | Lam Int Expr Expr | Pi Int Expr Expr | App Expr Expr deriving (Show, Eq) | |
subst v e (Var v') | v == v' = e | |
subst v e (Lam v' ta b ) | v == v' = Lam v' (subst v e ta) b | |
subst v e (Lam v' ta b ) = Lam v' (subst v e ta) (subst v e b ) | |
subst v e (Pi v' ta tb) | v == v' = Pi v' (subst v e ta) tb | |
subst v e (Pi v' ta tb) = Pi v' (subst v e ta) (subst v e tb) | |
subst v e (App f a ) = App (subst v e f ) (subst v e a ) |
cockroachdb/sqlalchemy-cockroachdb#14
- fork django/contrib/postgres driver
- patch blocking postgres compatibility issues
- review with cockroachdb team to see if any issues can be fixed by cockroach
- review with django team
- merge adapter as separate cockroachdb adapter
- write docs, any admin work, etc.
Английская версия: https://evilmartians.com/chronicles/bootstrap-an-intervention
У CSS есть несколько базовых проблем, которые позволяют очень быстро отстрелить себе ногу при неправильном использовании:
-
Глобальный неймспейс – в серверном программировании все что написано в файле, в файле и остается. Все же что написано в css и js засирает глобальное пространство имен со всеми вытекающими. В JS эту проблему сейчас побороли всякими модульными системами, а вот с css сложнее. В идеальном мире это должен починить Shadow DOM и настоящие Web Components, но пока их нет единственный способ с этим бороться – следовать какой-то системе именований селекторов, которая по возможности уменьшает и исключает возможные конфликты.
-
Каскадность – если на один элемент может сработать несколько правил, то они все и сработают последовательно. Если есть элемент
h1.title
, на него сработают все правила для теговh1
и все правила для класса.title
. Так как весь html состоит из тегов, то правил которые п
Host * | |
ControlPersist yes | |
ControlMaster auto | |
ControlPath /tmp/ssh-%r@%h:%p | |
ServerAliveInterval 60 |
I've been looking for the best Linux backup system, and also reading lots of HN comments.
Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.
Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.
- Too complex to configure
- Stores catalog separate from backups, need to backup catalog
var Immutable = require('immutable'); | |
var todos = OrderedMap(); | |
var TodoStore = createStore({ | |
getAll() { return todos; } | |
}); | |
Dispatcher.register(function(action) { | |
if (action.actionType === "create") { | |
var id = createGUID(); |
var marked = require('marked'), | |
fs = require('fs'), | |
path = require('path'), | |
URI = require('URIjs'), | |
renderer = new marked.Renderer(), | |
file = fs.readFileSync('./foo.md', 'utf8'); | |
// Set Marked's rendereer to the custom renderer | |
// optional `localVideoPath` option will be used to to find fallback videos for `.webm`. Defaults to '' | |
marked.setOptions({ |