From 00312e004f7fa0bfe077708818b030890a1a63d9 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Sat, 4 Jun 2022 08:29:21 +0430 Subject: updates --- .config/libvirt/libvirt.conf | 18 ++++++++++ .vimrc | 6 ++-- .zshrc | 4 +++ irssi/Dockerfile | 2 +- postit | 1 + vagrant/build_linux.sh | 82 ++++++++++++++++++++++++++++++++++++++++++++ zfs/export.sh | 3 +- zfs/import.sh | 2 +- 8 files changed, 113 insertions(+), 5 deletions(-) create mode 100644 .config/libvirt/libvirt.conf create mode 100755 vagrant/build_linux.sh diff --git a/.config/libvirt/libvirt.conf b/.config/libvirt/libvirt.conf new file mode 100644 index 0000000..0ab4cef --- /dev/null +++ b/.config/libvirt/libvirt.conf @@ -0,0 +1,18 @@ +# +# This can be used to setup URI aliases for frequently +# used connection URIs. Aliases may contain only the +# characters a-Z, 0-9, _, -. +# +# Following the '=' may be any valid libvirt connection +# URI, including arbitrary parameters + +#uri_aliases = [ +# "hail=qemu+ssh://root@hail.cloud.example.com/system", +# "sleet=qemu+ssh://root@sleet.cloud.example.com/system", +#] + +# +# These can be used in cases when no URI is supplied by the application +# (@uri_default also prevents probing of the hypervisor driver). +# +uri_default = "qemu:///system" diff --git a/.vimrc b/.vimrc index 65c3622..16a95e2 100644 --- a/.vimrc +++ b/.vimrc @@ -1428,10 +1428,12 @@ augroup ALEJS autocmd FileType javascript let b:ale_fixers = {'javascript': ['prettier']} augroup END let g:ale_python_black_options = "--line-length 79" +let b:ale_python_flake8_options = "--ignore=E203,W503" +let b:ale_python_isort_options = "--multiline 3 --profile black" augroup ALEPY autocmd! - autocmd FileType python let b:ale_linters = {'python': ['flake8']} - autocmd FileType python let b:ale_fixers = {'python': ['black']} + autocmd FileType python let b:ale_linters = {'python': ['flake8','mypy', 'pylint', 'bandit']} + autocmd FileType python let b:ale_fixers = {'python': ['black', 'isort']} augroup END augroup ALERUBY autocmd! diff --git a/.zshrc b/.zshrc index 9eec30d..aca227a 100644 --- a/.zshrc +++ b/.zshrc @@ -20,6 +20,7 @@ autoload -U compinit && compinit -u eval `dircolors ~/.dir_colors` # _evalcache dircolors ~/.dir_colors +unalias dr alias gd="git diff --color-words" alias w3m="torsocks w3m -o auto_image=FALSE -graph" @@ -323,6 +324,8 @@ export PYGMENTIZE_STYLE="paraiso-dark" # export TZ # export GPG_TTY=$(tty) +export VAGRANT_HOME="/home/devi/storage/ssd1/vagrant" + export BAT_THEME="Solarized (light)" export SVDIR=~/service @@ -462,6 +465,7 @@ bindkey -v set blink-matching-paren on export KEYTIMEOUT=1 export VIRTUAL_ENV_DISABLE_PROMPT=yes +export QT_QPA_PLATFORMTHEME=gtk2 # fnm eval "$(fnm env)" diff --git a/irssi/Dockerfile b/irssi/Dockerfile index 76c0572..74be72a 100644 --- a/irssi/Dockerfile +++ b/irssi/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ )"; \ apk add --no-network --virtual .irssi-rundeps $runDeps; \ - apk add --no-cache perl-glib perl-datetime perl-dbi perl-dbd-pg; \ + apk add --no-cache perl-glib perl-datetime perl-dbi perl-dbd-pg perl-lwp-protocol-https; \ apk del --no-network .build-deps; \ \ # basic smoke test diff --git a/postit b/postit index 2330b8c..8297304 100644 --- a/postit +++ b/postit @@ -41,3 +41,4 @@ account add telegram +XXXXXXXXXXX account add skypeweb thabogre@gmail.com XXXXXXXX git reset --hard HEAD~2 tcpdump -ennqti enp0s0f0 \( arp or icmp \) +zssh root@192.168.90.7 'tcpdump -ni enp3s0f0 -U -s0 -w - ' | wireshark -k -i - diff --git a/vagrant/build_linux.sh b/vagrant/build_linux.sh new file mode 100755 index 0000000..4f53762 --- /dev/null +++ b/vagrant/build_linux.sh @@ -0,0 +1,82 @@ +#!/usr/bin/sh +set -e + +BUSY_BOX_VERSION="1.35.0" +KERNEL_VERSION="v5.10" +BUILD_BASE=$(pwd)/kernel-dev +INITRAMFS_BASE=$(pwd)/kernel-dev/initramfs + +# wont run wihtout static busybox. the install target should be static too. +mkdir -p ./kernel-dev/busybox +cd ./kernel-dev/busybox &&\ + wget https://www.busybox.net/downloads/busybox-$BUSY_BOX_VERSION.tar.bz2 &&\ + tar -xvf busybox-$BUSY_BOX_VERSION.tar.bz2 +cd busybox-$BUSY_BOX_VERSION &&\ + make defconfig &&\ + LD_FLAGS="--static" make -j4 && make install + +cd "$BUILD_BASE" &&\ + git clone --depth=1 --branch ${KERNEL_VERSION} https://github.com/torvalds/linux +cd linux &&\ + make defconfig &&\ + make -j12 + +cd "$BUILD_BASE" &&\ + mkdir initramfs +(cd initramfs && mkdir -p bin sbin etc proc sys usr/bin usr/sbin dev tmp) +cp -a "${BUILD_BASE}"/busybox/busybox-$BUSY_BOX_VERSION/_install/* ./initramfs + +cat > "$INITRAMFS_BASE"/bin/init < "$INITRAMFS_BASE"/etc/inittab < "$INITRAMFS_BASE"/etc/init.d/rcS < /proc/sys/kernel/hotplug +mdev -s +echo "****************Hello itas109******************" +echo "Kernel Version:linux-5.4.50" +echo "***********************************************" +EOL +chmod 755 "$INITRAMFS_BASE"/etc/init.d/rcS + +cat > "$INITRAMFS_BASE"/etc/fstab < ../initramfs.cpio.gz + +qemu-system-x86_64 \ + -kernel "$BUILD_BASE"/linux/arch/x86/boot/bzImage \ + -initrd "$BUILD_BASE"/initramfs.cpio.gz \ + -nographic \ + -m 512 \ + -append "root=/dev/ram0 init=/bin/init console=ttyS0" diff --git a/zfs/export.sh b/zfs/export.sh index 7110d69..b9b2c18 100755 --- a/zfs/export.sh +++ b/zfs/export.sh @@ -1,3 +1,4 @@ -#/bin/sh +#!/bin/sh + sudo umount -n /mnt/{dev/pts,dev,sys,proc} sudo zpool export zroot diff --git a/zfs/import.sh b/zfs/import.sh index 4181aa9..25efb71 100755 --- a/zfs/import.sh +++ b/zfs/import.sh @@ -1,4 +1,4 @@ -#/bin/sh +#!/bin/sh sudo zpool import -N -R /mnt zroot sudo zfs load-key -L prompt zroot -- cgit v1.2.3