Move scripts to own folder

This commit is contained in:
sonny 2018-07-24 07:00:11 +02:00
parent 9204716d04
commit 5d9e05b202
24 changed files with 17 additions and 1031 deletions

View file

@ -8,25 +8,22 @@ function get_path {
SCRIPTPATH=`dirname $SCRIPT` SCRIPTPATH=`dirname $SCRIPT`
} }
function user_config { read -p 'Install the script for a normal user or root account? [user/root]: ' USER
read -p 'Install the script for a normal user or root account? [user/root]: ' USER
if [[ "$USER" == "user" ]]; then if [[ "$USER" == "user" ]]; then
get_path get_path
mkdir $HOME/.vim mkdir $HOME/.vim
ln -sf $SCRIPTPATH/{.bashrc,vim/.vimrc,tmux/.tmux.conf,.profile} $HOME/; ln -sf $SCRIPTPATH/{.bashrc,vim/.vimrc,.tmux.conf,.profile} $HOME/;
ln -sf $SCRIPTPATH/vim/colors $HOME/.vim/ ln -sf $SCRIPTPATH/vim/colors $HOME/.vim/
echo 'Linking configuration files done' echo 'Linking configuration files done'
elif [[ "$USER" == "root" ]]; then elif [[ "$USER" == "root" ]]; then
get_path get_path
mkdir /root/.vim mkdir /root/.vim
ln -sf $SCRIPTPATH/{.bashrc,vim/.vimrc,tmux/.tmux.conf,.profile} /root/ ln -sf $SCRIPTPATH/{.bashrc,vim/.vimrc,.tmux.conf,.profile} /root/
ln -sf $SCRIPTPATH/vim/colors /root/.vim/ ln -sf $SCRIPTPATH/vim/colors /root/.vim/
echo 'Linking configuration files done' echo 'Linking configuration files done'
else else
echo 'No selection was made' echo 'No selection was made'
exit 1 exit 1
fi fi
}
user_config

View file

