Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitrii 'Mamut' Dimandt dmitriid

View GitHub Profile
View git-completion.sh
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
View .gitconfig
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
bug = !git rev-parse --abbrev-ref HEAD | sed 's/.*\\(\\<[[:alpha:]]\\+\\>\\)\\-\\(\\<[[:digit:]]\\+\\>\\).*/\\1-\\2/g' | cat
mm = !git commit -m \"`git bug` $1\" ${@:2} && :
[user]
name = Dmitrii Dimandt
email = dmitrii.dimandt@klarna.com
[merge]
tool = diffmerge
[mergetool "diffmerge"]
View inets_test_lib.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% @doc site outputs secure http-only cookies. Because of that you
%%% cannot mix Selenium and inets in your tests
%%%
%%% Basically, when you find youself writing code like
%%% {ok, Cookie} = kselenium:cmd(getCookie, []),
%%% httpc:request(get, {Page, [{"Cookie", Cookie}]},[],[])
%%% this *will not work*. You must use inets.
%%%
%%% This lib ensures that cookies are recorded and sent out with each
View .slate
#### config ####
windowHintsOrder = leftToRight
#### bindings ####
# window hints
bind esc:cmd hint ASDFGHJKLQWERTYUIOPCVBN
#window grid
View .fecthmailrc
## cat ~/.fetchmailrc
poll imap.gmail.com with proto IMAP
user 'USERNAME' there with password 'PASSWORD' is 'LOCALUSER' here
options keep fetchall ssl mda "procmail -d %T"
folder INBOX
## cat ~/.procmailrc
View chain.erl
start() ->
case chain([ fun some_fun/1
, fun some_fun/2
....
], SomeData) of
{error, _} = E -> E;
{ok, Output} -> Output
end.
some_fun1(Input0) ->
View gist:d3e2f2168cbe23aca577
ПРИПЕВ
- Настоящий хотон(коровник) свеж! Барыта!(Все) Балбахынан!(Навозом) Сыбыллыбыт!(Утрамбовано)
- К хотону(коровнику), липнет еще и кэш! Уонна(И)! Бадаран(ГРЯЗЬ)! Эмиэ(ЕЩЕ)!
- Ароматом он пленит кыыс(ДЕВЧОНОК)! Барыта(ВСЕ)! Ынах(КОРОВАМИ)! Сыта(ПАХНЕТ)!
- Эй, детка давай выпьем кумыс! Одьэ(Ооо)! Ынырык(ОЧЕНЬ)! Минигэс(ВКУСНО)!
*
Мои унты(ТОРБАЗА) блестят, в них даже впускают в Европу(В ЯКУТСКЕ ЕСТЬ ТАКОЙ КЛУБ)
Ну, а в Гэлэкси(НАЗВАНИЕ КЛУБА), мне говорят: «- Иди в жопу»!
View b.erl
%% более читабельно
resolve_family({_,_,_,_}, auto) -> inet;
resolve_family({_,_,_,_,_,_,_,_}, auto) -> inet6;
resolve_family(IP, auto) -> throw({error, {strange_family, IP}});
resolve_family(_, F) -> F.
%% менее читабельно
resolve_family({_,_,_,_}, auto) -> inet;
resolve_family({_,_,_,_,_,_,_,_}, auto) -> inet6;
resolve_family(IP, auto) -> throw({error, {strange_family, IP}});
View .slate
config defaultToCurrentScreen true
bind g:cmd grid padding:5 0:16,8 1:12,4
View wtf_ex.md

Как было

> [1, [2], 3] |> List.flatten

Как стало

>> [1, [2], 3] |> List.flatten()