aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.tmux.conf20
-rw-r--r--.tridactylrc1
-rw-r--r--.vimrc15
-rw-r--r--.zshrc3
-rw-r--r--c/main.c5
-rwxr-xr-xdocker/nvidia-docker-toolkit/build_libnvidia_container.sh9
-rw-r--r--docker/nvidia-docker-toolkit/config.toml34
-rwxr-xr-xdocker/nvidia-docker-toolkit/oci-nvidia-hook2
-rw-r--r--docker/nvidia-docker-toolkit/oci-nvidia-hook.json6
-rw-r--r--etc/docker/daemon.json13
-rw-r--r--ipython/ipython_config.py2
-rw-r--r--makefilec2
-rw-r--r--makefilecpp2
13 files changed, 100 insertions, 14 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 3bb850a..b2507db 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -18,6 +18,14 @@ set -g @continuum-save-interval '15'
set -g @fzf-url-history-limit '2000'
set -g @fzf-url-fzf-options '-w 50% -h 50% --multi -0 --no-preview --no-border'
+#unbindings -- these are reserved for vim use
+unbind Up
+unbind Down
+unbind Left
+unbind Right
+unbind-key p
+unbind-key n
+
# set -g automatic-rename on
# set -g renumber-windows on
# set -g- set-titles on
@@ -71,6 +79,12 @@ bind-key M-w command-prompt -p "Move Current Window To? (e.g 3.1; session_name:6
# bind-key -r -T prefix C-M-h select-pane -L \; swap-pane -t !
# bind-key -r -T prefix C-M-l select-pane -R \; swap-pane -t !
+# hide a pane and bring it back again
+bind-key ! break-pane -d -n _hidden_pane
+bind-key @ join-pane -s $.0
+
+bind-key p popup -w 80% -h 80% -E ksh
+
#to support nested tmux sessions for ssh workflows
bind -T root F6 \
set prefix None \;\
@@ -129,12 +143,6 @@ bind P pipe-pane -o "cat >>~/.tmuxrecording/#W.log" \; display "Toggled logging
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
-#unbindings -- these are reserved for vim use
-unbind Up
-unbind Down
-unbind Left
-unbind Right
-
# Enable activity alerts.
setw -g monitor-activity off
set -g visual-activity off
diff --git a/.tridactylrc b/.tridactylrc
index 700adb2..2e83089 100644
--- a/.tridactylrc
+++ b/.tridactylrc
@@ -7,3 +7,4 @@ completionfuzziness 1
" bind tp tabmove -1
" bind tn tabmove +1
seturl duolingo.com superignore true
+seturl localhost:8889 superignore true
diff --git a/.vimrc b/.vimrc
index f087f09..8982893 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1491,6 +1491,21 @@ augroup ALECSS
autocmd FileType css let b:ale_fixers = {'css': ['prettier']}
augroup END
+" we can edit gzip files because of this
+augroup gzip
+ autocmd!
+ autocmd BufReadPre,FileReadPre *.gz set bin
+ autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip
+ autocmd BufReadPost,FileReadPost *.gz set nobin
+ autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r")
+ autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
+ autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
+ autocmd FileAppendPre *.gz !gunzip <afile>
+ autocmd FileAppendPre *.gz !mv <afile>:r <afile>
+ autocmd FileAppendPost *.gz !mv <afile> <afile>:r
+ autocmd FileAppendPost *.gz !gzip <afile>:r
+augroup END
+
"latex
let g:tex_flavor = 'latex'
let g:vimtex_matchparen_enabled = 0
diff --git a/.zshrc b/.zshrc
index b2cddc0..e066ee4 100644
--- a/.zshrc
+++ b/.zshrc
@@ -166,7 +166,7 @@ alias socks5z="ssh -N -D 9998 -o ExitOnForwardFailure=yes -l pi 192.168.1.108"
alias socks5ir="autossh -M 0 -N -D 9997 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 1022 terminaldweller.com"
alias socks5vpn1="autossh -M 0 -N -D 9999 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l rooot 145.239.165.137"
alias socks5vpn2="autossh -M 0 -N -D 9996 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l rooot -p 1022 192.99.102.52"
-alias socks5vpn3="autossh -M 0 -N -D 9995 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l root -p 2022 185.112.147.110"
+alias socks5vpn3="autossh -M 0 -N -D 0.0.0.0:9995 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l root -p 2022 185.112.147.110"
alias socks5vpn4="autossh -M 0 -N -D 9994 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -l ubuntu -p 1022 130.185.121.80"
alias socks5vpn6="autossh -M 0 -N -D 9993 -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -6 -l ubuntu -p 3022 2a07:e01:3:204::1"
alias cloud_one="ssh 130.185.121.80 -l ubuntu -p 1022"
@@ -229,6 +229,7 @@ alias mysql='mysql --safe-updates --prompt="\u@\h [\d]>"'
alias socat="socat -d -d"
alias cmusrc="vim ~/scripts/.config/cmus/rc"
alias fixcmusrc="cp ~/scripts/.config/cmus/rc ~/.config/cmus/rc"
+# alias cointop="ssh -oHostKeyAlgorithms=+ssh-rsa cointop@185.112.147.110 -p 2222 -t cointop --colorscheme devi"
#autosuggest
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#5f5fff,bg=#000000,bold,underline"
diff --git a/c/main.c b/c/main.c
index 8cc320a..cbb2793 100644
--- a/c/main.c
+++ b/c/main.c
@@ -2,11 +2,10 @@
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#define __maybe_unused__ __attribute__((unused))
#pragma weak main
-int main (int argc, char** argv) {
- return 0;
-}
+int main(int argc, char **argv) { return 0; }
diff --git a/docker/nvidia-docker-toolkit/build_libnvidia_container.sh b/docker/nvidia-docker-toolkit/build_libnvidia_container.sh
new file mode 100755
index 0000000..100caaf
--- /dev/null
+++ b/docker/nvidia-docker-toolkit/build_libnvidia_container.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+TOOLKIT_DIR=/home/devi/devi/nvidia-docker/container-toolkit/tools/container/toolkit
+TOOLKIT=${TOOLKIT_DIR}/toolkit
+torsocks make CFLAGS="-I/usr/include/tirpc -fPIC -O2" LDFLAGS=-ltirpc all
+ln -s libnvidia-container.so.1.10.0 libnvidia-container.so.1
+sudo cp libnvidia-container.so.1.10.0 /usr/lib64
+sudo ${TOOLKIT} install /home/devi/nvidia-docker-toolkit
+# nvidia-container-cli
diff --git a/docker/nvidia-docker-toolkit/config.toml b/docker/nvidia-docker-toolkit/config.toml
new file mode 100644
index 0000000..a782015
--- /dev/null
+++ b/docker/nvidia-docker-toolkit/config.toml
@@ -0,0 +1,34 @@
+disable-require = false
+swarm-resource = "DOCKER_RESOURCE_GPU"
+accept-nvidia-visible-devices-envvar-when-unprivileged = true
+accept-nvidia-visible-devices-as-volume-mounts = true
+
+[nvidia-container-cli]
+#root = "/home/devi/nvidia-docker-toolkit"
+#path = "/home/devi/nvidia-docker-toolkit/nvidia-container-cli"
+environment = []
+debug = "/var/log/nvidia-container-toolkit.log"
+#ldcache = "/etc/ld.so.cache"
+load-kmods = true
+no-cgroups = false
+#user = "root:video"
+#ldconfig = "@/sbin/ldconfig.real"
+
+[nvidia-container-runtime]
+#debug = "/var/log/nvidia-container-runtime.log"
+log-level = "info"
+
+# Specify the runtimes to consider. This list is processed in order and the PATH
+# searched for matching executables unless the entry is an absolute path.
+runtimes = [
+ "docker-runc",
+ "runc",
+ "runsc",
+ "nvidia",
+]
+
+mode = "auto"
+
+ [nvidia-container-runtime.modes.csv]
+
+ mount-spec-path = "/etc/nvidia-container-runtime/host-files-for-container.d"
diff --git a/docker/nvidia-docker-toolkit/oci-nvidia-hook b/docker/nvidia-docker-toolkit/oci-nvidia-hook
new file mode 100755
index 0000000..85b4719
--- /dev/null
+++ b/docker/nvidia-docker-toolkit/oci-nvidia-hook
@@ -0,0 +1,2 @@
+#!/bin/sh
+PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/devi/nvidia-docker-toolkit" exec nvidia-container-toolkit "$@"
diff --git a/docker/nvidia-docker-toolkit/oci-nvidia-hook.json b/docker/nvidia-docker-toolkit/oci-nvidia-hook.json
new file mode 100644
index 0000000..fb78494
--- /dev/null
+++ b/docker/nvidia-docker-toolkit/oci-nvidia-hook.json
@@ -0,0 +1,6 @@
+{"version":"1.0.0",
+ "hook":{"path":"nvidia-container-toolkit",
+ "args":["nvidia-container-toolkit","prestart"],
+ "env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/devi/nvidia-docker-toolkit"]},
+ "when":{"always":true,"commands":[".*"]},
+ "stages":["prestart"]}
diff --git a/etc/docker/daemon.json b/etc/docker/daemon.json
index f27937d..7aced8a 100644
--- a/etc/docker/daemon.json
+++ b/etc/docker/daemon.json
@@ -1,4 +1,13 @@
{
- "data-root":"/home/devi/storage/ssd1/docker",
- "storage-driver":"overlay2"
+ "data-root": "/home/devi/storage/ssd1/docker",
+ "runtimes": {
+ "nvidia": {
+ "args": [],
+ "path": "nvidia-container-runtime"
+ },
+ "runsc": {
+ "path": "/home/devi/gvisor/runsc"
+ }
+ },
+ "storage-driver": "overlay2"
}
diff --git a/ipython/ipython_config.py b/ipython/ipython_config.py
new file mode 100644
index 0000000..06a264c
--- /dev/null
+++ b/ipython/ipython_config.py
@@ -0,0 +1,2 @@
+c = get_config()
+c.TerminalInteractiveShell.editing_mode = "vi"
diff --git a/makefilec b/makefilec
index 6953882..1767e06 100644
--- a/makefilec
+++ b/makefilec
@@ -142,7 +142,7 @@ TAGS:tags
#https://github.com/rizsotto/Bear
BEAR: clean
- bear make
+ bear -- make
tags:$(SRCS)
$(shell $(CC) -c -I $(CTAGS_I_PATH) -M $(SRCS)|\
diff --git a/makefilecpp b/makefilecpp
index 82f045c..753ba6c 100644
--- a/makefilecpp
+++ b/makefilecpp
@@ -147,7 +147,7 @@ TAGS:tags
#https://github.com/rizsotto/Bear
BEAR: clean
- bear make
+ bear -- make
tags:$(SRCS)
$(shell $(CXX) -c -I $(CTAGS_I_PATH) -M $(SRCS)|\