@ -1,16 +0,0 @@
# Start ssh-agent and add keys in ~/.ssh directory
# Should only be used without a desktop manager
ENV=/tmp/.agent_env
KEYS=$(basename --suffix=.pub -a $HOME/.ssh/*.pub)
if [ -z "$SSH_AGENT_PID" ] && [ ! -e "$ENV" ] ; then
ssh-agent > $ENV
source $ENV
for key in $KEYS;
do
ssh-add ~/.ssh/$key
done
echo 'Agent started'
else
source $ENV
echo 'Agent started already, good to go'
fi

View file

@ -1,3 +0,0 @@
#!/bin/bash
# Check if port is used
sudo lsof -i:$1

View file

@ -1,26 +0,0 @@
#!/bin/bash
# Connects remote nfs filesystems
if [ $# -eq 2 ]; then
echo "Mounting $1"
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$1 /mnt/nfs/$1
echo "Mounting $2"
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$2 /mnt/nfs/$2
elif [ $# -gt 2 ]; then
echo "Mounting $1"
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$1 /mnt/nfs/$1
echo "Mounting $2"
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$2 /mnt/nfs/$2
echo "Mounting $3"
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$3 /mnt/nfs/$3
elif [ $# -eq 1 ]; then
echo "Mounting $1"
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/$1 /mnt/nfs/$1
fi
if [ $# -eq 0 ]; then
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/Music /mnt/nfs/Music
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/Downloads /mnt/nfs/Downloads
sudo mount -t nfs -o soft,intr 10.8.0.1:/mnt/Video /mnt/nfs/Video
echo "Mounted Music, Downloads and Video"
fi
exit 0

View file

@ -1,4 +0,0 @@
#!/bin/bash
# $1 is for the container to be copied
# $2 is the name of the newly snapshotted container
lxc-copy -n $1 -N $2 -B overlayfs -s

View file

@ -1,86 +0,0 @@
#!/bin/bash
# Debian containers only
# ca-certificates needed in order to clone from github
PACKAGES="ca-certificates vim git dbus less locales man-db "
REPO=https://github.com/SonnyBA/dotfiles.git
if [ $EUID != 0 ]; then
echo "This script needs sudo priveleges (for systemd-nspawn)"
echo "Exiting..."
exit 1
fi
run() {
systemd-nspawn -D $CONTAINER_PATH $@
}
config_ssh() {
sed -i 's/^#Port .*/Port '"$PORT"'/' $CONTAINER_PATH/etc/ssh/sshd_config
sed -i 's/^#PermitRootLogin .*/PermitRootLogin yes/' $CONTAINER_PATH/etc/ssh/sshd_config
sed -i 's/^#PubkeyAuthentication .*/PubkeyAuthentication yes/' $CONTAINER_PATH/etc/ssh/sshd_config
cat $SSHKEY >> $CONTAINER_PATH/root/.ssh/authorized_keys
}
dotfiles() {
run git clone $REPO /root/dotfiles
run /root/dotfiles/initialize_script
}
read -e -p "Enter the path of the container (including container root): " CONTAINER_PATH
read -p "Enter debian release channel: " CHANNEL
read -e -p "Enter (private) ssh key for git (absolute path): " KEY
read -p "Start a ssh server? [y/n]: " SSH_SERVER
read -p "Hostname? : " HOSTNAME
read -p "Add dotfiles? [y/n]: " DOTFILES
read -p "Enter additional packages (space separated) to install or leave blank: " EXTRA
read -p "Append container to ssh user config? [y/n]: " USER_CONFIG
if [ "$SSH_SERVER" == "y" ];then
read -p "Enter ssh listening port: " PORT
PACKAGES+=" ssh "
fi
PACKAGES+=$EXTRA
# Seperate packages with a comma for debootstrap's include flag
PACKAGES=$(echo $PACKAGES | sed 's/\ /,/g;s/,$//')
debootstrap --include=$PACKAGES $CHANNEL $CONTAINER_PATH
mkdir $CONTAINER_PATH/root/{.bin,.ssh}
cp $KEY $KEY.pub $CONTAINER_PATH/root/.ssh/
if [ -n "$HOSTNAME" ] ;then
echo $HOSTNAME > $CONTAINER_PATH/etc/hostname
fi
if [ "$SSH_SERVER" == "y" ] ;then
read -e -p "Enter ssh key for container access: " SSHKEY
config_ssh
fi
if [ "$DOTFILES" == "y" ] ;then
dotfiles
fi
if [ "$USER_CONFIG" == "y" ]; then
cat <<- EOF >> /home/$SUDO_USER/.ssh/config
Host $HOSTNAME
User root
Hostname 127.0.0.1
Port $PORT
EOF
# Remove leading whitespace
sed -i 's/^ *//g' /home/$SUDO_USER/.ssh/config
fi
echo "Updating default pager to less"
update-alternatives --set pager /bin/less
echo "Enter root pass"
run passwd
CONTAINER_NAME=$(basename $CONTAINER_PATH)
echo "Container finished setting up, use ssh $HOSTNAME after starting the machine" \
"with machinectl start $CONTAINER_NAME"

View file

@ -1,6 +0,0 @@
#!/bin/bash
# Create ctags from the current dir and the same dir in the .virtualenvs folder
PROJECT_NAME=$(basename $PWD)
ctags -R $PWD $HOME/.virtualenvs/$PROJECT_NAME
mkdir -p $HOME/.tags && mv ./tags $HOME/.tags/$PROJECT_NAME

View file

@ -1,16 +0,0 @@
#!/bin/bash
# Send an email when the public ipv4 address changes
if [[ -a /tmp/ipv4_address ]]; then
CURRENT_IP=$(/usr/bin/dig +short myip.opendns.com @resolver1.opendns.com)
PREVIOUS_IP=$(cat /tmp/ipv4_address)
if [[ $CURRENT_IP != $PREVIOUS_IP ]]; then
echo "IP address changed from $PREVIOUS_IP to $CURRENT_IP" | /usr/bin/mail -s 'IP address changed' sonnyba871@gmail.com
echo $CURRENT_IP > /tmp/ipv4_address
echo "Mail sent"
fi
else
echo "$(/home/sonny/dotfiles/scripts/pubip)" > /tmp/ipv4_address
fi

View file

