Skip to content

Instantly share code, notes, and snippets.

Prelude> data Foo = Foo
Prelude> data Bar = Bar
Prelude> data Baz = Baz
Prelude> data DoesntHave
Prelude> data Has
Prelude> data MyXml:: * -> * -> * -> * where { DFoo :: Foo -> MyXml Has a b; DBar :: Bar -> MyXml a Has b; DBaz :: Baz -> MyXml a b Has }
Prelude> :t [DFoo Foo, DBaz Baz]
[DFoo Foo, DBaz Baz] :: [MyXml Has a Has]
Prelude> let a = DBar Bar :: MyXml Has DoesntHave Has
@max630
max630 / dumb-tv.html
Last active August 29, 2015 14:19
Dumb Tv
<!DOCTYPE html>
<html>
<!--
reads file films.json from the same directory. The file should contain array of arrays,
each of them of length 2. First element is identifier, second - path to the video file. Like this:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[
["a7bb5682ff4bf88a5140165a638770f6b38f2173", "terminator1.mp4"],
["419278cd408cbda642b433e14f18b38977f2a048", "terminator2.mp4"],
["df6ec9c82ca899c3c013daacf283d1c086499b2d", "alien-vs-predator.mp4"]
This file has been truncated, but you can view the full file.
diff --cc Documentation/DocBook/.gitignore
index c102c02,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000..c102c02
mode 100644,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000..100644
--- a/Documentation/DocBook/.gitignore
+++ b/Documentation/DocBook/.gitignore
diff --cc Documentation/block/barrier.txt
index 0397151,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000,0000000..0397151
mode 100644,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000..100644
--- a/Documentation/block/barrier.txt
+++ b/Documentation/block/barrier.txt
@max630
max630 / OMSet.hs
Last active August 29, 2015 14:07
simulation of ocaml's modules with typeclasses with type families
{-# LANGUAGE TypeFamilies, ScopedTypeVariables, ExistentialQuantification, GADTs, Rank2Types #-}
{-# LANGUAGE FlexibleContexts #-}
module OMSet where
import System.Environment (getArgs)
import qualified Data.Set as DS
-- ocaml modules always used exlpicitly, without inferring from arguments
-- simulate it by adding bogus argument to all typeclass types and methods
@max630
max630 / gist:07241cbd17065b946158
Created August 5, 2014 17:21
pa calls used by skype
pa_stream_new
pa_stream_set_state_callback
pa_stream_set_write_callback
pa_stream_set_read_callback
pa_stream_set_underflow_callback
pa_stream_connect_playback
pa_stream_connect_record
pa_stream_disconnect
pa_stream_unref
pa_stream_get_state
@max630
max630 / Makefile
Last active August 29, 2015 14:01
dynamic c++ calls
all: dynamic_lib.so dynamic
dynamic_lib.so: dynamic_lib.cc dynamic.h
g++ -g -Wall -Werror -std=c++11 -shared -o dynamic_lib.so dynamic_lib.cc
dynamic: dynamic_client.cc dynamic.h
g++ -g -Wall -Werror -std=c++11 -o dynamic dynamic_client.cc -ldl
@max630
max630 / wm-notes.txt
Created November 10, 2013 11:32
WM notes
A kind of specs for window manager I need now. A bit overspecified in some places, but is a good start.
Layout:
Windows are floating, should snap each other. Would be interesting to play with tiling features, but only sometimes (auto resize snapped window).
service area is along side, which is ignored by window layouting (initial placement, maximize).
Focusing:
Either click to focus or sloppy focus (depends on having TrackPoint). No autoraise
Decorations:
@-moz-document domain("juick.com") {
html, input {
font-size: 100% !important;
}
#topwrapper {
width: auto !important;
}
#content {
From cd696bc74d369ac5c3a61a93afd327cddd57adf3 Mon Sep 17 00:00:00 2001
From: Max Kirillov <max@max630.net>
Date: Sat, 20 Apr 2013 18:26:31 +0300
Subject: [PATCH 1/3] gitk refactor: split getblobdiffline into IO and text
handling
I would like to hack into diffs which gitk gets from commands.
To ease it, let's divide the read handler, getblobdiffline,
into reading and subsequent handling.
@max630
max630 / gist:2872656
Created June 5, 2012 04:34
Russian phonetic layout for MS Keyboard Layout Creator
KBD RU2 "Russian Phonetic"
COPYRIGHT "(c) 2011 "
COMPANY "Max"
LOCALEID "00000419"
VERSION 1.0