Skip to content

Instantly share code, notes, and snippets.

Avatar

Dmitrii 'Mamut' Dimandt dmitriid

View GitHub Profile
View maybe.erl
-spec lift(fun()) -> maybe(_, _).
%% @doc Lift F into maybe().
lift(F) ->
try F() of
ok -> {ok, ok};
{ok, Res} -> {ok, Res};
error -> {error, error};
{error, Rsn} -> {error, Rsn};
Res -> {ok, Res}
catch
View bundle_css.js
/***
* Compile *.styl files to css.css:
* node build_css.js
*
* Watch *.styl files and compile them to css.css:
* node build_css.js -w
*/
var chokidar = require('chokidar');
var stylus = require('stylus');
View lc.md
-module(lc).

-export([lc/0]).

lc() ->
 [{X, Y} || X <- lists:seq(1, 5), Y <- lists:seq(1, 5), X rem 2 == 0, Y rem 2 == 1 ].

core:

View httpcycle.md

The answer: it should've been .merge in button's model, not .combineLatest. Obviously

Intended behaviour:

  • click the button
  • while the request is sent, display 'Loading...'
  • when the response is received, display original button
  • there are random color changes when the button is clicked (just to see that everything works)
View a.sh
> git show 031eba227fde3d82b8962537678701ac0cefbda6
tree 031eba227fde3d82b8962537678701ac0cefbda6
.git/
Emakefile
License.txt
Makefile
README.txt
ebin/
src/
View ideas
[ категории новостей: [ события/конференции
| библиотеки(аппликухи)
| статьи о языке(общего характера)
]
, проверка новостей перед отправкой: есть ли смысл вообще писать про этот проект
, коллективные переводы статей
, ссылки на материалы с прошедших событий/конференций
, теги к статьям/новостям (не только авторы)
, собирать и сохранять у себя презентации/видео/прочие ресурсы
, нормальная фильтрация потока с твиттера
View .bashrc
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.utf8
#
# Pretty log with branches and stuff
# http://coderwall.com/p/euwpig?i=3&p=1&t=git
#
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
View gist:4624770
Jag == Fundament == Pa sondagar
sover == Verb == sover
== Subject == jag
på sofa == Object == på sofa
== Fundament == När
Sover == Verb == sover
du == Subject == du
View a.txt
deck of cards
Libertalia, Lords of Waterdeep, Copycat
Race for the galaxy, Gloom, Ascension, roborally
deck of cards, Uno, Bang!, Munchkin
Elder Sign, Illuminati, C'thulhu Dice
Bang, Catan, Red November, Pandemia
munchkin zombies/superheroes
Caylus, Dominion, 7 Wonders, Agricola, Puerto Rico
Civilization - the boardgame based on the video game based on the boardgame
Carcassone, Forbidden islan, Puerto Rico, Catan
View jira2branch.sh
#!/bin/bash -e
# Usage # copy from browser "JIRA-205\nTicket title"
# $ jira2branch # echoes jira-205-ticket-title
# $ JIRA2BRANCH_TEAM=team jira2branch # echoes jira-205-team-ticket-title
# $ jira2branch team2 # override mode
# echoes jira-205-team2-ticket-title ignoring $JIRA2BRANCH_TEAM
OS=`uname`