@ -1,26 +0,0 @@
#!/bin/bash
#COUNT=0
#ARRAY=()
if [ -n "$(ls -A /mnt/nfs/Downloads)" ]; then
DOWNLOADS="Downloads"
echo "Unmounting $DOWNLOADS"
if sudo umount /mnt/nfs/$DOWNLOADS ; then
echo "Unmounted $DOWNLOADS"
fi
fi
if [ -n "$(ls -A /mnt/nfs/Music)" ]; then
MUSIC="Music"
echo "Unmounting $MUSIC"
if sudo umount /mnt/nfs/$MUSIC ; then
echo "Unmounted $MUSIC"
fi
fi
if [ -n "$(ls -A /mnt/nfs/Video)" ]; then
VIDEO="Video"
echo "Unmounting $VIDEO"
if sudo umount /mnt/nfs/$VIDEO ; then
echo "Unmounted $VIDEO"
fi
fi

View file

@ -1,24 +0,0 @@
#!/bin/bash
# Generate a numbered tap device name
TAP="tap0"
COUNT=0
while [[ true ]]; do
FOUND=false
for INT in $(ls /sys/class/net); do
if [[ $INT == $TAP ]]; then
((COUNT++))
TAP="tap$COUNT"
FOUND=true
continue
fi
done
if [[ !$FOUND ]]; then
break
fi
done

View file

@ -1,22 +0,0 @@
#!/bin/bash
# This script removes the specified interface if it exists
if [[ $EUID != 0 ]]; then
echo "This script needs sudo priveleges"
echo "Exiting..."
exit 1
fi
for INT in $(ls /sys/class/net); do
if [[ $INT == $1 ]]; then
/sbin/ip link delete dev $1 type tap
DELETED=true
break
fi
done
if [[ !$DELETED ]]; then
echo "Interface $1 not found, nothing to delete"
exit 1
fi

View file

@ -1,27 +0,0 @@
#!/bin/bash
# This script adds an specified tap interface to first bridge
# found with the name containing br0
if [[ $EUID != 0 ]]; then
echo "This script needs sudo priveleges"
echo "Exiting..."
exit 1
fi
for INT in $(ls /sys/class/net); do
if [[ $INT == *"br0"* && -d /sys/class/net/$INT/bridge/. ]]; then
BRIDGE="$INT"
break
fi
done
if [[ -z $BRIDGE ]]; then
echo 'No bridge INTerfaces seen'
exit 1
fi
/sbin/ip tuntap add dev $1 mode tap
/sbin/ip link set $1 up
/sbin/ip link set dev $1 master $BRIDGE

View file

