From b94c6510a470760fd226c29be3700e93556b148d Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 20 May 2022 16:27:49 +0430 Subject: update --- .bashrc | 2 + .gitconfig | 2 + .mutt/.muttrc | 48 +++++++++++------ .offlineimaprc | 1 - .vimrc | 6 +++ .w3m/config | 2 +- .zshrc | 2 + chroot/make_jail.sh | 63 +++++++++++++++++++++++ devi.zsh-theme | 7 +-- keymap.kbd | 2 +- kubernetes/bitlbee-purple/bitlbee-deployment.yaml | 2 +- postit | 1 + pygitty.py | 3 ++ 13 files changed, 118 insertions(+), 23 deletions(-) create mode 100755 chroot/make_jail.sh diff --git a/.bashrc b/.bashrc index f0210a1..e1ca686 100644 --- a/.bashrc +++ b/.bashrc @@ -39,6 +39,8 @@ export LESS_TERMCAP_so=$'\e[1;92m' # begin standout-mode - info box export LESS_TERMCAP_ue=$'\e[0m' # end underline export LESS_TERMCAP_us=$'\e[04;38;5;146m' # begin underline +alias v="vim" +alias ls="ls --color=auto" alias la="ls -A" alias ll="ls -la" alias lss="ls -sSa" diff --git a/.gitconfig b/.gitconfig index 02cf44e..2d9922a 100644 --- a/.gitconfig +++ b/.gitconfig @@ -121,3 +121,5 @@ diff = diff-highlight | less [interactive] diffFilter = diff-highlight +[core] + editor = vim diff --git a/.mutt/.muttrc b/.mutt/.muttrc index 9875438..60ad3cb 100644 --- a/.mutt/.muttrc +++ b/.mutt/.muttrc @@ -109,26 +109,33 @@ color index brightcolor222 default "~T~F" # tagged, fla color index brightcolor222 default "~T~N" # tagged, new messages color index brightcolor222 default "~T~U" # tagged, unread messages -color index red default "~D(!~p|~p)" # deleted +color index color167 default "~D(!~p|~p)" # deleted color index color111 default "~F" # flagged -color index brightred default "~=" # duplicate messages +color index color167 default "~=" # duplicate messages color index color22 default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest color index brightgreen default "~A~N!~T!~p!~Q!~F!~D" # the rest, new -color index black red "~D" # deleted messages +color index black color167 "~D" # deleted messages color index yellow default "~(~N)" # messages in threads with some unread color index green default "~S" # superseded messages color index yellow default "~T" # tagged messages -color index brightred red "~=" # duplicated messages +color index color167 default "~=" # duplicated messages # message headers ------------------------------------------------------ -color hdrdefault default default +# gives us all the cool email headers +unignore * +# color the line containing the match, not just the match +set header_color_partial=no +color hdrdefault default default color header color69 default "^ARC-" color header color25 default "^Received" color header color30 default "^X-" +color header color131 default "^Message-ID" +color header color66 default "^Return-Path" +color header color167 default "^Reply-To" color header color36 default "^List-" color header color63 default "^MIME-" -color header color99 default "^Content-" +color header color99 default "^Content.*" color header color209 default "^DKIM" color header color132 default "^Authentication" color header color131 default "^User-Agent" @@ -136,7 +143,6 @@ color header color27 default "^(To|Cc|Bcc)" color header color28 default "^(From)" color header color6 default "^(Date)" color header color22 default "^(Subject)" -unignore * # body ----------------------------------------------------------------- @@ -158,6 +164,16 @@ color normal color244 default ## pgp +color body color131 default "^(Message-ID|Message-Id).*" +color body color132 default "^Authentication-.*" +color body color25 default "^Received:.*" +color body color25 default "^Received-.*" +color body color209 default "^DKIM-.*" +color body color69 default "^ARC-.*" +color body color36 default "^List-.*" +color body color63 default "^(MIME|Mime)-.*" +color body color99 default "^Content-.*" +color body color30 default "^X-.*" color body color160 default "(BAD signature)" color body color39 default "(Good signature)" color body color235 default "^gpg: Good signature .*" @@ -228,7 +244,7 @@ color index_tags color27 default color prompt blue cyan color sidebar_divider brightcolor39 default -color sidebar_flagged red default +color sidebar_flagged color167 default color sidebar_highlight color28 default color sidebar_indicator cyan default color sidebar_new color24 default @@ -237,18 +253,18 @@ color sidebar_spoolfile color38 default color sidebar_unread color99 default color progress white blue -color index_flags default red '~F' +color index_flags default color30 '~F' # vi: ft=muttrc ts=4 sw=4 sts=4 et -set status_format='-%r-NeoMutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? \ -Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---' -set index_format='%4C %D %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' +set status_format='-%r-%D %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? \ +Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---%v' +set index_format='%4C %D %Z %{%b %d} %H %-15.15L (%?l?%4l&%4c?) %s | To:%L' set sort=threads set sort_aux=last-date-received color status color39 default -color status brightred white '(New|Del|Flag):[0-9]+' -color status brightred default '\([^)]+/[^)]+\)' +color status color25 white '(New|Del|Flag):[0-9]+' +color status color25 default '\([^)]+/[^)]+\)' color status default default '\(threads/last-date-received\)' -color status red default '\[([^]]+)\]' 1 +color status color30 default '\[([^]]+)\]' 1 color status brightwhite default 'NeoMutt: ([^ ]+)' 1 auto_view text/html @@ -290,7 +306,7 @@ color body red default "^[\-\-\-].*" color body green default "^[\+\+\+].*" color body green default "^[\+].*" color body red default "^[\-].*" -color body blue default "[@@].*" +color body blue default "^[@@].*" # color body brightwhite default "^(\s).*" # color body cyan default "^(Signed-off-by).*" # color body cyan default "^(Docker-DCO-1.1-Signed-off-by).*" diff --git a/.offlineimaprc b/.offlineimaprc index 1dc81a4..e486b66 100644 --- a/.offlineimaprc +++ b/.offlineimaprc @@ -35,6 +35,5 @@ type = IMAP remoteuser = devi@terminaldweller.com #remotepass = remotehost = mail.terminaldweller.com -remoteport = 993 ssl = yes sslcacertfile = /etc/ssl/certs/ca-certificates.crt diff --git a/.vimrc b/.vimrc index c27c18c..2b24b97 100644 --- a/.vimrc +++ b/.vimrc @@ -1268,8 +1268,14 @@ let g:ycm_language_server = [ let g:qs_highlight_on_keys = ["f", "F", "t", "T"] +" git-messenger let g:git_messenger_always_into_popup=v:true nmap gg :call setbufvar(winbufnr(popup_atcursor(split(system("git log -n 1 -L " . line(".") . ",+1:" . expand("%:p")), "\n"), { "padding": [1,1,1,1], "pos": "botleft", "wrap": 0 })), "&filetype", "git") +function! s:setup_git_messenger_popup() abort + nmap o + nmap O +endfunction +autocmd FileType gitmessengerpopup call setup_git_messenger_popup() "vim-haskell let g:haskell_enable_quantification = 1 diff --git a/.w3m/config b/.w3m/config index 8b64d83..9d3886b 100644 --- a/.w3m/config +++ b/.w3m/config @@ -96,7 +96,7 @@ ftppasswd ftppass_hostnamegen 0 pre_form_file ~/.w3m/pre_form siteconf_file ~/.w3m/siteconf -user_agent +user_agent Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.7113.93 Safari/537.36 no_referer 0 accept_language en;q=1.0 accept_encoding gzip, compress, bzip, bzip2, deflate diff --git a/.zshrc b/.zshrc index 319a3a3..813744d 100644 --- a/.zshrc +++ b/.zshrc @@ -151,6 +151,7 @@ alias vms="ssh 185.126.202.69 -l ubuntu -p 1022" alias xonshrc="vim ~/scripts/.xonshrc" alias fixxonshrc="cp ~/scripts/.xonshrc ~/.xonshrc" alias deviphone="ssh 192.168.1.110 -l u0_a601 -p 8022" +alias rpiz2="ssh 192.168.1.116 -l pi" alias moshvpn="mosh rooot@192.99.102.52 --ssh='ssh -p 1022'" alias moshvps="mosh ubuntu@terminaldweller.com --ssh='ssh -p 1022'" alias proxychainsrc="vim ~/scripts/.proxychains/proxychains.conf" @@ -169,6 +170,7 @@ alias socks5vpn6="autossh -M 0 -N -D 9993 -o ServerAliveInterval=180 -o ServerAl alias cloud_one="ssh 130.185.121.80 -l ubuntu -p 1022" alias zharf_server="zssh 192.168.12.5 -l farzad" alias zharf_server2="zssh 192.168.90.7 -l root" +alias zharf_server3="zssh 192.168.90.8 -l root" alias k9sskin="vim ~/scripts/.k9s/skin.yml" alias k9sconfig="vim ~/scripts/.k9s/config.yml" alias fixk9sskin="cp ~/scripts/.k9s/skin.yml ~/.config/k9s/skin.yml" diff --git a/chroot/make_jail.sh b/chroot/make_jail.sh new file mode 100755 index 0000000..9f5f9f9 --- /dev/null +++ b/chroot/make_jail.sh @@ -0,0 +1,63 @@ +#!/usr/bin/bash + +# make_jail $EXE_PATH $JAIL_PATH $JAIL_USER +LIBS=$(ldd "$1" | grep -v vdso | awk '{print $3}') + +mkdir "$2" +for LIB in $LIBS; do + mkdir -p $2/$(dirname $LIB) && cp $LIB $2/$(dirname $LIB) +done + +# copy over libs for needed for network functionality +mkdir -p $2/lib +cp /lib/libnss* $2/lib/ +cp /lib/libnsl* $2/lib/ +cp /lib/libresolv* $2/lib/ + +mkdir -p $2/etc +cp /etc/hosts $2/etc/ +cp /etc/host.conf $2/etc/ +cp /etc/resolv.conf $2/etc/ +cp /etc/nsswitch.conf $2/etc/ +sudo chattr +i $2/etc/hosts +sudo chattr +i $2/etc/host.conf +sudo chattr +i $2/etc/resolv.conf +sudo chattr +i $2/etc/nsswitch.conf + +mkdir -p $2/dev +sudo mknod -m 644 $2/dev/null c 1 3 +sudo mknod -m 644 $2/dev/random c 1 8 +sudo mknod -m 644 $2/dev/urandom c 1 9 + +mkdir -p $2/usr/share/ +sudo cp -r /usr/share/perl5 $2/usr/share/ + +mkdir -p $2/home/jailor_irssi/.irssi +mkdir -p $2/home/jailor_irssi/.irssi/scripts/autorun +sudo chown $3:$3 $2/home/jailor_irssi + +wget https://scripts.irssi.org/scripts/adv_windowlist.pl +wget https://scripts.irssi.org/scripts/dccstat.pl +wget https://scripts.irssi.org/scripts/desktop_notify.pl +wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/vim-mode/vim_mode.pl +wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/irssi-logger/irssi_logger.pl +wget https://raw.githubusercontent.com/terminaldweller/irssi-scripts/master/hilite-url/hilite_url.pl +wget https://scripts.irssi.org/scripts/line_buffer.pl +wget https://scripts.irssi.org/scripts/messages_bottom.pl +wget https://scripts.irssi.org/scripts/nm2.pl +wget https://scripts.irssi.org/scripts/rotator.pl +wget https://scripts.irssi.org/scripts/savecmdhist.pl +wget https://scripts.irssi.org/scripts/sbposition.pl +wget https://scripts.irssi.org/scripts/sb_search.pl +wget https://scripts.irssi.org/scripts/scriptassist.pl +wget https://scripts.irssi.org/scripts/seen.pl +wget https://scripts.irssi.org/scripts/timezones.pl +wget https://scripts.irssi.org/scripts/trackbar.pl +wget https://scripts.irssi.org/scripts/uberprompt.pl +wget https://scripts.irssi.org/scripts/usercount.pl +mv *.pl $2/home/$3/.irssi/scripts/autorun/ + +cd ~/scripts/irssi +cp ./config ~/.irssi/config +cp ./solarized-powerline.theme ~/.irssi/solarized-powerline.theme +cp ./startup ~/.irssi/startup diff --git a/devi.zsh-theme b/devi.zsh-theme index 26de429..6e554b2 100644 --- a/devi.zsh-theme +++ b/devi.zsh-theme @@ -191,9 +191,10 @@ sneaky() { } bg_job_count() { - local count=$(jobs | wc -l) - if [[ $count > 0 ]];then - echo " $count" + # job_count=$("jobs" | wc -l) + local job_count=$(echo $jobstates | awk 'END{print NF}') + if [[ $job_count > 0 ]];then + echo " $job_count" else ; fi diff --git a/keymap.kbd b/keymap.kbd index b566b5e..ef3c37f 100644 --- a/keymap.kbd +++ b/keymap.kbd @@ -18,7 +18,7 @@ -------------------------------------------------------------------------- |# (defcfg ;; input (device-file "/dev/input/by-id/usb-Razer_Razer_Huntsman_Tournament_Edition_00000000001A-event-kbd") - input (device-file "/dev/input/by-id/usb-Razer_Razer_Huntsman_Tournament_Edition_00000000001A-if01-event-kbd") + input (device-file "/dev/input/by-id/usb-Razer_Razer_Huntsman_Tournament_Edition_00000000001A-event-kbd") output (uinput-sink "KMonad output") cmp-seq lalt diff --git a/kubernetes/bitlbee-purple/bitlbee-deployment.yaml b/kubernetes/bitlbee-purple/bitlbee-deployment.yaml index 5d4b4f4..54446ad 100644 --- a/kubernetes/bitlbee-purple/bitlbee-deployment.yaml +++ b/kubernetes/bitlbee-purple/bitlbee-deployment.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: bitlbee-libpurple - image: ezkrg/bitlbee-libpurple:debian-20210922235056 + image: ezkrg/bitlbee-libpurple:alpine3.12-20220408145536 ports: - containerPort: 6667 # volumeMounts: diff --git a/postit b/postit index 22045bd..43f76cd 100644 --- a/postit +++ b/postit @@ -39,3 +39,4 @@ git worktree add -b hotfix ~/code/hotfix trunk sudo mount -t cifs -o user=pi4,vers=2.0,domain=MSHOME //192.168.1.200/disk1 /home/devi/sambashare account add telegram +XXXXXXXXXXX account add skypeweb thabogre@gmail.com XXXXXXXX +git reset --hard HEAD~2 diff --git a/pygitty.py b/pygitty.py index 2f348e1..bd0ae77 100755 --- a/pygitty.py +++ b/pygitty.py @@ -4,12 +4,14 @@ from github import Github import json import argparse + class Argparser(object): def __init__(self): parser = argparse.ArgumentParser() parser.add_argument("--repo", type=str, help="repo to look for") self.args = parser.parse_args() + def main(): argparser = Argparser() passwd = json.load(open("/home/bloodstalker/scripts/github.json"))["pass"] @@ -17,5 +19,6 @@ def main(): repo = g.get_repo(argparser.args.repo) print(repo.stargazers_count) + if __name__ == "__main__": main() -- cgit v1.2.3