Skip to content

Instantly share code, notes, and snippets.

View drinchev's full-sized avatar
©️
...

Ivan Drinchev drinchev

©️
...
View GitHub Profile

Keybase proof

I hereby claim:

  • I am drinchev on github.
  • I am drinchev (https://keybase.io/drinchev) on keybase.
  • I have a public key ASCLG_6Zyq76n6CRWfaiwT7IqJjLv5B3AyrSHbfiPUF1uAo

To claim this, I am signing this object:

@drinchev
drinchev / gist:9957a01d1db60c3cf4cdeb8a17e20fd1
Created December 29, 2018 20:25
stack-overflow/53972854
const mongoose = require( "mongoose" );
mongoose.connect( "mongodb://localhost:27017/test", { useNewUrlParser : true } );
const Item = mongoose.model( "Item", {
inv : {
type : Object,
default : {}
}
} );
@drinchev
drinchev / candle-sticks.ts
Last active September 20, 2023 09:53
Candle Stick In Terminal
const UP_MOVE = 1;
const DOWN_MOVE = -1;
const SYMBOL_STICK = "│";
const SYMBOL_CANDLE = "┃";
const SYMBOL_HALF_TOP = "╽";
const SYMBOL_HALF_BOTTOM = "╿";
const SYMBOL_HALF_CANDLE_TOP = "╻";
const SYMBOL_HALF_CANDLE_BOTTOM = "╹";
const SYMBOL_HALF_STICK_TOP = "╷";
const SYMBOL_HALF_STICK_BOTTOM = "╵";
@drinchev
drinchev / drinchev.zsh-theme
Created September 28, 2023 08:47
Theme for zsh
# Git: branch/detached head, dirty status
prompt_git() {
local ref dirty mode repo_path
repo_path=$(git rev-parse --git-dir 2>/dev/null)
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
# if [[ -n $dirty ]]; then
# LS_COLORS
# Maintainers: Magnus Woldrich <[email protected]>,
# Ryan Delaney <[email protected]> OpenGPG: 0D98863B4E1D07B6
# URL: https://github.com/trapd00r/LS_COLORS
# Version: 0.254
# Updated: Sun Jun 1 14:36:30 PDT 2014
#
# This is a collection of extension:color mappings, suitable to use as your
# LS_COLORS environment variable. Most of them use the extended color map,
# described in the ECMA-48 document; in other words, you'll need a terminal