cinaeco 15 rokov pred
commit
8d3fa37c66
6 zmenil súbory, kde vykonal 327 pridanie a 0 odobranie
  1. 5 0
      .gitignore
  2. 7 0
      instructions
  3. 2 0
      pentadactyl/pentadactylrc
  4. 70 0
      vim/vimrc
  5. 42 0
      zsh/zshenv
  6. 201 0
      zsh/zshrc

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+# Mac OS X files
+.DS_Store
+
+# Vim temp files
+*.swp

+ 7 - 0
instructions

@@ -0,0 +1,7 @@
+Create the following symlinks to use the dotFiles files in this repository
+(Use from the home directory)
+
+ln -s dotFiles/vim/vimrc ./.vimrc
+
+ln -s dotFiles/zsh/zshrc ./.zshrc
+ln -s dotFiles/zsh/zshenv ./.zshenv

+ 2 - 0
pentadactyl/pentadactylrc

@@ -0,0 +1,2 @@
+" pentadactyl gui options
+set guioptions=rbCBn

+ 70 - 0
vim/vimrc

@@ -0,0 +1,70 @@
+""""""""
+"" General Behaviours
+"""""""""""""""""""""""""""""""""""""""""""""""""""
+
+set nocompatible "Don't have to try to be compatible with old vi
+set autoread "Read a file if it's changed from outside of vim
+
+let mapleader = "," "Leader key lets you make more kinds of shortcuts!
+
+" Source the vimrc file after saving it (courtesy of vimcasts.org!)
+if has("autocmd")
+    autocmd bufwritepost .vimrc source $MYVIMRC
+endif
+
+
+""""""""
+"" Tabbing
+""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+set tabstop=4 "actual tab presses
+set shiftwidth=4 "for autoindent
+set expandtab "change to single spaces
+set smarttab
+set autoindent "use last line to set next indent
+set smartindent "guess harder, based on C-like language
+" set wrap "wrap lines of text
+
+
+""""""""
+"" UI - Colours
+""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+hi Comment ctermfg=darkmagenta
+syntax on
+colorscheme desert
+set colorcolumn=120
+
+
+""""""""
+"" UI - Numbering
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+set number "show line numbers
+set relativenumber "current line always 0 (requires 7.3 and up)
+set ruler "show row,col count in status line
+
+
+""""""""
+"" UI - Search
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+set hlsearch "make searches highlighted
+set incsearch "vim will search as you type!
+
+
+""""""""
+"" Shortcuts 
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" More convenient escape
+imap ii <Esc>
+imap II <Esc>
+
+" Add extra lines up and down
+map <leader>j o<Esc>k
+map <leader>k O<Esc>j
+
+" window resizing
+noremap + <C-w>10+
+noremap - <C-w>10-

+ 42 - 0
zsh/zshenv

@@ -0,0 +1,42 @@
+#
+# /etc/zshenv is sourced on all invocations of the
+# shell, unless the -f option is set.  It should
+# contain commands to set the command search path,
+# plus other important environment variables.
+# .zshenv should not contain commands that produce
+# output or assume the shell is attached to a tty.
+#
+
+## don't close less when I am done reading
+export LESS='-X -e'
+export PAGER=less
+
+## colour ls
+export CLICOLOR=1
+export LSCOLORS=gxfxcxdxbxegedabagacad
+
+export CVSROOT=:pserver:releng:releng123@cvs:/usr/cvsroot
+export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/git/bin:/usr/local/php/bin:/usr/local/apache2/bin:/usr/local/mysql/bin:/usr/local/bin:$PATH
+export JAVA_HOME=/usr/local/java
+export ANT_HOME=/Developer/Java/Ant
+export CATALINA_HOME=/usr/local/tomcat
+export CLASSPATH=/usr/local/cruisecontrol/lib
+export FISHEYE_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m"
+export FISHEYE_INST=/var/crucible 
+
+# Move Homebrew temp files to ramdisk (build directory)
+export HOMEBREW_TEMP=/Volumes/RamDisk
+
+## set list colours
+export LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
+export DISPLAY=:0.0
+
+# Add /usr/local manpages
+if [[ -d /usr/local/share/man ]];then
+    MANPATH=$MANPATH:/usr/local/share/man
+fi  
+
+if [[ -d /usr/local/man ]];then
+    MANPATH=$MANPATH:/usr/local/man
+fi  
+export MANPATH

+ 201 - 0
zsh/zshrc

@@ -0,0 +1,201 @@
+#
+# .zshrc is sourced in interactive shells.
+# It should contain commands to set up aliases,
+# functions, options, key bindings, etc.
+#
+
+##################
+# LOAD FUNCTIONS #
+##################
+
+## completions
+autoload -U compinit
+compinit
+
+## colors
+autoload -U colors
+colors
+
+## renaming
+autoload zmv
+alias mmv='noglob zmv -W'
+
+###############
+# SET OPTIONS #
+###############
+
+#allow tab completion in the middle of a word
+setopt COMPLETE_IN_WORD
+
+## Correct my spelling
+#setopt CORRECT
+
+## Don't ask me
+setopt RMSTARSILENT
+
+## Don't require 'cd'
+#setopt AUTOCD
+
+## Automatically pushd - then I can go to an old dir with cd - <tab> (pick no.)
+setopt AUTOPUSHD
+export DIRSTACKSIZE=11 # stack size of eleven gives me a list with ten entries
+
+## Autocomplete hosts from .ssh/known_hosts
+#local _myhosts
+_myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
+zstyle ':completion:*' hosts $_myhosts
+
+HISTSIZE=3000
+SAVEHIST=3000
+HISTFILE=~/.zsh_history
+
+#####################
+# SHELL ENVIRONMENT #
+#####################
+
+## Ctrl-W stops at a directory
+## see http://www.zsh.org/mla/users/1995/msg00088.html
+WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'
+
+## set up my prompt
+export PS1="%{${fg[yellow]}%}[%n@%m] %{${fg[green]}%}%3~ %# %{${fg[default]}%}"
+#export RPS1="%{${fg[yellow]}%}%T%{${fg[default]}%}"
+
+## color STDERR red
+#exec 2>>(while read line; do
+#  print '\e[91m'${(q)line}'\e[0m' > /dev/tty; done &)
+
+#if [ "`uname`" = "Darwin" ]; then
+#   compctl -f -x 'c[-1,-a][-1,-A] p[2]' -s "`/bin/ls -d1 /Applications/*/*.app /Applications/*.app | sed 's|^.*/\([^/]*\)\.app.*|\\1|;s/ /\\\\ /g'`"  -- open
+#   alias run='open -a'
+#fi
+
+#############
+# FUNCTIONS #
+#############
+
+trash() { mv $@ ~/.Trash }
+pc() { awk "{print \$$1}" }
+mcd() { mkdir -p "$1" && cd "$1" }
+calc() { echo "$@" | bc -l -q -i }
+dont() { echo "OK, I won't!" }
+settab() { echo -ne "\e]1;$1\a" }
+settabh() { settab `hostname | cut -d. -f1` }
+#'"
+
+###########
+# ALIASES #
+###########
+
+## history
+alias h='history'
+
+## shortcuts
+alias l='ls'
+alias l1='ls -1'
+alias ll='ls -hl'
+alias la='ls -A'
+alias lal="ls -Ahl"
+alias l.='ls -d .[^.]*'
+alias lsd='ls -ld *(-/DN)'
+alias lg='ls -l | grep -i'
+alias cd..='cd ..';
+alias ..='cd ..'
+alias df='df -h'
+alias du='du -sh'
+
+alias mkdir='nocorrect mkdir'
+alias mv='nocorrect mv'
+alias cp='nocorrect cp'
+alias touch='nocorrect touch'
+alias ln='nocorrect ln'
+
+alias -g G="| grep"
+alias -g g="| grep -i"
+alias -g L="| less"
+alias -g H="| head"
+
+alias -g ...="../.."
+alias -g ....="../../.."
+alias -g .....="../../../.."
+
+alias igrep='grep -i'
+alias rgrep='grep -R'
+alias rigrep='grep -iR'
+
+alias phplog='tail -f /private/etc/httpd/phplog.txt'
+alias proxy='export http_proxy=http://192.168.1.102:3128;export HTTP_PROXY=$http_proxy;export FTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy;'
+alias noproxy="export http_proxy='';export HTTP_PROXY=$http_proxy;export FTP_PROXY=$http_proxy;export https_proxy=$http_proxy;export ftp_proxy=$http_proxy;"
+alias hosts='vim /etc/hosts'
+alias graceful='apachectl graceful'
+alias flushdns='lookupd -flushcache'
+alias bc='bc -l'
+alias o.='open .'
+alias upd='cvs -q upd -dP'
+alias upd-head='cvs -q upd -dPA'
+
+#alias guantanamo-start='env -i /usr/sbin/chroot /jails/guantanamo /usr/local/apache2/bin/httpd -k start'
+#alias guantanamo-graceful='env -i /usr/sbin/chroot /jails/guantanamo /usr/local/apache2/bin/httpd -k graceful'
+#alias guantanamo-stop='env -i /usr/sbin/chroot /jails/guantanamo /usr/local/apache2/bin/httpd -k stop'  
+#alias guantanamo-check='chroot /jails/guantanamo /usr/local/apache2/bin/apachectl -t'  
+
+#alias woomera-start='env -i /usr/sbin/chroot /jails/woomera /usr/local/apache2/bin/httpd -k start'
+#alias woomera-graceful='env -i /usr/sbin/chroot /jails/woomera /usr/local/apache2/bin/httpd -k graceful'
+#alias woomera-stop='env -i /usr/sbin/chroot /jails/woomera /usr/local/apache2/bin/httpd -k stop'  
+#alias woomera-check='chroot /jails/woomera /usr/local/apache2/bin/apachectl -t'  
+
+#alias littlehey-start='env -i /usr/sbin/chroot /jails/littlehey /usr/local/apache2/bin/httpd -k start'
+#alias littlehey-graceful='env -i /usr/sbin/chroot /jails/littlehey /usr/local/apache2/bin/httpd -k graceful'
+#alias littlehey-stop='env -i /usr/sbin/chroot /jails/littlehey /usr/local/apache2/bin/httpd -k stop'
+#alias littlehey-check='chroot /jails/littlehey /usr/local/apache2/bin/apachectl -t'
+
+#alias alcatraz-start='env -i /usr/sbin/chroot /jails/alcatraz /usr/local/apache2/bin/httpd -k start'
+#alias alcatraz-graceful='env -i /usr/sbin/chroot /jails/alcatraz /usr/local/apache2/bin/httpd -k graceful'
+#alias alcatraz-stop='env -i /usr/sbin/chroot /jails/alcatraz /usr/local/apache2/bin/httpd -k stop'
+#alias alcatraz-check='chroot /jails/alcatraz /usr/local/apache2/bin/apachectl -t'
+
+#alias kerobokan-start='env -i /usr/sbin/chroot /jails/kerobokan /usr/local/apache2/bin/httpd -k start'
+#alias kerobokan-graceful='env -i /usr/sbin/chroot /jails/kerobokan /usr/local/apache2/bin/httpd -k graceful'
+#alias kerobokan-stop='env -i /usr/sbin/chroot /jails/kerobokan /usr/local/apache2/bin/httpd -k stop'
+#alias kerobokan-check='chroot /jails/kerobokan /usr/local/apache2/bin/apachectl -t'
+
+#alias changi-start='/etc/init.d/tc-chroot start'
+#alias changi-stop='/etc/init.d/tc-chroot stop'
+
+# If I am on the mac,
+if [ `uname` = Darwin ]; then
+    alias updatedb='sudo /usr/libexec/locate.updatedb'
+fi
+
+## common typos
+#alias sl='ls' #commented out because Jaf's steam train /usr/bin/sl much more fun
+alias vf='cd'
+alias xs='cd'
+alias ks='ls'
+alias ecgi='echo'
+
+## ensure X11 is running when I gvim, xterm etc
+alias xterm='open -a X11 && /usr/X11R6/bin/xterm  -sb -sl 5000 -rightbar -fg white -bg black -geometry 100x50+40+20'
+alias gvim='open -a X11 && vim -g'
+## on the other hand, don't try and connect to X when I am not gvimming
+#alias vim='vim -X'
+#alias x='open -a X11'
+
+## shortcuts to other machines
+alias dev='ssh mekong && settabh'
+alias elrond='ssh elrond && settabh'
+alias samwise='ssh samwise && settabh'
+alias legolas2='ssh legolas2 && settabh'
+alias web1='ssh web1 && settabh'
+
+settabh
+
+alias debug='strace -f -e open'
+
+alias athome='screen -t murray'
+alias selrond='screen -t elrond ssh elrond'
+alias snile='screen -t nile ssh nile'
+alias sorinoco='screen -t orinoco ssh orinoco'
+alias skwai='screen -t kwai ssh kwai'
+alias ssamwise='screen -t samwise ssh samwise'
+alias sseine='screen -t seine ssh seine'