@ -1,85 +0,0 @@
#!/bin/bash
## Script to create and or edit a qemu script
create_script() {
read -p "Create VM image? [y/n]: " IMAGE
# Image creation/selection
if [ "$IMAGE" == "y" ] ;then
read -e -p "Enter the the path of the image: " DISK
read -p "Enter the size of the image [10G/5G]: " SIZE
qemu-img create -f raw "$DISK" "$SIZE"
elif [ "$IMAGE" == "n" ] ;then
read -e -p "Enter the Disk path and press [ENTER]: " DISK
else
exit 1
fi
# VM configuration
read -p "Enter the VM name and press [ENTER]: " NAME
read -p "Enter the port number and press [ENTER]: " PORT
read -p "Enter qemu script's name and press [ENTER]: " FILE
read -p "Enter the amount of RAM [1G/4G]: " RAM
read -p "Enter the number of cores the guest can use [1/4]: " CORES
read -p "Boot disk needed? [y/n]: " ANSWER
if [ "$ANSWER" == "y" ] ;then
read -e -p "Enter the Boot disk path and press [ENTER]: " BOOT_DISK
else
echo "Okay, dropping boot disk"
fi
# Creation of script
touch "$HOME/.bin/qemu/$FILE"
chmod +x "$HOME/.bin/qemu/$FILE"
if [ "$ANSWER" == "y" ] ;then
echo -e '#!/bin/bash \n' \
'qemu-system-x86_64 -enable-kvm --daemonize \' '\n' \
'\t -cpu host \' '\n' \
'\t -smp '$CORES' \' '\n' \
'\t -drive format=raw,file='$DISK',if=virtio \' '\n' \
'\t -boot d -cdrom '$BOOT_DISK' \' '\n' \
'\t -m '$RAM' \' '\n' \
'\t -name '$NAME' \' '\n' \
'\t -vga qxl \' '\n' \
'\t -spice port='$PORT',disable-ticketing \' '\n' \
'\t -device virtio-serial \' '\n' \
'\t -chardev spicevmc,id=vdagent,name=vdagent \' '\n' \
'\t -device virtserialport,chardev=vdagent,name=com.redhat.spice.0' \
> $HOME/.bin/qemu/$FILE
# Remove leading whitespace
sed -i 's/^ *//g' $HOME/.bin/qemu/$FILE
elif [ "$ANSWER" == "n" ] ;then
echo -e '#!/bin/bash \n' \
'qemu-system-x86_64 -enable-kvm --daemonize \' '\n' \
'\t -cpu host \' '\n' \
'\t -smp '$CORES' \' '\n' \
'\t -drive format=raw,file='$DISK',if=virtio \' '\n' \
'\t -m '$RAM' \' '\n' \
'\t -name '$NAME' \' '\n' \
'\t -vga qxl \' '\n' \
'\t -spice port='$PORT',disable-ticketing \' '\n' \
'\t -device virtio-serial \' '\n' \
'\t -chardev spicevmc,id=vdagent,name=vdagent \' '\n' \
'\t -device virtserialport,chardev=vdagent,name=com.redhat.spice.0' \
> $HOME/.bin/qemu/$FILE
sed -i 's/^ *//g' $HOME/.bin/qemu/$FILE
fi
# Remove trailing whitespaces
sed -i 's/\s*$//g' $HOME/.bin/qemu/$FILE
}
# Remove GUI options for headless VM
remove_gui() {
sed -i "/-vga\|-spice\|virtio-serial\|-chardev\|exec/d" "$FILENAME"
}
read -p "Do you want to create a qemu script or remove the gui from a script? [create/remove]: " FUNCTION
if [ "$FUNCTION" == "create" ] ;then
create_script
elif [ "$FUNCTION" == "remove" ] ;then
read -e -p "Enter script's file path and press [Enter]: " FILENAME
remove_gui
fi

View file

@ -1,8 +0,0 @@
#!/bin/bash
#Why does it not work all the time ?
#When this command runs nmap tries to ping the given IP address range to check if the hosts are alive. If ping fails it tries to send syn packets to port 80 (SYN scan). This is not hundred percent reliable because modern host based firewalls block ping and port 80. Windows firewall blocks ping by default. The hosts you have on the network are blocking ping and the port 80 is not accepting connections. Hence nmap assumes that the host is not up.
# $1 = ip gateway
# example 192.168.178.1/24
nmap -sP $1

View file

