Skip to content

Instantly share code, notes, and snippets.

View dmitriid's full-sized avatar

Dmitrii 'Mamut' Dimandt dmitriid

View GitHub Profile
#!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:
#
[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"]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% @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
#### config ####
windowHintsOrder = leftToRight
#### bindings ####
# window hints
bind esc:cmd hint ASDFGHJKLQWERTYUIOPCVBN
#window grid
## 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
get_status_url_prop() ->
?FORALL( {Username, Lower}
, gen_username()
, <<"profiles/", Lower/binary ,"/data/status.json">> == util_content:get_status_url(Username)
).
gen_username() ->
?LET( Username
, list(char())
, begin
$ brew outdated
caskroom/cask/brew-cask (0.54.1 < 0.60.1)
cask (0.7.2 < 0.7.4)
elixir (1.0.5, 1.1.1 < 1.2.0)
erlang (17.5, 18.1 < 18.2.1)
ffmpeg (2.6.2 < 2.8.4)
gettext (0.19.4, 0.19.6 < 0.19.7)
ghc (7.10.2 < 7.10.3b)
glib (2.44.0, 2.46.0 < 2.46.2)
gmp (6.0.0a < 6.1.0)
@dmitriid
dmitriid / j.c
Last active January 15, 2016 09:46
A jtjgets(J jt,C*p){A y;B b;C*v;I j,k,m,n;UC*s;
*jt->adbreak=0;
if(b=1==*p)p=""; /* 1 means literal input */
if(jt->dcs){
++jt->dcs->dcn; j=jt->dcs->dci;
y=jt->dcs->dcy; n=AN(y); s=UAV(y);
RZ(j<n);
jt->dcs->dcj=k=j;
jt->dcs->dci=j=advl(j,n,s);
m=j-k; if(m&&32>s[k+m-1])--m; if(m&&32>s[k+m-1])--m;
///////////
// main.js
///////////
import Rx from 'rx';
import {h} from '@cycle/dom';
const main = (sources) => {
const HELLO_URL = 'https://something/api/v2/or-other/26';
const request$ = Rx.Observable.just(HELLO_URL);
@dmitriid
dmitriid / init.el
Last active February 9, 2016 10:19
My init.el
;;==============================================================================
;; additional packages
;;==============================================================================
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))