Skip to content

Instantly share code, notes, and snippets.

View termosa's full-sized avatar

Stanislav Termosa termosa

View GitHub Profile
@termosa
termosa / queue.js
Last active January 3, 2016 03:39
You can run asynchronous chain of functions by this three lines of code.
/*
* Author: https://github.com/termosa
* Source: https://gist.github.com/termosa/8403061
* Version: 2.0
*/
var queue = function( chain, scope ) {
return chain.length && chain.pop().call( scope||{}, queue( chain, scope )) || undefined;
}
/* Example:
@termosa
termosa / storage.js
Last active January 4, 2016 08:19
Simple Tree Storage
/*
* Author: https://github.com/termosa
* Source: https://gist.github.com/termosa/8594486
* Version: 1.0
*/
var Storage = (function(){
var matchFirstLevelAndRest = function ( link )
{
var matches = link.match( matchFirstLevelAndRest.splitRule );
" Before using this configuration follow the instruction below
"
" Check the requirements for plugins:
" * highlight (brew) required for preview FZF
" * livedown (npm) required for vim-livedown
" * standard (npm) required for syntastic check of javascript
" * tslint (npm) required for syntastic check of typescript
" * typescript (npm) required for Quramy/tsuquyomi
"
" Create folders for storing temporary files
@termosa
termosa / .tmux.conf
Last active October 29, 2016 09:05
Tmux configuration
# start window numering at 1 for easier switching
set -g base-index 1
set-window-option -g pane-base-index 1
# Keep the custom window's name fixed
set-option -g allow-rename off
# Do not lock Vim with Esc
set -s escape-time 0
@termosa
termosa / .zshrc
Last active February 23, 2018 09:52
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="termosa"
# Uncomment the following line to use case-sensitive completion.
hg clone https://code.google.com/p/vim/ vim
cd vim/src
./configure --prefix=/usr/local/ \
--enable-rubyinterp \
--enable-pythoninterp \
--with-features=huge
make && make install
export EDITOR="vim"
alias vi="/usr/local/bin/vim"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
[user]
name = Stanislav Termosa
email = [email protected]
[core]
editor = vi
excludesfile = /Users/termosa/.gitignore
[merge]
tool = vimdiff
[filter "lfs"]
smudge = git-lfs smudge -- %f
const curry = function(len, fn, ...props) {
if (typeof len === 'function') {
if (typeof fn !== 'undefined') props.unshift(fn);
fn = len;
len = fn.length;
}
return (...args) => {
args = props.concat(args);
if (args.length >= len) {
const curry = function(len, fn, ...props) {
if (typeof len === 'function') {
if (typeof fn !== 'undefined') props.unshift(fn);
fn = len;
len = fn.length;
}
const argsList = Array.from({ length: len-props.length })
.map((e,i) => 'a'+i).join(',');
const stepBody = `
return function collect(${argsList}) {