aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-04-25 18:46:05 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-04-25 18:46:05 +0300
commit5218b3e97baf19270912089ac373ab3d1c0a6a3b (patch)
treedb91c58cae6c1e005533f09f9151982b6e5aa067
downloadlinux-home-5218b3e97baf19270912089ac373ab3d1c0a6a3b.tar.gz
linux-home-5218b3e97baf19270912089ac373ab3d1c0a6a3b.zip
initial commit
Diffstat (limited to '')
-rw-r--r--.bash_profile60
-rw-r--r--.bashrc246
-rw-r--r--.curlrc1
-rw-r--r--.fonts.conf28
-rw-r--r--.gitattributes1
-rw-r--r--.gitconfig25
-rw-r--r--.gitignore8
-rw-r--r--.inputrc76
-rw-r--r--.profile37
-rw-r--r--.vimrc119
10 files changed, 601 insertions, 0 deletions
diff --git a/.bash_profile b/.bash_profile
new file mode 100644
index 0000000..2732697
--- /dev/null
+++ b/.bash_profile
@@ -0,0 +1,60 @@
+# To the extent possible under law, the author(s) have dedicated all
+# copyright and related and neighboring rights to this software to the
+# public domain worldwide. This software is distributed without any warranty.
+# You should have received a copy of the CC0 Public Domain Dedication along
+# with this software.
+# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+
+# base-files version 4.2-3
+
+# ~/.bash_profile: executed by bash(1) for login shells.
+
+# The latest version as installed by the Cygwin Setup program can
+# always be found at /etc/defaults/etc/skel/.bash_profile
+
+# Modifying /etc/skel/.bash_profile directly will prevent
+# setup from updating it.
+
+# The copy in your home directory (~/.bash_profile) is yours, please
+# feel free to customise it to create a shell
+# environment to your liking. If you feel a change
+# would be benifitial to all, please feel free to send
+# a patch to the cygwin mailing list.
+
+# User dependent .bash_profile file
+
+# source the users bashrc if it exists
+if [ -f "${HOME}/.bashrc" ] ; then
+ source "${HOME}/.bashrc"
+fi
+
+# Set PATH so it includes user's private bin if it exists
+# if [ -d "${HOME}/bin" ] ; then
+# PATH="${HOME}/bin:${PATH}"
+# fi
+
+# Set MANPATH so it includes users' private man if it exists
+# if [ -d "${HOME}/man" ]; then
+# MANPATH="${HOME}/man:${MANPATH}"
+# fi
+
+# Set INFOPATH so it includes users' private info if it exists
+# if [ -d "${HOME}/info" ]; then
+# INFOPATH="${HOME}/info:${INFOPATH}"
+# fi
+
+spawn_ssh_agent() {
+ if [ -z "${SSH_AGENT_PID:+x}" -o -z "${SSH_AUTH_SOCK:+x}" ]; then
+ local ssh_agent
+ ssh_agent="$( which ssh-agent 2> /dev/null )" || return $?
+ eval "$( "$ssh_agent" -s )" > /dev/null || return $?
+ trap "kill $SSH_AGENT_PID" 0
+ ssh-add || return $?
+ fi
+}
+
+if [ "$( uname -o )" == "Cygwin" ]; then
+ spawn_ssh_agent
+fi
+
+echo "Welcome to $( hostname )"
diff --git a/.bashrc b/.bashrc
new file mode 100644
index 0000000..331dbc3
--- /dev/null
+++ b/.bashrc
@@ -0,0 +1,246 @@
+# To the extent possible under law, the author(s) have dedicated all
+# copyright and related and neighboring rights to this software to the
+# public domain worldwide. This software is distributed without any warranty.
+# You should have received a copy of the CC0 Public Domain Dedication along
+# with this software.
+# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+
+# base-files version 4.2-3
+
+# ~/.bashrc: executed by bash(1) for interactive shells.
+
+# The latest version as installed by the Cygwin Setup program can
+# always be found at /etc/defaults/etc/skel/.bashrc
+
+# Modifying /etc/skel/.bashrc directly will prevent
+# setup from updating it.
+
+# The copy in your home directory (~/.bashrc) is yours, please
+# feel free to customise it to create a shell
+# environment to your liking. If you feel a change
+# would be benifitial to all, please feel free to send
+# a patch to the cygwin mailing list.
+
+# User dependent .bashrc file
+
+# If not running interactively, don't do anything
+[[ "$-" != *i* ]] && return
+
+set -o pipefail
+set -o nounset
+
+# Shell Options
+#
+# See man bash for more options...
+#
+# Don't wait for job termination notification
+# set -o notify
+#
+# Don't use ^D to exit
+# set -o ignoreeof
+#
+# Use case-insensitive filename globbing
+# shopt -s nocaseglob
+#
+# Make bash append rather than overwrite the history on disk
+# shopt -s histappend
+#
+# When changing directory small typos can be ignored by bash
+# for example, cd /vr/lgo/apaache would find /var/log/apache
+# shopt -s cdspell
+
+# Completion options
+#
+# These completion tuning parameters change the default behavior of bash_completion:
+#
+# Define to access remotely checked-out files over passwordless ssh for CVS
+# COMP_CVS_REMOTE=1
+#
+# Define to avoid stripping description in --option=description of './configure --help'
+# COMP_CONFIGURE_HINTS=1
+#
+# Define to avoid flattening internal contents of tar files
+# COMP_TAR_INTERNAL_PATHS=1
+#
+# Uncomment to turn on programmable completion enhancements.
+# Any completions you add in ~/.bash_completion are sourced last.
+# [[ -f /etc/bash_completion ]] && . /etc/bash_completion
+
+# History Options
+#
+# Don't put duplicate lines in the history.
+# export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
+#
+# Ignore some controlling instructions
+# HISTIGNORE is a colon-delimited list of patterns which should be excluded.
+# The '&' is a special pattern which suppresses duplicate entries.
+# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit'
+# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit:ls' # Ignore the ls command as well
+#
+# Whenever displaying the prompt, write the previous line to disk
+# export PROMPT_COMMAND="history -a"
+
+# Aliases
+#
+# Some people use a different file for aliases
+# if [ -f "${HOME}/.bash_aliases" ]; then
+# source "${HOME}/.bash_aliases"
+# fi
+#
+# Some example alias instructions
+# If these are enabled they will be used instead of any instructions
+# they may mask. For example, alias rm='rm -i' will mask the rm
+# application. To override the alias instruction use a \ before, ie
+# \rm will call the real rm not the alias.
+#
+# Interactive operation...
+# alias rm='rm -i'
+# alias cp='cp -i'
+# alias mv='mv -i'
+#
+# Default to human readable figures
+alias df='df -h'
+alias du='du -h'
+#
+# Misc :)
+alias less='less -R' # raw control characters
+alias whence='type -a' # where, of a sort
+alias grep='grep --color' # show differences in colour
+alias egrep='egrep --color=auto' # show differences in colour
+alias fgrep='fgrep --color=auto' # show differences in colour
+#
+# Some shortcuts for different directory listings
+alias ls='ls -hF --color=tty' # classify files in colour
+alias dir='ls --color=auto --format=vertical'
+alias vdir='ls --color=auto --format=long'
+alias ll='ls -l' # long list
+alias la='ls -A' # all but . and ..
+alias l='ls -CF' #
+
+# Umask
+#
+# /etc/profile sets 022, removing write perms to group + others.
+# Set a more restrictive umask: i.e. no exec perms for others:
+# umask 027
+# Paranoid: neither group nor others have any perms:
+# umask 077
+
+# Functions
+#
+# Some people use a different file for functions
+# if [ -f "${HOME}/.bash_functions" ]; then
+# source "${HOME}/.bash_functions"
+# fi
+#
+# Some example functions:
+#
+# a) function settitle
+# settitle ()
+# {
+# echo -ne "\e]2;$@\a\e]1;$@\a";
+# }
+#
+# b) function cd_func
+# This function defines a 'cd' replacement function capable of keeping,
+# displaying and accessing history of visited directories, up to 10 entries.
+# To use it, uncomment it, source this file and try 'cd --'.
+# acd_func 1.0.5, 10-nov-2004
+# Petar Marinov, http:/geocities.com/h2428, this is public domain
+# cd_func ()
+# {
+# local x2 the_new_dir adir index
+# local -i cnt
+#
+# if [[ $1 == "--" ]]; then
+# dirs -v
+# return 0
+# fi
+#
+# the_new_dir=$1
+# [[ -z $1 ]] && the_new_dir=$HOME
+#
+# if [[ ${the_new_dir:0:1} == '-' ]]; then
+# #
+# # Extract dir N from dirs
+# index=${the_new_dir:1}
+# [[ -z $index ]] && index=1
+# adir=$(dirs +$index)
+# [[ -z $adir ]] && return 1
+# the_new_dir=$adir
+# fi
+#
+# #
+# # '~' has to be substituted by ${HOME}
+# [[ ${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}"
+#
+# #
+# # Now change to the new dir and add to the top of the stack
+# pushd "${the_new_dir}" > /dev/null
+# [[ $? -ne 0 ]] && return 1
+# the_new_dir=$(pwd)
+#
+# #
+# # Trim down everything beyond 11th entry
+# popd -n +11 2>/dev/null 1>/dev/null
+#
+# #
+# # Remove any other occurence of this dir, skipping the top of the stack
+# for ((cnt=1; cnt <= 10; cnt++)); do
+# x2=$(dirs +${cnt} 2>/dev/null)
+# [[ $? -ne 0 ]] && return 0
+# [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}"
+# if [[ "${x2}" == "${the_new_dir}" ]]; then
+# popd -n +$cnt 2>/dev/null 1>/dev/null
+# cnt=cnt-1
+# fi
+# done
+#
+# return 0
+# }
+#
+# alias cd=cd_func
+
+PS1='\[\e[33m\]\W\[\e[0m\]: '
+
+nwx_host=172.28.10.2
+nwx_dev=172.28.12.149
+nwx_dev2=172.28.19.60
+nwx_dev3=172.28.19.61
+
+alias trim_trailing_whitespace='sed --binary --in-place '"'"'s/[[:blank:]]*\(\r\?\)$/\1/'"'"
+alias trim_trailing_dos_newlines='sed --binary --in-place -e :a -e '"'"'/^\(\r\n\)*\r$/{$d;N;ba}'"'"
+alias trim_trailing_unix_newlines='sed --binary --in-place -e :a -e '"'"'/^\n*$/{$d;N;ba}'"'"
+alias ensure_ends_with_dos_newline='sed --binary --in-place -e '"'"'$s/\r\?$/\r/;a\'"'"
+alias ensure_ends_with_unix_newline='sed --binary --in-place -e '"'"'$a\'"'"
+
+sanitize_dos_files() {
+ trim_trailing_whitespace "$@" && trim_trailing_dos_newlines "$@" && ensure_ends_with_dos_newline "$@"
+ return $?
+}
+
+sanitize_unix_files() {
+ trim_trailing_whitespace "$@" && trim_trailing_unix_newlines "$@" && ensure_ends_with_unix_newline "$@"
+ return $?
+}
+
+backup_repo() {
+ for repo_path; do
+ local zipname="$( basename "$repo_path" )_$( date -u +'%Y%m%dT%H%M%S' ).zip"
+ git archive \
+ --format=zip -9 \
+ --output="/cygdrive/c/Users/$( whoami )/Dropbox/backups/$zipname" \
+ --remote="$repo_path" \
+ HEAD
+ done
+}
+
+backup_repo_nwx() {
+ for repo_path; do
+ local zipname="$( basename "$repo_path" )_$( date -u +'%Y%m%dT%H%M%S' ).zip"
+ git archive \
+ --format=zip -9 \
+ --output="//spbfs02/P/Personal/Egor Tensin/$zipname" \
+ --remote="$repo_path" \
+ HEAD
+ done
+}
diff --git a/.curlrc b/.curlrc
new file mode 100644
index 0000000..9d560bd
--- /dev/null
+++ b/.curlrc
@@ -0,0 +1 @@
+--write-out "\n"
diff --git a/.fonts.conf b/.fonts.conf
new file mode 100644
index 0000000..1141094
--- /dev/null
+++ b/.fonts.conf
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+
+<fontconfig>
+ <match target="font">
+ <edit mode="assign" name="rgba"><const>rgb</const></edit>
+ <edit mode="assign" name="antialias"><bool>true</bool></edit>
+ <edit mode="assign" name="hinting"><bool>true</bool></edit>
+ <edit mode="assign" name="hintstyle"><const>hintfull</const></edit>
+ </match>
+ <alias>
+ <family>serif</family>
+ <prefer><family>Liberation Serif</family></prefer>
+ </alias>
+ <alias>
+ <family>sans-serif</family>
+ <prefer><family>Liberation Sans</family></prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer><family>Liberation Mono</family></prefer>
+ </alias>
+ <match target="font">
+ <test name="family"><string>Liberation Mono</string></test>
+ <edit mode="assign" name="pixelsize"><double>14</double></edit>
+ </match>
+</fontconfig>
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6313b56
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
diff --git a/.gitconfig b/.gitconfig
new file mode 100644
index 0000000..b089ca6
--- /dev/null
+++ b/.gitconfig
@@ -0,0 +1,25 @@
+[user]
+ name = Egor Tensin
+ email = Egor.Tensin@gmail.com
+[core]
+ editor = vim
+ ignorecase = false
+ autocrlf = true
+[push]
+ default = current
+[merge]
+ tool = kdiff3
+[mergetool "kdiff3"]
+ trustExitCode = false
+[mergetool]
+ keepBackup = false
+[diff]
+ tool = kdiff3
+[difftool]
+ keepBackup = false
+[difftool "kdiff3"]
+ trustExitCode = false
+[pull]
+ ff = only
+[config]
+ autocrlf = true
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..849040f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+.bash_history
+.gnupg/
+.lesshst
+.minttyrc
+.rnd
+.ssh/
+.vim/
+.viminfo
diff --git a/.inputrc b/.inputrc
new file mode 100644
index 0000000..b7c4891
--- /dev/null
+++ b/.inputrc
@@ -0,0 +1,76 @@
+# To the extent possible under law, the author(s) have dedicated all
+# copyright and related and neighboring rights to this software to the
+# public domain worldwide. This software is distributed without any warranty.
+# You should have received a copy of the CC0 Public Domain Dedication along
+# with this software.
+# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+
+# base-files version 4.2-3
+
+# ~/.inputrc: readline initialization file.
+
+# The latest version as installed by the Cygwin Setup program can
+# always be found at /etc/defaults/etc/skel/.inputrc
+
+# Modifying /etc/skel/.inputrc directly will prevent
+# setup from updating it.
+
+# The copy in your home directory (~/.inputrc) is yours, please
+# feel free to customise it to create a shell
+# environment to your liking. If you feel a change
+# would be benifitial to all, please feel free to send
+# a patch to the cygwin mailing list.
+
+# the following line is actually
+# equivalent to "\C-?": delete-char
+"\e[3~": delete-char
+
+# VT
+"\e[1~": beginning-of-line
+"\e[4~": end-of-line
+
+# kvt
+"\e[H": beginning-of-line
+"\e[F": end-of-line
+
+# rxvt and konsole (i.e. the KDE-app...)
+"\e[7~": beginning-of-line
+"\e[8~": end-of-line
+
+# VT220
+"\eOH": beginning-of-line
+"\eOF": end-of-line
+
+# Allow 8-bit input/output
+#set meta-flag on
+#set convert-meta off
+#set input-meta on
+#set output-meta on
+#$if Bash
+ # Don't ring bell on completion
+ set bell-style none
+
+ # or, don't beep at me - show me
+ set bell-style visible
+
+ # Filename completion/expansion
+ set completion-ignore-case on
+ set show-all-if-ambiguous on
+
+ # Expand homedir name
+ set expand-tilde on
+
+ # Append "/" to all dirnames
+ set mark-directories on
+ set mark-symlinked-directories on
+
+ # Match all files
+ set match-hidden-files on
+
+ # 'Magic Space'
+ # Insert a space character then performs
+ # a history expansion in the line
+ #Space: magic-space
+
+ TAB: menu-complete
+#$endif
diff --git a/.profile b/.profile
new file mode 100644
index 0000000..209c38d
--- /dev/null
+++ b/.profile
@@ -0,0 +1,37 @@
+# To the extent possible under law, the author(s) have dedicated all
+# copyright and related and neighboring rights to this software to the
+# public domain worldwide. This software is distributed without any warranty.
+# You should have received a copy of the CC0 Public Domain Dedication along
+# with this software.
+# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+
+# base-files version 4.2-3
+
+# ~/.profile: executed by the command interpreter for login shells.
+
+# The latest version as installed by the Cygwin Setup program can
+# always be found at /etc/defaults/etc/skel/.profile
+
+# Modifying /etc/skel/.profile directly will prevent
+# setup from updating it.
+
+# The copy in your home directory (~/.profile) is yours, please
+# feel free to customise it to create a shell
+# environment to your liking. If you feel a change
+# would be benificial to all, please feel free to send
+# a patch to the cygwin mailing list.
+
+# User dependent .profile file
+
+# Set user-defined locale
+export LANG=$(locale -uU)
+
+# This file is not read by bash(1) if ~/.bash_profile or ~/.bash_login
+# exists.
+#
+# if running bash
+if [ -n "${BASH_VERSION}" ]; then
+ if [ -f "${HOME}/.bashrc" ]; then
+ source "${HOME}/.bashrc"
+ fi
+fi
diff --git a/.vimrc b/.vimrc
new file mode 100644
index 0000000..1900083
--- /dev/null
+++ b/.vimrc
@@ -0,0 +1,119 @@
+" An example for a vimrc file.
+"
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last change: 2014 Nov 05
+"
+" To use it, copy it to
+" for Unix and OS/2: ~/.vimrc
+" for Amiga: s:.vimrc
+" for MS-DOS and Win32: $VIM\_vimrc
+" for OpenVMS: sys$login:.vimrc
+
+" When started as "evim", evim.vim will already have done these settings.
+if v:progname =~? "evim"
+ finish
+endif
+
+" Use Vim settings, rather than Vi settings (much better!).
+" This must be first, because it changes other options as a side effect.
+set nocompatible
+
+" allow backspacing over everything in insert mode
+set backspace=indent,eol,start
+
+"if has("vms")
+ set nobackup " do not keep a backup file, use versions instead
+ set nowritebackup
+ set noswapfile
+"else
+" set backup " keep a backup file (restore to previous version)
+" set undofile " keep an undo file (undo changes after closing)
+"endif
+set history=50 " keep 50 lines of command line history
+set ruler " show the cursor position all the time
+set showcmd " display incomplete commands
+set incsearch " do incremental searching
+
+" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
+" let &guioptions = substitute(&guioptions, "t", "", "g")
+
+" Don't use Ex mode, use Q for formatting
+map Q gq
+
+" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
+" so that you can undo CTRL-U after inserting a line break.
+inoremap <C-U> <C-G>u<C-U>
+
+" In many terminal emulators the mouse works just fine, thus enable it.
+if has('mouse')
+ set mouse=a
+endif
+
+" Switch syntax highlighting on, when the terminal has colors
+" Also switch on highlighting the last used search pattern.
+if &t_Co > 2 || has("gui_running")
+ syntax on
+ set hlsearch
+endif
+
+" Only do this part when compiled with support for autocommands.
+if has("autocmd")
+
+ " Enable file type detection.
+ " Use the default filetype settings, so that mail gets 'tw' set to 72,
+ " 'cindent' is on in C files, etc.
+ " Also load indent files, to automatically do language-dependent indenting.
+ filetype plugin indent on
+
+ " Put these in an autocmd group, so that we can delete them easily.
+ augroup vimrcEx
+ au!
+
+ " For all text files set 'textwidth' to 78 characters.
+ autocmd FileType text setlocal textwidth=78
+
+ " When editing a file, always jump to the last known cursor position.
+ " Don't do it when the position is invalid or when inside an event handler
+ " (happens when dropping a file on gvim).
+ " Also don't do it when the mark is in the first line, that is the default
+ " position when opening a file.
+ autocmd BufReadPost *
+ \ if line("'\"") > 1 && line("'\"") <= line("$") |
+ \ exe "normal! g`\"" |
+ \ endif
+
+ augroup END
+
+else
+
+ set autoindent " always set autoindenting on
+
+endif " has("autocmd")
+
+" Convenient command to see the difference between the current buffer and the
+" file it was loaded from, thus the changes you made.
+" Only define it when not defined already.
+if !exists(":DiffOrig")
+ command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
+ \ | wincmd p | diffthis
+endif
+
+if has('langmap') && exists('+langnoremap')
+ " Prevent that the langmap option applies to characters that result from a
+ " mapping. If unset (default), this may break plugins (but it's backward
+ " compatible).
+ set langnoremap
+endif
+
+color desert
+set expandtab
+set shiftwidth=4
+set softtabstop=4
+highlight ColorColumn ctermbg=darkgrey
+
+nnoremap <F2> :set invpaste paste?<CR>
+set pastetoggle=<F2>
+set showmode
+
+set exrc
+set secure