Skip to content

Instantly share code, notes, and snippets.

View medihack's full-sized avatar

Kai Schlamp medihack

  • Thoraxklinik Heidelberg
  • Germany
View GitHub Profile
@medihack
medihack / .vimrc
Last active April 7, 2018 14:58
for Vim version < 8.x
" Installation instructions
" Install Vundle -- git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
" Create tmp directory -- mkdir ~/.vim/tmp
" Install bundles inside vim -- :PluginInstall
" or from the command line -- vim +PluginInstall +qall
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
@medihack
medihack / .profile
Last active December 21, 2015 06:59
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@medihack
medihack / .tmux.conf
Last active March 17, 2017 16:49
For tmux version 1.x
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
setw -g xterm-keys on
# Fix colors tmux + vim
# alternatively start with: tmux -2
set -g default-terminal "screen-256color"
set -g terminal-overrides 'xterm:colors=256'
@medihack
medihack / tmux.md
Created February 4, 2014 15:30 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@medihack
medihack / .tmux.conf
Last active September 2, 2020 16:05
For tmux version 2.x
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
setw -g xterm-keys on
# Fix colors tmux + vim
# if this still does not work then put this in your .bashrc:
# alias tmux='tmux -2'
set -g default-terminal "screen-256color"
@medihack
medihack / bashrc_addons
Created October 6, 2017 17:54
Some usefull .bashrc addons.
# Load pyenv automatically
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Load nvm automatically
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
@medihack
medihack / init.vim
Last active April 9, 2018 21:22
".vimrc" for Neovim (lives in ~/.config/nvim/)
set nocompatible " be iMproved, required
" This config file lives in Ubuntu at ~/.config/nvim/init.vim
" vim-plug
" Install vim-plug, see https://github.com/junegunn/vim-plug
" Install plugins inside vim -- :PlugInstall
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
@medihack
medihack / .vimrc
Last active September 3, 2020 09:31
for Vim version >= 8.x
set nocompatible " be iMproved, required
" My ultimate .vimrc for Vim 8.x
" Ideally python (works with python3 command) and yarn is preinstalled.
" I tried it with npm but it fails somehow.
" vim-plug and all plugins are automatically installed on first run of vim
" if not present (by code see below).
" Make sure ag (or ack-grep) and yarn is installed globally. All other stuff
@medihack
medihack / RxTextView.kt
Created June 6, 2019 18:26
Make a Android TextView (EditText) observable in RxJava
/**
* Adapted (and translated in Kotlin) from https://gist.github.com/FrantisekGazo/d1a62fcddd0c97453ee6d57efef17916
* Nice usage scenario https://www.novatec-gmbh.de/en/blog/building-android-components/
*/
object RxTextView {
private val textViewObservables = HashMap<TextView, Observable<CharSequence>>()
@JvmStatic
fun textChanges(view: TextView): Observable<CharSequence> {
val observable = textViewObservables[view]
@medihack
medihack / settings.json
Created November 10, 2020 21:28
Visual Studio Code User Settings
{
"git.autofetch": true,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"python.formatting.provider": "black",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.renderControlCharacters": false,
"editor.renderWhitespace": "none",
"prettier.disableLanguages": ["django-html"],