Skip to content

Instantly share code, notes, and snippets.

View yfyf's full-sized avatar

Ignas Vyšniauskas yfyf

View GitHub Profile
@yfyf
yfyf / Command-T-on-deb.md
Last active December 15, 2015 06:09
Note to not forget what is needed for Command-T on Debian
  • sudo apt-get install gcc vim-nox ruby ruby-dev
  • do the stuff from INSTALLATION
  • compile C extension manually
@yfyf
yfyf / receiver.erl
Created January 25, 2013 13:55
Receiver snippet
Pid = spawn(fun() -> F = fun (Fun) -> receive A -> erlang:display(A), Fun(Fun) end end, F(F) end).
@yfyf
yfyf / foobar_rebar_plugin.erl
Created November 23, 2012 11:25
execute rebar plugin when explicit only
-module(foobar_rebar_plugin).
-export([
pre_compile/2
]).
pre_compile(Config, AppFile) ->
case is_explicit_plugin(Config) of
true ->
%% Do Stuff.
@yfyf
yfyf / limit-infinity
Created February 4, 2012 15:08
motivation for the extended integers
Return = case NumberGrouping of
default ->
Nums = [Nr || {Nr, _} <- ctree:get_nr(ResultTree, [{count, Limit}])],
Sublist = case Limit of
infinity ->
Numbers;
L when is_integer(L) ->
lists:sublist(number_utils:expand_list(Nums), Limit)
end,
number_utils:reduce_list(Sublist).
@yfyf
yfyf / measure_theory.tex
Created October 9, 2011 23:35
Measure Theory Notes
\documentclass[12pt]{article}
\usepackage{amsfonts, amsthm, amsmath}
\usepackage{verbatim}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{9.5in}
\setlength{\topmargin}{0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\parskip}{0pt}