Skip to content

Instantly share code, notes, and snippets.

@Lenchik
Lenchik / monad.R
Created August 17, 2016 21:02 — forked from chiral/monad.R
Monads on R
"%<-%" <- function(x,y) call("<-",substitute(x),substitute(y))
returm <- function(x) call("return",substitute(x))
exec <- quote
join <- function(ss,sep) {
res <- ""
for (s in ss) {
res <- paste(res,s,sep=sep)
}
res
@Lenchik
Lenchik / git.tex
Created August 7, 2016 19:27 — forked from ScumCoder/git.tex
Код для печати git hash в колонтитуле
\usepackage{python}
%Добавляет на каждую страницу hash текущего git-коммита
\begin{python}
#! /usr/bin/python
import os, string
cmd = 'git rev-parse --verify HEAD'
fpipe = os.popen(cmd)
piperesult = fpipe.read()
fpipe.close()
@Lenchik
Lenchik / example.md
Created July 6, 2016 16:43 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
@Lenchik
Lenchik / hack4tex
Created March 8, 2016 11:12 — forked from gramian/hack4tex
A small script to use the hack truetype font in pdflatex
#!/bin/sh
# hack4tex 0.1
# Copyright (c) 2016 Christian Himpe
# released under BSD 2-Clause License ( opensource.org/licenses/BSD-2-Clause )
# based on Stephan Lehmke's answer to "How do I use TrueType Fonts with PDFTeX
# using otftotfm?" on tex.stackexchange.com/a/52902
#
# requires otftotfm which is part of lcdf-typetools
#