@ -1,10 +0,0 @@
#!/bin/bash
## Interactive prompt to show linux syntax
Shortcuts=$HOME/Sync/Linux/Syntax/*
echo "Which shortcut would you like to be shown?"
for file in $Shortcuts; do
echo $file
done
read input_variable
echo "You've selected $input_variable'"
cat $HOME/Sync/Linux/Syntax/$input_variable

View file

@ -1,6 +0,0 @@
#!/bin/bash
#Possible to close after execution!
#Hostname = $1
#Local port = $2
#Remote port = $3
ssh -L $2:127.0.0.1:$3 $1

View file

@ -1,10 +0,0 @@
#!/bin/bash
tmux start-server;
tmux new-session -d -s Main;
tmux new-window -t Main;
tmux new-window -t Main;
tmux new-window -t Main;
tmux new-session -d -s Development;
tmux new-window -t Development;
tmux new-window -t Development;
tmux new-window -t Development;

View file

@ -1,15 +0,0 @@
[Unit]
Description=Start tmux in detached session
After=ssh.service
[Service]
User=%I
Environment=DISPLAY=:0
Environment=XAUTHORITY=/tmp/xauth-1000-_0
WorkingDirectory=/home/%I
ExecStart=/bin/bash /home/%I/.bin/tmux_start
RemainAfterExit=True
Type=oneshot
[Install]
WantedBy=default.target

View file

@ -1,121 +0,0 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=80
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal cursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'python'
setlocal filetype=python
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=20
setlocal foldmarker={{{,}}}
setlocal foldmethod=indent
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=^\\s*\\(from\\|import\\)
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal indentexpr=GetPythonIndent(v:lnum)
setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=pydoc
setlocal linebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=pythoncomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norelativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal signcolumn=auto
setlocal nosmartindent
setlocal softtabstop=4
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=.py
setlocal noswapfile
setlocal synmaxcol=3000
if &syntax != 'python'
setlocal syntax=python
endif
setlocal tabstop=4
setlocal tagcase=
setlocal tags=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
let s:l = 1 - ((0 * winheight(0) + 18) / 37)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
1
normal! 0
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :

View file

@ -1,131 +0,0 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=netrw#BalloonHelp()
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=hide
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=80
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal cursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'python'
setlocal filetype=python
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=20
setlocal foldmarker={{{,}}}
setlocal foldmethod=indent
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=^\\s*\\(from\\|import\\)
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal indentexpr=GetPythonIndent(v:lnum)
setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=pydoc
setlocal linebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=pythoncomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norelativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal signcolumn=auto
setlocal nosmartindent
setlocal softtabstop=4
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=.py
setlocal noswapfile
setlocal synmaxcol=3000
if &syntax != 'python'
setlocal syntax=python
endif
setlocal tabstop=4
setlocal tagcase=
setlocal tags=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
83
normal! zo
104
normal! zo
106
normal! zo
124
normal! zo
152
normal! zo
let s:l = 40 - ((22 * winheight(0) + 18) / 37)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
40
normal! 0
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :

View file

@ -1,123 +0,0 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=80
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal cursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'python'
setlocal filetype=python
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=20
setlocal foldmarker={{{,}}}
setlocal foldmethod=indent
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=^\\s*\\(from\\|import\\)
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal indentexpr=GetPythonIndent(v:lnum)
setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=pydoc
setlocal linebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=pythoncomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norelativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal signcolumn=auto
setlocal nosmartindent
setlocal softtabstop=4
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=.py
setlocal noswapfile
setlocal synmaxcol=3000
if &syntax != 'python'
setlocal syntax=python
endif
setlocal tabstop=4
setlocal tagcase=
setlocal tags=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
4
normal! zo
let s:l = 6 - ((5 * winheight(0) + 18) / 37)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
6
normal! 09|
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :

View file

@ -1,121 +0,0 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=80
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal cursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'python'
setlocal filetype=python
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=20
setlocal foldmarker={{{,}}}
setlocal foldmethod=indent
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=^\\s*\\(from\\|import\\)
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal indentexpr=GetPythonIndent(v:lnum)
setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=pydoc
setlocal linebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=pythoncomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norelativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal signcolumn=auto
setlocal nosmartindent
setlocal softtabstop=4
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=.py
setlocal noswapfile
setlocal synmaxcol=3000
if &syntax != 'python'
setlocal syntax=python
endif
setlocal tabstop=4
setlocal tagcase=
setlocal tags=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
let s:l = 1 - ((0 * winheight(0) + 18) / 37)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
1
normal! 0
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :

View file

@ -1,125 +0,0 @@
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
argglobal
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),:,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=80
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal cursorline
setlocal define=
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal expandtab
if &filetype != 'python'
setlocal filetype=python
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=20
setlocal foldmarker={{{,}}}
setlocal foldmethod=indent
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=tcq
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=2
setlocal imsearch=2
setlocal include=^\\s*\\(from\\|import\\)
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
setlocal indentexpr=GetPythonIndent(v:lnum)
setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=pydoc
setlocal linebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
setlocal number
setlocal numberwidth=4
setlocal omnifunc=pythoncomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
setlocal norelativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal shiftwidth=4
setlocal noshortname
setlocal signcolumn=auto
setlocal nosmartindent
setlocal softtabstop=4
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=.py
setlocal noswapfile
setlocal synmaxcol=3000
if &syntax != 'python'
setlocal syntax=python
endif
setlocal tabstop=4
setlocal tagcase=
setlocal tags=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
7
normal! zo
8
normal! zo
let s:l = 20 - ((19 * winheight(0) + 18) / 37)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
20
normal! 016|
let &so = s:so_save | let &siso = s:siso_save
doautoall SessionLoadPost
" vim: set ft=vim :