summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc15
-rw-r--r--.tmux.conf6
-rwxr-xr-xbin/update_kernel_host5
-rwxr-xr-xbin/wol7
4 files changed, 14 insertions, 19 deletions
diff --git a/.bashrc b/.bashrc
index 56ba669..6bbaaa3 100644
--- a/.bashrc
+++ b/.bashrc
@@ -5,11 +5,12 @@
export PAGER=less
export EDITOR=vim
-export HISTIGNORE=ls:ps:history
+export HISTIGNORE=ls:ps:history:poweroff
export HISTCONTROL=ignoreboth:erasedups # no start space and duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
+shopt -s globstar
# Save and reload the history after each command finishes
#export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
@@ -40,6 +41,7 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date
export TERMINAL=xt
+alias sudo=doas
alias cl='cf xft:Mono:size=12'
#alias cp='cp --reflink'
alias ls='ls --color=auto -v'
@@ -47,18 +49,13 @@ alias ll='ls -AlFhv'
alias vi='vim'
alias view='vim -R'
alias more=less
-#alias op='xdg-open'
-#alias git='hub'
-#alias go='go1.14.1'
-#alias go11='go1.11.13'
-#alias go12='go1.12.10'
-#alias go13='go1.13.8'
-#alias go14='go1.14.2'
+alias op='xdg-open'
alias gob='go build'
alias goh='p go help'
alias god='p go doc'
alias gtr='go test -v -run'
alias gtb='go test -v -cpuprofile cpu.out -memprofile mem.out -benchmem -bench'
+alias kd='sudo cat /sys/kernel/debug/tracing/trace_pipe'
#alias vi='vim'
alias rvi='sudo vim'
alias rxt='sudo xt'
@@ -72,10 +69,12 @@ alias wpa='sudo wpa_gui -i wlan0'
alias ifre='echo "ip link set wlo1 down; ip link set wlo1 up"|sudo sh'
# Some admin command
+alias apk='sudo apk'
alias dmesg='sudo dmesg'
alias mount='sudo mount'
alias umount='sudo umount'
alias cryptsetup='sudo cryptsetup'
+alias poweroff='sudo poweroff'
alias by='go build ./cmd/yaegi'
alias cy='cd ~/go/src/github.com/traefik/yaegi'
diff --git a/.tmux.conf b/.tmux.conf
index 8d624a0..42cd492 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -1,3 +1,3 @@
-set-option -g prefix ²
-unbind-key C-b
-bind-key ² send-prefix
+new-session
+setw -g mouse on
+set -g history-limit 30000
diff --git a/bin/update_kernel_host b/bin/update_kernel_host
index 4728355..6180921 100755
--- a/bin/update_kernel_host
+++ b/bin/update_kernel_host
@@ -6,8 +6,3 @@ sudo cp /boot/initramfs-virt /tmp
sudo chmod a+r /tmp/initramfs-virt
gunzip < /boot/vmlinuz-virt > /tmp/vmlinux
scp /tmp/initramfs-virt /tmp/vmlinux marc@m1:.vm/vm1/
-
-sudo cp /boot/initramfs-edge-virt /tmp
-sudo chmod a+r /tmp/initramfs-edge-virt
-gunzip < /boot/vmlinuz-edge-virt > /tmp/vmlinux-edge-virt
-scp /tmp/initramfs-edge-virt /tmp/vmlinux-edge-virt marc@m1:.vm/vm1/
diff --git a/bin/wol b/bin/wol
index 39bce0d..06dc600 100755
--- a/bin/wol
+++ b/bin/wol
@@ -1,6 +1,7 @@
-#!/bin/sh -x
+#!/bin/sh
ip_plex=192.168.1.90 mac_plex=b0:83:fe:61:a7:aa
eval "mac=\$mac_$1 ip=\$ip_$1"
-wakeonlan "$mac"
-ping -o "$ip"
+# wakeonlan "$mac" || exit
+sudo ether-wake -b "$mac" || exit
+while ! nc -zw 2 "$ip" 22; do printf .; sleep 2; done
ssh "root@$ip"