Skip to content

Instantly share code, notes, and snippets.

git init .
git remote add origin https://github.com/foo/bar
git config core.sparseCheckout true
echo sub/dir >> .git/info/sparse-checkout
git pull --depth 1 origin master # assuming you don't want history either
@stebulus
stebulus / text
Last active August 29, 2015 14:15 — forked from anonymous/text
The question was whether every σ-algebra which separates points
contains the singletons. Let's consider (σ-)algebras of clopen
sets of a topological space. (In fact, by Stone's theorem, there
is no loss of generality in doing so.) The desired conditions for a
counterexample then correspond to topological conditions on the space:
clopen sets separate points :: space is totally disconnected
singletons are not clopen :: no points are isolated
clopen sets form a σ-algebra :: G_δ sets are open
@stebulus
stebulus / holes.hs
Last active August 29, 2015 14:11
Example of static analysis with Applicatives: expression with named holes.
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
FlexibleInstances, FlexibleContexts #-}
import Control.Applicative
import Control.Applicative.Lift
import Data.Functor.Compose
import Data.Functor.Constant
import Data.Maybe
import Data.Monoid
-- expr is an expression with named holes;
import java.io.Reader;
import com.fasterxml.aalto.in.XmlScanner;
import com.fasterxml.aalto.in.ReaderConfig;
public class BufErr {
public static void main(String[] args) {
try {
Reader rdr = new StringArrayReader(new String[] {
"<foo><bar>text<",