Last active
February 3, 2018 15:44
-
-
Save roberthamel/febc2e56a527fbe990277c2cd55d2f6d to your computer and use it in GitHub Desktop.
Some Windows config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# WSL | |
########## | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# if running in terminal | |
if test -t 1; then | |
exec zsh | |
fi | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# If set, the pattern "**" used in a pathname expansion context will | |
# match all files and zero or more directories and subdirectories. | |
#shopt -s globstar | |
# make less more friendly for non-text input files, see lesspipe(1) | |
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, unless we know we "want" color) | |
case "$TERM" in | |
xterm-color|*-256color) color_prompt=yes;; | |
esac | |
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
#force_color_prompt=yes | |
if [ -n "$force_color_prompt" ]; then | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
# We have color support; assume it's compliant with Ecma-48 | |
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such | |
# a case would tend to support setf rather than setaf.) | |
color_prompt=yes | |
else | |
color_prompt= | |
fi | |
fi | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
unset color_prompt force_color_prompt | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | |
;; | |
*) | |
;; | |
esac | |
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi | |
# colored GCC warnings and errors | |
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | |
# some more ls aliases | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
# Add an "alert" alias for long running commands. Use like so: | |
# sleep 10; alert | |
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them here directly. | |
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
# enable programmable completion features (you don't need to enable | |
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |
# sources /etc/bash.bashrc). | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function commit() { | |
if [[ $# -eq 0 ]]; then | |
echo "commit [message]"; | |
else | |
git add --all; | |
git commit -m "$1"; | |
git push; | |
fi; | |
} | |
function init() { | |
if [[ $# -eq 0 ]]; then | |
echo "init [repo_name]"; | |
else | |
git init; | |
git add --all; | |
git commit -m "initial commit"; | |
git remote add origin https://github.com/roberthamel/$1.git; | |
git push -u origin master; | |
fi; | |
} | |
function bbinit() { | |
if [[ $# -eq 0 ]]; then | |
echo "bbinit [repo_name]"; | |
else | |
git init; | |
git add --all; | |
git commit -m "initial commit"; | |
git remote add origin https://[email protected]/rhamel/$1.git; | |
git push -u origin master; | |
fi; | |
} | |
function mkd() { | |
mkdir -p "$@" && cd "$_"; | |
} | |
function ws() { | |
/c/Program\ Files/JetBrains/WebStorm\ 2017.3.3/bin/webstorm64.exe . & | |
} | |
# GIT | |
alias gitdelete="git push --delete origin" | |
alias lg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias grr="git remote rm origin" | |
alias gs="git status" | |
alias nah="git reset --hard; git clean -df;" | |
alias undopush="git push -f origin HEAD^:master" | |
alias pushup='git push --set-upstream origin' | |
# NPM | |
alias npmlist="npm -g list --depth=0" | |
# SYSTEM | |
alias -- -="cd -" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias la="clear && ls -ahlF --color --group-directories-first" | |
alias home="cd /c/Users/rh" | |
alias desk="cd /c/Users/rh/Desktop" | |
alias -- -="cd -" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias c="clear" | |
alias l="clear && ls -ahlF --color --group-directories-first" | |
alias ll="ls -lah" | |
alias lsl="ls -l" | |
alias szsh="source ~/.zshrc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: '"Fira Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', | |
// `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █ | |
cursorShape: 'BLOCK', | |
// set to true for blinking cursor | |
cursorBlink: false, | |
// color of the text | |
foregroundColor: 'rgba(30,30,30,0.9)', | |
// terminal background color | |
backgroundColor: '#', | |
// border color (window, tabs) | |
borderColor: '#55000000', | |
// custom css to embed in the main window | |
css: '', | |
// custom css to embed in the terminal window | |
termCSS: '', | |
// set to `true` (without backticks) if you're using a Linux setup that doesn't show native menus | |
// default: `false` on Linux, `true` on Windows (ignored on macOS) | |
showHamburgerMenu: '', | |
// set to `false` if you want to hide the minimize, maximize and close buttons | |
// additionally, set to `'left'` if you want them on the left, like in Ubuntu | |
// default: `true` on windows and Linux (ignored on macOS) | |
showWindowControls: '', | |
// custom padding (css format, i.e.: `top right bottom left`) | |
padding: '12px 14px', | |
// the full list. if you're going to provide the full color palette, | |
// including the 6 x 6 color cubes and the grayscale map, just provide | |
// an array here instead of a color map object | |
colors: { | |
black: '#000000', | |
red: '#ff0000', | |
green: '#33ff00', | |
yellow: '#ffff00', | |
blue: '#3d87ff', | |
magenta: '#cc00ff', | |
cyan: '#00ffff', | |
white: '#d0d0d0', | |
lightBlack: '#808080', | |
lightRed: '#ff0000', | |
lightGreen: '#33ff00', | |
lightYellow: '#ffff00', | |
lightBlue: '#8ebbff', | |
lightMagenta: '#cc00ff', | |
lightCyan: '#00ffff', | |
lightWhite: '#ffffff' | |
}, | |
// the shell to run when spawning a new session (i.e. /usr/local/bin/fish) | |
// if left empty, your system's login shell will be used by default | |
// | |
// Windows | |
// - Make sure to use a full path if the binary name doesn't work | |
// - Remove `--login` in shellArgs | |
// | |
// Bash on Windows | |
// - Example: `C:\\Windows\\System32\\bash.exe` | |
// | |
// Powershell on Windows | |
// - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe` | |
shell: 'bash.exe', | |
// for setting shell arguments (i.e. for using interactive shellArgs: ['-i']) | |
// by default ['--login'] will be used | |
shellArgs: ['~'], | |
// for environment variables | |
env: { | |
TERM: 'cygwin' | |
}, | |
// set to false for no bell | |
bell: false, | |
// if true, selected text will automatically be copied to the clipboard | |
copyOnSelect: false | |
// if true, on right click selected text will be copied or pasted if no | |
// selection is present (true by default on Windows) | |
// quickEdit: true | |
// URL to custom bell | |
// bellSoundURL: 'http://example.com/bell.mp3', | |
// for advanced config flags please refer to https://hyper.is/#cfg | |
}, | |
// a list of plugins to fetch and install from npm | |
// format: [@org/]project[#version] | |
// examples: | |
// `hyperpower` | |
// `@company/project` | |
// `project#1.0.1` | |
plugins: [ | |
"hyperterm-summon", | |
"hyperterm-paste", | |
"hyper-alt-click", | |
"hyperterm-cobalt2-theme", | |
"hyper-dark-scrollbar" | |
], | |
// in development, you can create a directory under | |
// `~/.hyper_plugins/local/` and include it here | |
// to load it and avoid it being `npm install`ed | |
localPlugins: [], | |
keymaps: { | |
// Example | |
// 'window:devtools': 'cmd+alt+o', | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export PATH=$PATH:$HOME/.bin | |
# Path to your oh-my-zsh installation. | |
export ZSH=/home/rh/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" | |
# Set list of themes to load | |
# Setting this variable when ZSH_THEME=random | |
# cause zsh load theme from this variable instead of | |
# looking in ~/.oh-my-zsh/themes/ | |
# An empty array have no effect | |
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. Case | |
# sensitive completion must be off. _ and - will be interchangeable. | |
# HYPHEN_INSENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
# ENABLE_CORRECTION="true" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# HIST_STAMPS="mm/dd/yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=( | |
git | |
nyan | |
zsh-syntax-highlighting | |
) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# ssh | |
# export SSH_KEY_PATH="~/.ssh/rsa_id" | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
#git | |
alias gitdelete="git push --delete origin" | |
alias lg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias grr="git remote rm origin" | |
alias gs="git status" | |
alias nah="git reset --hard; git clean -df;" | |
alias undopush="git push -f origin HEAD^:master" | |
alias pushup='git push --set-upstream origin'alias gitdelete="git push --delete origin" | |
alias lg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
# system | |
alias -- -="cd -" | |
alias home="cd /c/Users/rh" | |
alias desk="cd /c/Users/rh/Desktop" alias -- -="cd -" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
alias la="clear && ls -ahlF --color --group-directories-first" | |
alias desk="cd /c/Users/rh/Desktop" | |
alias home="cd /c/Users/rh" | |
alias c="clear" | |
alias l="clear && ls -ahlF --color --group-directories-first" | |
alias ll="ls -lah" | |
alias lsl="ls -l" | |
alias szsh="source ~/.zshrc"alias c="clear" | |
alias szsh="source ~/.zshrc" | |
# connect docker | |
export DOCKER_HOST=tcp://0.0.0.0:2375 | |
# remap c directory | |
sudo mount --bind /mnt/c /c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment