aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-06-04 03:59:21 +0000
committerterminaldweller <thabogre@gmail.com>2022-06-04 03:59:21 +0000
commit00312e004f7fa0bfe077708818b030890a1a63d9 (patch)
tree68840cedc0956ea4d7c57177eeb7e4872335fd5f
parentupdate (diff)
downloadscripts-00312e004f7fa0bfe077708818b030890a1a63d9.tar.gz
scripts-00312e004f7fa0bfe077708818b030890a1a63d9.zip
updates
-rw-r--r--.config/libvirt/libvirt.conf18
-rw-r--r--.vimrc6
-rw-r--r--.zshrc4
-rw-r--r--irssi/Dockerfile2
-rw-r--r--postit1
-rwxr-xr-xvagrant/build_linux.sh82
-rwxr-xr-xzfs/export.sh3
-rwxr-xr-xzfs/import.sh2
8 files changed, 113 insertions, 5 deletions
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 <<EOL
+#!/bin/sh
+mount -t proc none /proc
+mount -t sysfs none /sys
+exec sh
+EOL
+chmod +x "$INITRAMFS_BASE"/bin/init
+
+cat > "$INITRAMFS_BASE"/etc/inittab <<EOL
+::sysinit:/etc/init.d/rcS
+::respawn:-/bin/sh
+::askfirst:-/bin/sh
+::cttlaltdel:/bin/umount -a -r
+EOL
+chmod 755 "$INITRAMFS_BASE"/etc/inittab
+
+mkdir -p "$INITRAMFS_BASE"/etc/init.d
+cat > "$INITRAMFS_BASE"/etc/init.d/rcS <<EOL
+echo "----------mount all in fstab----------------"
+/bin/mount -a #Read / etc/fstab and load the file system
+mkdir -p /dev/pts
+mount -t devpts devpts /dev/pts
+echo /sbin/mdev > /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 <<EOL
+#device mount-point type option dump fsck
+proc /proc proc defaults 0 0
+temps /tmp rpoc defaults 0 0
+none /tmp ramfs defaults 0 0
+sysfs /sys sysfs defaults 0 0
+mdev /dev ramfs defaults 0 0
+EOL
+
+cd "$INITRAMFS_BASE"/dev
+sudo mknod console c 5 1
+sudo mknod null c 1 3
+sudo mknod tty1 c 4 1
+# sudo mknod dev/ram b 1 0
+
+cd "$INITRAMFS_BASE"
+find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../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