Skip to content

Instantly share code, notes, and snippets.

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

Ivan Drinchev drinchev

©️
...
View GitHub Profile
# LS_COLORS
# Maintainers: Magnus Woldrich <m@japh.se>,
# Ryan Delaney <ryan.delaney@gmail.com> 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
@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
@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 / 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 : {}
}
} );

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:

Verifying that +drinchev is my blockchain ID. https://onename.com/drinchev
<!DOCTYPE html>
<html>
<head>
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
<script>
tinymce.init({
selector:'#editor',
min_height : 300,
@drinchev
drinchev / SassMeister-input.scss
Created December 12, 2014 20:21
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
$themes: (
"theme-1": (
"color": red
),
"theme-2": (
# Throw this in config/initializers and add
# @import variables.sass to the top of application.sass
# to have all variables in app_config.yml
# available as variables in your sass stylesheets
#
# First draft by unixmonkey (http://gist.github.com/323198)
# flatten() added by Raphael J. Schmid <raphael.schmid@gmail.com>
# Full re-write. Configuration function added and can be used in compass/sass
#
# Example configuration.yaml
@drinchev
drinchev / run
Last active August 29, 2015 14:07
qmail start script ( http://www.lifewithqmail.org/lwq.html )
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run