Skip to content

Instantly share code, notes, and snippets.

@elig0n
elig0n / README-cdx.md
Created July 7, 2020 22:47 — forked from programus/README-cdx.md
Extended windows cd command

CDX Command - CD eXtension batch file

This is a batch file could help you change working directory easier especially you need to change many directories very often like me.

Features

  • Save histroy of all navigated directories
  • No duplicated directories in histroy
  • Name history directories
  • Jump into any directory in histroy by index or name
  • Quich jump into previous directory
  • Maintain history list
@elig0n
elig0n / copy-permalink.lua
Last active June 18, 2020 11:48 — forked from olejorgenb/copy-permalink.lua
mpv user script: copy a command that will resume video at current position
@elig0n
elig0n / python-run.vimrc
Created May 17, 2020 17:25 — forked from vishnubob/python-run.vimrc
Add this to your .vimrc to execute python in a new window. If your program produces no output, no windows is created.
nnoremap <silent> <leader><space> :call SaveAndExecutePython()<CR>
vnoremap <silent> <leader><space> :<C-u>call SaveAndExecutePython()<CR>
" https://stackoverflow.com/questions/18948491/running-python-code-in-vim
function! SaveAndExecutePython()
" SOURCE [reusable window]: https://github.com/fatih/vim-go/blob/master/autoload/go/ui.vim
" save and reload current file
silent execute "update | edit"
@elig0n
elig0n / zsh-alt-args.zsh
Created April 23, 2020 11:53
Display bash-like (args: N) when using multipliers
# Display NUMERIC too
zle -N digit-argument _digit_argument
zle -N neg-argument _digit_argument
function _digit_argument () {
if [[ $WIDGET = neg-argument ]]; then
if [[ -n $NUMERIC ]]; then
zle -M - ""
else
zle -M - -
fi
@elig0n
elig0n / bunnyfetch.sh
Created April 18, 2020 20:16
bunnyfetch.sh
#!/bin/bash
# Tiny colored fetch script
# Requires Typicons Font to display the icons
# elenapan @ github
f=3 b=4
for j in f b; do
for i in {0..7}; do
printf -v $j$i %b "\e[${!j}${i}m"
done
@elig0n
elig0n / UrlHighlightParams.vim
Last active September 13, 2020 01:58
Vim function to highlight URL, query parameters and values in different colors
function! UrlHighlight()
hi Hyperlink ctermfg=white ctermbg=darkmagenta guifg=white guibg=darkmagenta
syntax match Hyperlink `\v<(((https?|ftp|gopher|telnet)://|(mailto|file|news|about|ed2k|irc|sip|magnet):)[^' \t<>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' \t<>"/]+)[a-z0-9/]`
hi UrlParametersQ ctermfg=red ctermbg=NONE guifg=red guibg=NONE
syntax match UrlParametersQ '?' containedin=Hyperlink
hi UrlParametersQVal ctermfg=lightblue ctermbg=NONE guifg=lightblue guibg=NONE
syntax match UrlParametersQVal '=\@<=.\{-}[&\n]\@=' containedin=Hyperlink
@elig0n
elig0n / myweechat.md
Created March 5, 2020 23:29 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 2.8-dev

Enable mouse

/mouse enable

@elig0n
elig0n / solarized.dircolors
Last active September 5, 2022 01:04
Solarized .dircolors (prevent eye pain on some terminals)
# Exact Solarized Dark color theme for the color GNU ls utility.
# Designed for dircolors (GNU coreutils) 5.97
#
# This simple theme was simultaneously designed for these terminal color schemes:
# - Solarized dark (best)
# - Solarized light
# - default dark
# - default light
# with a slight optimization for Solarized Dark.
#
@elig0n
elig0n / tmux.conf
Created February 23, 2020 14:32 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@elig0n
elig0n / ytdl.ahk
Created February 22, 2020 15:16
youtube-dl autohotkey dialog
Gui, YTDL:New, , Youtube-DL
Gui, Add, Edit, Section R1 W400 vUrl, URL
Gui, Add, Checkbox, ys+3 vAudio, Audio
Gui, Add, Button, xs+ Section w80 gOK, &OK
Gui, Add, Button, ys w80 gGuiClose, &Cancel
Gui, Show
Return
GuiClose:
GuiEscape: