From 937099fb6d2360129ab3fa5d698bd5c70d14e6d5 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 28 May 2011 14:34:33 +0200 Subject: infest: Major Refactoring --- Makefile | 14 ++--- bootstrap.sh | 23 -------- core/angstrom | 4 -- core/debian | 6 --- etc/profile | 58 -------------------- etc/rc.local | 10 ---- home/.ssh/authorized_keys | 6 --- home/.vimrc | 31 ----------- host-patch/beagleboard/Makefile | 9 ---- host-patch/beagleboard/profile.patch | 42 --------------- infest/etc_aggressive | 23 -------- infest/etc_coop | 20 ------- infest/home | 4 -- modules/infest/Makefile | 18 +++++++ modules/infest/bin/make-patch | 61 ++++++++++++++++++++++ modules/infest/bootstrap.sh | 23 ++++++++ modules/infest/core/angstrom | 4 ++ modules/infest/core/debian | 6 +++ modules/infest/host-patch/beagleboard/Makefile | 9 ++++ .../infest/host-patch/beagleboard/profile.patch | 42 +++++++++++++++ modules/infest/skel/etc/motd.tail | 10 ++++ modules/infest/skel/etc/profile | 58 ++++++++++++++++++++ modules/infest/skel/etc/rc.local | 10 ++++ modules/infest/skel/home/.ssh/authorized_keys | 6 +++ modules/infest/skel/home/.vimrc | 31 +++++++++++ 25 files changed, 281 insertions(+), 247 deletions(-) delete mode 100644 bootstrap.sh delete mode 100755 core/angstrom delete mode 100755 core/debian delete mode 100755 etc/profile delete mode 100755 etc/rc.local delete mode 100644 home/.ssh/authorized_keys delete mode 100644 home/.vimrc delete mode 100644 host-patch/beagleboard/Makefile delete mode 100644 host-patch/beagleboard/profile.patch delete mode 100755 infest/etc_aggressive delete mode 100755 infest/etc_coop delete mode 100755 infest/home create mode 100644 modules/infest/Makefile create mode 100755 modules/infest/bin/make-patch create mode 100644 modules/infest/bootstrap.sh create mode 100755 modules/infest/core/angstrom create mode 100755 modules/infest/core/debian create mode 100644 modules/infest/host-patch/beagleboard/Makefile create mode 100644 modules/infest/host-patch/beagleboard/profile.patch create mode 100644 modules/infest/skel/etc/motd.tail create mode 100755 modules/infest/skel/etc/profile create mode 100755 modules/infest/skel/etc/rc.local create mode 100644 modules/infest/skel/home/.ssh/authorized_keys create mode 100644 modules/infest/skel/home/.vimrc diff --git a/Makefile b/Makefile index 22b032ab..4e8a8e65 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,10 @@ DIST = debian -.PHONY: infest it all so aggressive coop +.PHONY: infest all all: select-target -it: so -so: it coop -aggressive: coop - infest/etc_aggressive -coop: - infest/etc_coop - infest/home - -# compatibility -infest: aggressive +infest: + make -C modules/infest install-core: core/$(DIST) diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100644 index c434a4fe..00000000 --- a/bootstrap.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -set -x -[ "`id -u`" -eq "0" ] || { echo "you need to be root!"; exit 1;} || exit 1 - -[ -e '/usr/bin/git' ] || \ -apt-get install -y git-core || \ -yum install git || \ -opkg install git || \ -pacman -Sy git || \ -{ echo "please install git!"; exit 1;} || exit 1 - -[ -e '/krebs' ] || git clone git://github.com/krebscode/painload.git /krebs \ -|| { echo "cloning failed :(" ; exit 1; } || exit 1 - -cd /krebs || { echo "cannot change into /krebs folder:(" ; exit 1; } || exit 1 - -#read -n1 -p "infest now? [yN]" - -#[[ $REPLY = [yY] ]] && make infest -#echo $REPLY -echo "do 'make infest' in /krebs" -echo "have a nice day" - diff --git a/core/angstrom b/core/angstrom deleted file mode 100755 index dafb840f..00000000 --- a/core/angstrom +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -opkg install vim vim-syntax -opkg install git diff --git a/core/debian b/core/debian deleted file mode 100755 index fedd1ede..00000000 --- a/core/debian +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -x -[ `which git` ] || apt-get install --yes git-core -[ `which tmux` ] || apt-get install --yes tmux -[ `which screen` ] && apt-get remote --yes screen -[ `which vim` ] || apt-get install --yes vim diff --git a/etc/profile b/etc/profile deleted file mode 100755 index 574d14dc..00000000 --- a/etc/profile +++ /dev/null @@ -1,58 +0,0 @@ -#! /bin/sh - -export EDITOR=vi - -set -u -alias bc='bc -q' -alias df='df -h' -alias du='du -h' -alias grep='grep --color=auto' -alias ps?="ps ax | head -n 1;ps ax | fgrep -v ' grep --color=auto ' | grep" -alias la='ls -lA' -alias lAtr='ls -lAtr' -alias ll='ls -l' -alias ls='ls -h --color=auto --group-directories-first' -alias vi='vim' -alias vim='vim -p' -alias view='vim -R' - -set -o notify - -if test -n "${BASH_VERSION-}" ; then - shopt -s checkhash - shopt -s histappend histreedit histverify - shopt -s no_empty_cmd_completion - complete -d cd - - function comp_sch() { - local cword="${COMP_WORDS[$COMP_CWORD]}" - COMPREPLY=( $(sch -l "$cword.*" ) ) - } - complete -F comp_sch sch -fi - -export HISTSIZE='65536' -export HISTFILESIZE="$HISTSIZE" -export HISTCONTROL='ignoredups' - -case "${TERM-dumb}" in - linux) PS1_COLOR=34 ;; - rxvt-unicode) PS1_COLOR=30 ;; - *) PS1_COLOR=39 ;; -esac -PS1='\[\033[${PS1_COLOR}m\]$(PS1)\[\033[32m\]\w\[\033[39m\]${PSx-} ' # green \w -PS1='\[\033[32m\]\w\[\033[m\] ' # green \w - -if test -n "${SSH_CLIENT-}" ; then - PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname - #TERM=xterm-256color xtermcontrol --bg \#292d29 --fg \#d0d0d0 -fi - -export PATH="/krebs/bin:$PATH" - -echo '--' >&2 -test -e ~/TODO && cat ~/TODO >&2 - -set +u - -cd /krebs diff --git a/etc/rc.local b/etc/rc.local deleted file mode 100755 index bb5ac732..00000000 --- a/etc/rc.local +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh -e - -morse() { - /krebs/modules/morse/morse.sh "$@" -} - -morse -l 42 -f 4000 `hostname` -morse -l 42 -f 2000 BEREIT - -exit 0 diff --git a/home/.ssh/authorized_keys b/home/.ssh/authorized_keys deleted file mode 100644 index ab09bfe5..00000000 --- a/home/.ssh/authorized_keys +++ /dev/null @@ -1,6 +0,0 @@ -ssh-rsa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/y0n8o62iSQHVKeNBGO2WYhVce9d65Ucek5dOvXZYVKSe1LeAOKyeHWv+VWP8QlObmfVrQ5l1Pou6WV6Wpo85KBa/mmBJIygC9rrG+gx/1LX7JxStbCu/WoUlUwkSaP2qxWaET9KaSO8+2Wrg5i34ax== samuel@localhost diff --git a/home/.vimrc b/home/.vimrc deleted file mode 100644 index 22bbf99d..00000000 --- a/home/.vimrc +++ /dev/null @@ -1,31 +0,0 @@ -" do the right thing all the time -" -" Colors and stuff -syntax on -set background=dark - - - - -" searching -set hlsearch -set showmatch -set ignorecase -set incsearch -set wildignore=*.o,*.obj,*.bak,*.pyc - -" tabbing -set tabstop=2 -set et -set sw=2 -set smarttab -set autoindent - -" vim magic -filetype plugin indent on - - -" fuck you, help command -inoremap -nnoremap -vnoremap diff --git a/host-patch/beagleboard/Makefile b/host-patch/beagleboard/Makefile deleted file mode 100644 index 55952104..00000000 --- a/host-patch/beagleboard/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -.PHONY: all -all: select-target - -patchfile: - diff /krebs/etc/profile /etc/profile > profile.patch || true - -patch: - cd /;\ - patch -p0 < /krebs/host-patch/beagleboard/profile.patch diff --git a/host-patch/beagleboard/profile.patch b/host-patch/beagleboard/profile.patch deleted file mode 100644 index d96173d7..00000000 --- a/host-patch/beagleboard/profile.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- /krebs/etc/profile Tue May 24 19:31:39 2011 -+++ /etc/profile Tue May 24 20:15:17 2011 -@@ -11,26 +11,13 @@ - alias la='ls -lA' - alias lAtr='ls -lAtr' - alias ll='ls -l' --alias ls='ls -h --color=auto --group-directories-first' -+alias ls='ls -h --color=auto' - alias vi='vim' - alias vim='vim -p' - alias view='vim -R' - - set -o notify - --if test -n "${BASH_VERSION-}" ; then -- shopt -s checkhash -- shopt -s histappend histreedit histverify -- shopt -s no_empty_cmd_completion -- complete -d cd -- -- function comp_sch() { -- local cword="${COMP_WORDS[$COMP_CWORD]}" -- COMPREPLY=( $(sch -l "$cword.*" ) ) -- } -- complete -F comp_sch sch --fi -- - export HISTSIZE='65536' - export HISTFILESIZE="$HISTSIZE" - export HISTCONTROL='ignoredups' -@@ -43,10 +30,7 @@ - PS1='\[\033[${PS1_COLOR}m\]$(PS1)\[\033[32m\]\w\[\033[39m\]${PSx-} ' # green \w - PS1='\[\033[32m\]\w\[\033[m\] ' # green \w - --if test -n "${SSH_CLIENT-}" ; then -- PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname -- #TERM=xterm-256color xtermcontrol --bg \#292d29 --fg \#d0d0d0 --fi -+PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname - - export PATH="/krebs/bin:$PATH" - diff --git a/infest/etc_aggressive b/infest/etc_aggressive deleted file mode 100755 index 23d8caaa..00000000 --- a/infest/etc_aggressive +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh - -f=/etc/passwd -sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f -sed -ri '/^krebs/d' $f -echo "krebs:x:0:0::$HOME:/bin/bash" >>$f - -f=/etc/shadow -sed -ri '/^krebs/d' $f -grep root $f | sed 's/^root/krebs/' >> $f - -f=/etc/group -sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f -sed -ri '/^krebs/d' $f -echo 'krebs:x:0:' >>$f - -if ! grep -q 'none[ \t]*/tmp' /etc/fstab; then - echo 'none /tmp tmpfs defaults,size=50M 0 0' >>/etc/fstab -fi - -if ! grep -q 'none[ \t]*/var/log' /etc/fstab; then - echo 'none /var/log tmpfs defaults,size=50M 0 0' >>/etc/fstab -fi diff --git a/infest/etc_coop b/infest/etc_coop deleted file mode 100755 index 2ee05d04..00000000 --- a/infest/etc_coop +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh -set -x -cat>/etc/motd.tail< /$i -done - -set +x diff --git a/infest/home b/infest/home deleted file mode 100755 index b9f5f1f9..00000000 --- a/infest/home +++ /dev/null @@ -1,4 +0,0 @@ -set -x -cp -r /krebs/home/* $HOME 2>/dev/null -cp -r /krebs/home/.* $HOME 2>/dev/null -set +x diff --git a/modules/infest/Makefile b/modules/infest/Makefile new file mode 100644 index 00000000..ec5836a3 --- /dev/null +++ b/modules/infest/Makefile @@ -0,0 +1,18 @@ + +ifndef patch_file +patch_file := /etc/Verkrebsung.patch +endif + +ifndef patch_flags +patch_flags := +endif + +.PHONY: infest dry-run +infest: $(patch_file) + unset POSIXLY_CORRECT; patch $(patch_flags) -fNp0 < $< + +$(patch_file): bin/make-patch + $< >$@ + +dry-run: + make patch_file=/tmp/krebs-infest-dry-run.patch patch_flags=--dry-run diff --git a/modules/infest/bin/make-patch b/modules/infest/bin/make-patch new file mode 100755 index 00000000..2d0b11ef --- /dev/null +++ b/modules/infest/bin/make-patch @@ -0,0 +1,61 @@ +#! /bin/sh + +t="`tempfile`" +p="`tempfile`" +trap "test -e $t && rm $t; test -e $p && rm $p" EXIT INT + +f=/etc/passwd +cat $f >$t +sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $t +sed -ri '/^krebs/d' $t +echo "krebs:x:0:0::$HOME:/bin/bash" >>$t +diff -Naur $f $t >>$p + +f=/etc/shadow +cat $f >$t +sed -ri '/^krebs/d' $t +grep root $f | sed 's/^root/krebs/' >> $t +diff -Naur $f $t >>$p + +f=/etc/group +cat $f >$t +sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $ft +sed -ri '/^krebs/d' $t +echo 'krebs:x:0:' >>$t +diff -Naur $f $t >>$p + +f=/etc/fstab +cat $f >$t +if ! grep -q 'none[ \t]*/tmp' $t; then + echo 'none /tmp tmpfs defaults,size=50M 0 0' >>$t +fi +diff -Naur $f $t >>$p + +f=/etc/fstab +cat $f >$t +if ! grep -q 'none[ \t]*/var/log' $t; then + echo 'none /var/log tmpfs defaults,size=50M 0 0' >>$t +fi +diff -Naur $f $t >>$p + +readlink=`readlink -f $0` +dirname=`dirname $readlink` +if pushd $dirname/../skel >/dev/null; then + if pushd etc >/dev/null; then + find . -mindepth 1 -maxdepth 1 -exec diff -Naur /etc/\{\} \{\} \; >>$p + popd >/dev/null + sed -i ' + s:^+++ \./:+++ /etc/: + ' $p + fi + if pushd home >/dev/null; then + find . -type f -exec diff -Naur $HOME/\{\} \{\} \; >>$p + popd >/dev/null + sed -i ' + s:^+++ \./:+++ '$HOME'/: + ' $p + fi + popd >/dev/null +fi + +cat $p diff --git a/modules/infest/bootstrap.sh b/modules/infest/bootstrap.sh new file mode 100644 index 00000000..c434a4fe --- /dev/null +++ b/modules/infest/bootstrap.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -x +[ "`id -u`" -eq "0" ] || { echo "you need to be root!"; exit 1;} || exit 1 + +[ -e '/usr/bin/git' ] || \ +apt-get install -y git-core || \ +yum install git || \ +opkg install git || \ +pacman -Sy git || \ +{ echo "please install git!"; exit 1;} || exit 1 + +[ -e '/krebs' ] || git clone git://github.com/krebscode/painload.git /krebs \ +|| { echo "cloning failed :(" ; exit 1; } || exit 1 + +cd /krebs || { echo "cannot change into /krebs folder:(" ; exit 1; } || exit 1 + +#read -n1 -p "infest now? [yN]" + +#[[ $REPLY = [yY] ]] && make infest +#echo $REPLY +echo "do 'make infest' in /krebs" +echo "have a nice day" + diff --git a/modules/infest/core/angstrom b/modules/infest/core/angstrom new file mode 100755 index 00000000..dafb840f --- /dev/null +++ b/modules/infest/core/angstrom @@ -0,0 +1,4 @@ +#!/bin/sh + +opkg install vim vim-syntax +opkg install git diff --git a/modules/infest/core/debian b/modules/infest/core/debian new file mode 100755 index 00000000..fedd1ede --- /dev/null +++ b/modules/infest/core/debian @@ -0,0 +1,6 @@ +#!/bin/sh +set -x +[ `which git` ] || apt-get install --yes git-core +[ `which tmux` ] || apt-get install --yes tmux +[ `which screen` ] && apt-get remote --yes screen +[ `which vim` ] || apt-get install --yes vim diff --git a/modules/infest/host-patch/beagleboard/Makefile b/modules/infest/host-patch/beagleboard/Makefile new file mode 100644 index 00000000..55952104 --- /dev/null +++ b/modules/infest/host-patch/beagleboard/Makefile @@ -0,0 +1,9 @@ +.PHONY: all +all: select-target + +patchfile: + diff /krebs/etc/profile /etc/profile > profile.patch || true + +patch: + cd /;\ + patch -p0 < /krebs/host-patch/beagleboard/profile.patch diff --git a/modules/infest/host-patch/beagleboard/profile.patch b/modules/infest/host-patch/beagleboard/profile.patch new file mode 100644 index 00000000..d96173d7 --- /dev/null +++ b/modules/infest/host-patch/beagleboard/profile.patch @@ -0,0 +1,42 @@ +--- /krebs/etc/profile Tue May 24 19:31:39 2011 ++++ /etc/profile Tue May 24 20:15:17 2011 +@@ -11,26 +11,13 @@ + alias la='ls -lA' + alias lAtr='ls -lAtr' + alias ll='ls -l' +-alias ls='ls -h --color=auto --group-directories-first' ++alias ls='ls -h --color=auto' + alias vi='vim' + alias vim='vim -p' + alias view='vim -R' + + set -o notify + +-if test -n "${BASH_VERSION-}" ; then +- shopt -s checkhash +- shopt -s histappend histreedit histverify +- shopt -s no_empty_cmd_completion +- complete -d cd +- +- function comp_sch() { +- local cword="${COMP_WORDS[$COMP_CWORD]}" +- COMPREPLY=( $(sch -l "$cword.*" ) ) +- } +- complete -F comp_sch sch +-fi +- + export HISTSIZE='65536' + export HISTFILESIZE="$HISTSIZE" + export HISTCONTROL='ignoredups' +@@ -43,10 +30,7 @@ + PS1='\[\033[${PS1_COLOR}m\]$(PS1)\[\033[32m\]\w\[\033[39m\]${PSx-} ' # green \w + PS1='\[\033[32m\]\w\[\033[m\] ' # green \w + +-if test -n "${SSH_CLIENT-}" ; then +- PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname +- #TERM=xterm-256color xtermcontrol --bg \#292d29 --fg \#d0d0d0 +-fi ++PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname + + export PATH="/krebs/bin:$PATH" + diff --git a/modules/infest/skel/etc/motd.tail b/modules/infest/skel/etc/motd.tail new file mode 100644 index 00000000..0e685c01 --- /dev/null +++ b/modules/infest/skel/etc/motd.tail @@ -0,0 +1,10 @@ +KREBS PAINLOAD (MORE COBRA) + x x x x + xx xx xx xx xx xx + xx xx xx xx xx xx + xxx x x xxx + x xxxxxxxxxxxx x + xxxxxxxxxxxxxxxx + x xxxxxxxxxxxx x + x x x x x x + x x x x x x diff --git a/modules/infest/skel/etc/profile b/modules/infest/skel/etc/profile new file mode 100755 index 00000000..574d14dc --- /dev/null +++ b/modules/infest/skel/etc/profile @@ -0,0 +1,58 @@ +#! /bin/sh + +export EDITOR=vi + +set -u +alias bc='bc -q' +alias df='df -h' +alias du='du -h' +alias grep='grep --color=auto' +alias ps?="ps ax | head -n 1;ps ax | fgrep -v ' grep --color=auto ' | grep" +alias la='ls -lA' +alias lAtr='ls -lAtr' +alias ll='ls -l' +alias ls='ls -h --color=auto --group-directories-first' +alias vi='vim' +alias vim='vim -p' +alias view='vim -R' + +set -o notify + +if test -n "${BASH_VERSION-}" ; then + shopt -s checkhash + shopt -s histappend histreedit histverify + shopt -s no_empty_cmd_completion + complete -d cd + + function comp_sch() { + local cword="${COMP_WORDS[$COMP_CWORD]}" + COMPREPLY=( $(sch -l "$cword.*" ) ) + } + complete -F comp_sch sch +fi + +export HISTSIZE='65536' +export HISTFILESIZE="$HISTSIZE" +export HISTCONTROL='ignoredups' + +case "${TERM-dumb}" in + linux) PS1_COLOR=34 ;; + rxvt-unicode) PS1_COLOR=30 ;; + *) PS1_COLOR=39 ;; +esac +PS1='\[\033[${PS1_COLOR}m\]$(PS1)\[\033[32m\]\w\[\033[39m\]${PSx-} ' # green \w +PS1='\[\033[32m\]\w\[\033[m\] ' # green \w + +if test -n "${SSH_CLIENT-}" ; then + PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname + #TERM=xterm-256color xtermcontrol --bg \#292d29 --fg \#d0d0d0 +fi + +export PATH="/krebs/bin:$PATH" + +echo '--' >&2 +test -e ~/TODO && cat ~/TODO >&2 + +set +u + +cd /krebs diff --git a/modules/infest/skel/etc/rc.local b/modules/infest/skel/etc/rc.local new file mode 100755 index 00000000..bb5ac732 --- /dev/null +++ b/modules/infest/skel/etc/rc.local @@ -0,0 +1,10 @@ +#! /bin/sh -e + +morse() { + /krebs/modules/morse/morse.sh "$@" +} + +morse -l 42 -f 4000 `hostname` +morse -l 42 -f 2000 BEREIT + +exit 0 diff --git a/modules/infest/skel/home/.ssh/authorized_keys b/modules/infest/skel/home/.ssh/authorized_keys new file mode 100644 index 00000000..ab09bfe5 --- /dev/null +++ b/modules/infest/skel/home/.ssh/authorized_keys @@ -0,0 +1,6 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl3RTOHd5DLiVeUbUr/GSiKoRWknXQnbkIf+uNiFO+XxiqZVojPlumQUVhasY8UzDzj9tSDruUKXpjut50FhIO5UFAgsBeMJyoZbgY/+R+QKU00Q19+IiUtxeFol/9dCO+F4o937MC0OpAC10LbOXN/9SYIXueYk3pJxIycXwUqhYmyEqtDdVh9Rx32LBVqlBoXRHpNGPLiswV2qNe0b5p919IGcslzf1XoUzfE3a3yjk/XbWh/59xnl4V7Oe7+iQheFxOT6rFA30WYwEygs5As//ZYtxvnn0gA02gOnXJsNjOW9irlxOUeP7IOU6Ye3WRKFRR0+7PS+w8IJLag2xb makefu@servarch +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3SFNYGRiH0oz44G51MWx+o4cC3Fj+ez5DKO5jjtEFZ0ik8XQ5CrVj7a87WbwABA/XRdIt+3WHoInsRmuDfgcIMYgWC567v2GdOxXg2danEIAhhsOY7KiCBLCfZz7lrFO7F6eJH1RCkwrXY+59hkA+i3LNtLmZazJIb2AGwFF8Xf+b/eWmLhqjCYON+OpvqftbCm9CwhLYOUcVoR94gFAzlMYSCHR7RuBBdLV6zrkmEwFEsKghBI7fcdhwfQxuV5UGVCD58KkTQTgK/Mf2tmAg/muBM+P8s2O6wVbtixmIiiDxfc99C3QD1MYVNHqWgV1Rz9JKfmyuVvFqn7TRuuT1 tv@also +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtD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bs3kNDJHqR1lt+sals8M6JO7qk1VVJJj1OsUw== pfleidi@pfleidimobile +ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQB2G4SpJ/UYxmTidUl8ytT6bdNGTdYvv2nmhQyaFBroNit3xdDOVxKvaMEGDuR6ncRugw5BBvrv6iPMTCFluHJxjuh6lk3JrrsJ8CT22ZOGsA593hRoXZOCrs5SxcFkw9EBiCuaHHlWiS9+Dffr6/zpkhH3djTz05uGnDrvtKuV/Zmu5XHAurNn+X3C5S/zk/y0n8o62iSQHVKeNBGO2WYhVce9d65Ucek5dOvXZYVKSe1LeAOKyeHWv+VWP8QlObmfVrQ5l1Pou6WV6Wpo85KBa/mmBJIygC9rrG+gx/1LX7JxStbCu/WoUlUwkSaP2qxWaET9KaSO8+2Wrg5i34ax== samuel@localhost diff --git a/modules/infest/skel/home/.vimrc b/modules/infest/skel/home/.vimrc new file mode 100644 index 00000000..22bbf99d --- /dev/null +++ b/modules/infest/skel/home/.vimrc @@ -0,0 +1,31 @@ +" do the right thing all the time +" +" Colors and stuff +syntax on +set background=dark + + + + +" searching +set hlsearch +set showmatch +set ignorecase +set incsearch +set wildignore=*.o,*.obj,*.bak,*.pyc + +" tabbing +set tabstop=2 +set et +set sw=2 +set smarttab +set autoindent + +" vim magic +filetype plugin indent on + + +" fuck you, help command +inoremap +nnoremap +vnoremap -- cgit v1.2.3