mirror of
https://github.com/HerrCraziDev/dotfiles.git
synced 2025-12-13 09:36:16 +01:00
fucking mess
This commit is contained in:
29
.aliases
Normal file
29
.aliases
Normal file
@@ -0,0 +1,29 @@
|
||||
alias projets='cd ~/projets'
|
||||
alias git-poulet='git pull'
|
||||
alias df='df -h | grep -v snap'
|
||||
|
||||
alias update-zsh-config='source /home/herrcrazi/.zshrc'
|
||||
alias a='apt'
|
||||
alias sa='sudo apt'
|
||||
alias sai='sudo apt install'
|
||||
alias sau='sudo apt update'
|
||||
alias safu='sudo apt full-upgrade'
|
||||
alias safy='sudo apt full-upgrade -y'
|
||||
alias fullup='safy'
|
||||
alias fug='safy'
|
||||
alias gtop='watch -tn 0.5 nvidia-smi'
|
||||
alias ntopw='speedometer -rx wlp0s20f3 -tx wlp0s20f3'
|
||||
alias ntopeth='speedometer -rx enp7s0 -tx enp7s0'
|
||||
alias svc='sudo systemctl'
|
||||
alias svcup='svc start'
|
||||
alias scvdown='svc stop'
|
||||
alias scvrs='svc restart'
|
||||
alias py='python3.8'
|
||||
alias pkgi='sudo dpkg -i'
|
||||
alias scr='screen -S dev'
|
||||
alias tmr='tmux attach'
|
||||
|
||||
alias ll='ls -lah --color=auto'
|
||||
alias reload='source ~/.termrc'
|
||||
|
||||
#alias mc-install-plugin='echo "Installing $2"; echo "Done !"'
|
||||
46
.bash_colordefs.sh
Executable file
46
.bash_colordefs.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
#color defs
|
||||
cl_reset="\e[0m"
|
||||
cl_bold="\e[1m"
|
||||
cl_unbold="\e[21m"
|
||||
cl_dim="\e[2m"
|
||||
cl_undim="\e[22m"
|
||||
cl_underline="\e[4m"
|
||||
cl_no_underline="\e[24m"
|
||||
cl_blink="\e[5m"
|
||||
cl_unblink="\e25m"
|
||||
cl_invert="\e[7m"
|
||||
cl_uninvert="\e[27m"
|
||||
cl_hidden="\e[8m"
|
||||
cl_shown="\e[28m"
|
||||
cl_text_reset="\e[39m"
|
||||
cl_text_black="\e[30m"
|
||||
cl_text_white="\e[97m"
|
||||
cl_text_red="\e[31m"
|
||||
cl_text_green="\e[32m"
|
||||
cl_text_yellow="\e[33m"
|
||||
cl_text_blue="\e[34m"
|
||||
cl_text_magenta="\e[35m"
|
||||
cl_text_cyan="\e[36m"
|
||||
cl_text_grey="\e[90m"
|
||||
cl_text_lightgrey="\e[37m"
|
||||
cl_text_lightred="\e[91m"
|
||||
cl_text_lightgreen="\e[92m"
|
||||
cl_text_lightyellow="\e[93m"
|
||||
cl_text_lightblue="\e[94m"
|
||||
cl_back_reset="\e[49m"
|
||||
cl_back_black="\e[40m"
|
||||
cl_back_white="\e[107m"
|
||||
cl_back_red="\e[41m"
|
||||
cl_back_green="\e[42m"
|
||||
cl_back_yellow="\e[43m"
|
||||
cl_back_blue="\e[44m"
|
||||
cl_back_magenta="\e[45m"
|
||||
cl_back_cyan="\e[46m"
|
||||
cl_back_grey="\e[100m"
|
||||
cl_back_lightgrey="\e[47m"
|
||||
cl_back_lightred="\e[101m"
|
||||
cl_back_lightgreen="\e[102m"
|
||||
cl_back_lightyellow="\e[103m"
|
||||
cl_back_lightblue="\e[104m"
|
||||
118
.bashrc
Normal file
118
.bashrc
Normal file
@@ -0,0 +1,118 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
source "/etc/profile.d/rvm.sh"
|
||||
72
.compton.conf
Normal file
72
.compton.conf
Normal file
@@ -0,0 +1,72 @@
|
||||
backend = "glx";
|
||||
paint-on-overlay = true;
|
||||
glx-no-stencil = true;
|
||||
glx-no-rebind-pixmap = true;
|
||||
vsync = "opengl-swc";
|
||||
|
||||
# These are important. The first one enables the opengl backend. The last one is the vsync method. Depending on the driver you might need to use a different method.
|
||||
# The other options are smaller performance tweaks that work well in most cases.
|
||||
# You can find the rest of the options here: https://github.com/chjj/compton/wiki/perf-guide, and here: https://github.com/chjj/compton/wiki/vsync-guide
|
||||
|
||||
|
||||
# Shadow
|
||||
shadow = true; # Enabled client-side shadows on windows.
|
||||
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
|
||||
no-dnd-shadow = true; # Don't draw shadows on DND windows.
|
||||
clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental).
|
||||
shadow-radius = 7; # The blur radius for shadows. (default 12)
|
||||
shadow-offset-x = -7; # The left offset for shadows. (default -15)
|
||||
shadow-offset-y = -7; # The top offset for shadows. (default -15)
|
||||
shadow-exclude = [
|
||||
"! name~=''",
|
||||
# "n:e:Notification",
|
||||
"n:e:Plank",
|
||||
"n:e:Docky",
|
||||
"g:e:Synapse",
|
||||
"g:e:Kupfer",
|
||||
"g:e:Conky",
|
||||
"n:w:*Firefox*",
|
||||
"n:w:*Chrome*",
|
||||
"n:w:*Chromium*",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g ?= 'Cairo-dock'",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
"class_g ?= 'Xfce4-power-manager'",
|
||||
"class_g ?= 'Gnome-terminal'",
|
||||
"class_g ?= 'discord'",
|
||||
"class_g ?= 'i3-frame'"
|
||||
];
|
||||
|
||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
|
||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
|
||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
|
||||
# Fading
|
||||
fading = true; # Fade windows during opacity changes.
|
||||
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
|
||||
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
|
||||
#no-fading-openclose = true; # Fade windows in/out when opening/closing
|
||||
|
||||
# Blur
|
||||
blur-background = true;
|
||||
#blur-background-fixed = 40;
|
||||
blur-kern = "7x7box";
|
||||
blur-background-exclude = [
|
||||
"class_g ?= 'discord'"
|
||||
# "class_g ?= 'i3-frame'"
|
||||
];
|
||||
|
||||
#Opacity
|
||||
opacity-rule = [
|
||||
"90:class_g ?= 'discord'",
|
||||
"70:class_g ?= 'i3-frame'",
|
||||
"60:class_g ?= 'i3bar'"
|
||||
];
|
||||
detect-client-opacity = true; # This prevents opacity being ignored for some apps. For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||
|
||||
# Window type settings
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = false; };
|
||||
};
|
||||
2
.fehbg
Executable file
2
.fehbg
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
'feh' '--bg-scale' 'Wallpapers/5681068-space-wallpaper.jpg'
|
||||
133
.screenrc
Executable file
133
.screenrc
Executable file
@@ -0,0 +1,133 @@
|
||||
# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $
|
||||
#
|
||||
# /etc/screenrc
|
||||
#
|
||||
# This is the system wide screenrc.
|
||||
#
|
||||
# You can use this file to change the default behavior of screen system wide
|
||||
# or copy it to ~/.screenrc and use it as a starting point for your own
|
||||
# settings.
|
||||
#
|
||||
# Commands in this file are used to set options, bind screen functions to
|
||||
# keys, redefine terminal capabilities, and to automatically establish one or
|
||||
# more windows at the beginning of your screen session.
|
||||
#
|
||||
# This is not a comprehensive list of options, look at the screen manual for
|
||||
# details on everything that you can put in this file.
|
||||
#
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# SCREEN SETTINGS
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#startup_message off
|
||||
#nethack on
|
||||
|
||||
#defflow on # will force screen to process ^S/^Q
|
||||
deflogin on
|
||||
#autodetach off
|
||||
|
||||
# turn visual bell on
|
||||
vbell on
|
||||
vbell_msg " Wuff ---- Wuff!! "
|
||||
|
||||
# define a bigger scrollback, default is 100 lines
|
||||
defscrollback 1024
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# SCREEN KEYBINDINGS
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Remove some stupid / dangerous key bindings
|
||||
bind ^k
|
||||
#bind L
|
||||
bind ^\
|
||||
# Make them better
|
||||
bind \\ quit
|
||||
bind K kill
|
||||
bind I login on
|
||||
bind O login off
|
||||
bind } history
|
||||
|
||||
# An example of a "screen scraper" which will launch urlview on the current
|
||||
# screen window
|
||||
#
|
||||
#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# TERMINAL SETTINGS
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The vt100 description does not mention "dl". *sigh*
|
||||
termcapinfo vt100 dl=5\E[M
|
||||
|
||||
# turn sending of screen messages to hardstatus off
|
||||
#hardstatus on
|
||||
# Set the hardstatus prop on gui terms to set the titlebar/icon title
|
||||
termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
|
||||
# use this for the hard status string
|
||||
#hardstatus string "%h%? users: %u%?"
|
||||
#hardstatus always lastline
|
||||
# An alternative hardstatus to display a bar at the bottom listing the
|
||||
# windownames and highlighting the current windowname in blue. (This is only
|
||||
# enabled if there is no hardstatus setting for your terminal)
|
||||
#
|
||||
#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
|
||||
|
||||
# set these terminals up to be 'optimal' instead of vt100
|
||||
termcapinfo xterm*|linux*|rxvt*|Eterm* OP
|
||||
|
||||
# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
|
||||
# (This fixes the "Aborted because of window size change" konsole symptoms found
|
||||
# in bug #134198)
|
||||
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
|
||||
|
||||
# To get screen to add lines to xterm's scrollback buffer, uncomment the
|
||||
# following termcapinfo line which tells xterm to use the normal screen buffer
|
||||
# (which has scrollback), not the alternate screen buffer.
|
||||
#
|
||||
#termcapinfo xterm|xterms|xs|rxvt ti@:te@
|
||||
|
||||
# Enable non-blocking mode to better cope with flaky ssh connections.
|
||||
defnonblock 5
|
||||
|
||||
backtick 1 1 1 $HOME/get_temp.sh
|
||||
hardstatus on
|
||||
hardstatus alwayslastline
|
||||
hardstatus string "[$LOGNAME] %H (herrcrazi.tk) %=%{.1099} %{+b}%-w<%n %t>%{-}%+w %=L:%l T:%1`°C %d/%m/%y %c:%s "
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# STARTUP SCREENS
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Example of automatically running some programs in windows on screen startup.
|
||||
#
|
||||
# The following will open top in the first window, an ssh session to monkey
|
||||
# in the next window, and then open mutt and tail in windows 8 and 9
|
||||
# respectively.
|
||||
#
|
||||
# screen top
|
||||
# screen -t monkey ssh monkey
|
||||
# screen -t mail 8 mutt
|
||||
# screen -t daemon 9 tail -f /var/log/daemon.log
|
||||
|
||||
screen -t Main 0 $SHELL
|
||||
screen -t Network 1 $SHELL
|
||||
screen -t "Process Manager" 2 htop
|
||||
screen -t Prog 3 $SHELL
|
||||
screen -t Logs 4 $SHELL
|
||||
|
||||
split -v
|
||||
resize +30
|
||||
focus
|
||||
split
|
||||
focus
|
||||
select 3
|
||||
split
|
||||
select 4
|
||||
focus
|
||||
select 2
|
||||
focus
|
||||
select 0
|
||||
|
||||
|
||||
8
.termrc
Normal file
8
.termrc
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
# Load personal aliases
|
||||
source "$HOME/.aliases"
|
||||
|
||||
# Fix linker errors with gtk3
|
||||
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0
|
||||
|
||||
echo -e '\e[34m [termrc] Config reloaded\e[0m'
|
||||
34
.vuerc
Normal file
34
.vuerc
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"useTaobaoRegistry": false,
|
||||
"packageManager": "yarn",
|
||||
"presets": {
|
||||
"hc-quick-website": {
|
||||
"useConfigFiles": true,
|
||||
"plugins": {
|
||||
"@vue/cli-plugin-babel": {},
|
||||
"@vue/cli-plugin-typescript": {
|
||||
"classComponent": true,
|
||||
"useTsWithBabel": true
|
||||
},
|
||||
"@vue/cli-plugin-router": {
|
||||
"historyMode": true
|
||||
}
|
||||
},
|
||||
"cssPreprocessor": "less"
|
||||
},
|
||||
"quick-website-usethisone": {
|
||||
"useConfigFiles": true,
|
||||
"plugins": {
|
||||
"@vue/cli-plugin-babel": {},
|
||||
"@vue/cli-plugin-typescript": {
|
||||
"classComponent": false,
|
||||
"useTsWithBabel": true
|
||||
},
|
||||
"@vue/cli-plugin-router": {
|
||||
"historyMode": true
|
||||
}
|
||||
},
|
||||
"cssPreprocessor": "less"
|
||||
}
|
||||
}
|
||||
}
|
||||
12
.wavemonrc
Normal file
12
.wavemonrc
Normal file
@@ -0,0 +1,12 @@
|
||||
interface = wlp0s20f3
|
||||
cisco_mac = on
|
||||
sort_order = open/sig
|
||||
sort_ascending = off
|
||||
stat_updates = 100
|
||||
lhist_slot_size = 4
|
||||
meter_smoothness = 0
|
||||
info_updates = 5
|
||||
override_auto_scale = off
|
||||
lo_threshold_action = disabled
|
||||
hi_threshold_action = disabled
|
||||
startup_screen = info screen
|
||||
3
cdiff
Executable file
3
cdiff
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
diff --color=always -ytbB $1 $2 | grep --color=always -e "^" -iEe ".*\|.*" | less -r
|
||||
|
||||
4
i3utils/lock.sh
Executable file
4
i3utils/lock.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
i3lock -i ~/Images/Wallpapers/undefined_not_a_function_small.png -c 424242 -t -p default -e
|
||||
|
||||
70
imagemagick/thumbnails.sh
Executable file
70
imagemagick/thumbnails.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
function checkImagemagick {
|
||||
printf "Checking for Imagemagick convert..."
|
||||
convert -version > /dev/null 2>&1
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "[\e[32mOK\e[0m]\n"
|
||||
return 0
|
||||
else
|
||||
printf "[\e[31mError\e[0m]\nImagemagick not found.\n"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function installpkg {
|
||||
printf "Installing package %s...\n\e[90m" $1
|
||||
|
||||
apt install -y $1
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "\e[0m[\e[32mOK\e[0m] Package %s successfully installed !\n" $1
|
||||
return 0
|
||||
else
|
||||
printf "\e[0m[\e[31mError\e[0m]\nFailed to install %s\n" $1
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Check for Imagemagick install
|
||||
checkImagemagick
|
||||
if [ $? -eq 1 ]; then
|
||||
installpkg "imagemagick"
|
||||
checkImagemagick
|
||||
fi
|
||||
|
||||
|
||||
# Check thumbnails directory
|
||||
if [ ! -e "thumbs" ]; then
|
||||
|
||||
printf "Creating thumbnails directory (thumbs/)..."
|
||||
mkdir "thumbs" > /dev/null 2>&1
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "[\e[32mOK\e[0m]\n"
|
||||
else
|
||||
printf "[\e[31mError\e[0m]\nCan't create 'thumbs/' directory ! Check your permissions\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
printf "Thumbnails directory found [\e[32mOK\e[0m]\n"
|
||||
fi
|
||||
|
||||
|
||||
# Generate/update thumbnails for each JPG found
|
||||
count=$(ls *.* | wc -l)
|
||||
i=0
|
||||
|
||||
for file in *.*; do
|
||||
if [ ! -e $file ]; then continue; fi # Ignore inexistant files
|
||||
|
||||
let i=i+1
|
||||
printf "Processing file %d of %d [%s]\r" $i $count $file
|
||||
convert $file -resize x256 -strip thumbs/$file
|
||||
done
|
||||
|
||||
printf "\e[32m✔\e[0m Processed %d thumbnails successfully\n" $count
|
||||
10
mc-install-plugin
Executable file
10
mc-install-plugin
Executable file
@@ -0,0 +1,10 @@
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
if test -f "$1"; then
|
||||
echo "Installing plugin $1..."
|
||||
scp $1 bevin@chenco-server:~/Apps/paper/plugins/
|
||||
echo "Done!"
|
||||
else
|
||||
echo "Error: '$1' is not a file."
|
||||
fi
|
||||
1465
metrics/collectd.conf
Normal file
1465
metrics/collectd.conf
Normal file
File diff suppressed because it is too large
Load Diff
2431
metrics/generic-collectd_grafana.json
Normal file
2431
metrics/generic-collectd_grafana.json
Normal file
File diff suppressed because it is too large
Load Diff
3441
metrics/generic-glances_grafana.json
Normal file
3441
metrics/generic-glances_grafana.json
Normal file
File diff suppressed because it is too large
Load Diff
3186
metrics/glances-grafana.json
Normal file
3186
metrics/glances-grafana.json
Normal file
File diff suppressed because it is too large
Load Diff
529
metrics/glances.conf
Normal file
529
metrics/glances.conf
Normal file
@@ -0,0 +1,529 @@
|
||||
##############################################################################
|
||||
# Globals Glances parameters
|
||||
##############################################################################
|
||||
|
||||
[global]
|
||||
# Does Glances should check if a newer version is available on PyPI ?
|
||||
check_update=true
|
||||
# History size (maximum number of values)
|
||||
# Default is 28800: 1 day with 1 point every 3 seconds (default refresh time)
|
||||
history_size=28800
|
||||
|
||||
##############################################################################
|
||||
# User interface
|
||||
##############################################################################
|
||||
|
||||
[outputs]
|
||||
# Theme name for the Curses interface: black or white
|
||||
curse_theme=black
|
||||
# Limit the number of processes to display in the WebUI
|
||||
max_processes_display=30
|
||||
|
||||
##############################################################################
|
||||
# plugins
|
||||
##############################################################################
|
||||
|
||||
[quicklook]
|
||||
# Set to true to disable a plugin
|
||||
# Note: you can also disable it from the command line (see --disable-plugin)
|
||||
disable=false
|
||||
# Define CPU, MEM and SWAP thresholds in %
|
||||
cpu_careful=50
|
||||
cpu_warning=70
|
||||
cpu_critical=90
|
||||
mem_careful=50
|
||||
mem_warning=70
|
||||
mem_critical=90
|
||||
swap_careful=50
|
||||
swap_warning=70
|
||||
swap_critical=90
|
||||
|
||||
[cpu]
|
||||
disable=False
|
||||
# Default values if not defined: 50/70/90 (except for iowait)
|
||||
user_careful=50
|
||||
user_warning=70
|
||||
user_critical=90
|
||||
#user_log=False
|
||||
#user_critical_action=echo {{user}} {{value}} {{max}} > /tmp/cpu.alert
|
||||
system_careful=50
|
||||
system_warning=70
|
||||
system_critical=90
|
||||
steal_careful=50
|
||||
steal_warning=70
|
||||
steal_critical=90
|
||||
#steal_log=True
|
||||
# I/O wait percentage should be lower than 1/# (Logical CPU cores)
|
||||
# Leave commented to just use the default config (1/#-20% / 1/#-10% / 1/#)
|
||||
#iowait_careful=30
|
||||
#iowait_warning=40
|
||||
#iowait_critical=50
|
||||
# Context switch limit (core / second)
|
||||
# Leave commented to just use the default config (critical is 50000*# (Logical CPU cores)
|
||||
#ctx_switches_careful=10000
|
||||
#ctx_switches_warning=12000
|
||||
#ctx_switches_critical=14000
|
||||
|
||||
[percpu]
|
||||
# Define CPU thresholds in %
|
||||
# Default values if not defined: 50/70/90
|
||||
user_careful=50
|
||||
user_warning=70
|
||||
user_critical=90
|
||||
iowait_careful=50
|
||||
iowait_warning=70
|
||||
iowait_critical=90
|
||||
system_careful=50
|
||||
system_warning=70
|
||||
system_critical=90
|
||||
|
||||
[gpu]
|
||||
# Default processor values if not defined: 50/70/90
|
||||
proc_careful=50
|
||||
proc_warning=70
|
||||
proc_critical=90
|
||||
# Default memory values if not defined: 50/70/90
|
||||
mem_careful=50
|
||||
mem_warning=70
|
||||
mem_critical=90
|
||||
|
||||
[mem]
|
||||
# Define RAM thresholds in %
|
||||
# Default values if not defined: 50/70/90
|
||||
careful=50
|
||||
#careful_action_repeat=echo {{percent}} >> /tmp/memory.alert
|
||||
warning=70
|
||||
critical=90
|
||||
|
||||
[memswap]
|
||||
# Define SWAP thresholds in %
|
||||
# Default values if not defined: 50/70/90
|
||||
careful=50
|
||||
warning=70
|
||||
critical=90
|
||||
|
||||
[load]
|
||||
# Define LOAD thresholds
|
||||
# Value * number of cores
|
||||
# Default values if not defined: 0.7/1.0/5.0 per number of cores
|
||||
# Source: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
|
||||
# http://www.linuxjournal.com/article/9001
|
||||
careful=0.7
|
||||
warning=1.0
|
||||
critical=5.0
|
||||
#log=False
|
||||
|
||||
[network]
|
||||
# Default bitrate thresholds in % of the network interface speed
|
||||
# Default values if not defined: 70/80/90
|
||||
rx_careful=70
|
||||
rx_warning=80
|
||||
rx_critical=90
|
||||
tx_careful=70
|
||||
tx_warning=80
|
||||
tx_critical=90
|
||||
# Define the list of hidden network interfaces (comma-separated regexp)
|
||||
#hide=docker.*,lo
|
||||
# WLAN 0 alias
|
||||
#wlan0_alias=Wireless IF
|
||||
# It is possible to overwrite the bitrate thresholds per interface
|
||||
# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate
|
||||
#wlan0_rx_careful=4000000
|
||||
#wlan0_rx_warning=5000000
|
||||
#wlan0_rx_critical=6000000
|
||||
#wlan0_rx_log=True
|
||||
#wlan0_tx_careful=700000
|
||||
#wlan0_tx_warning=900000
|
||||
#wlan0_tx_critical=1000000
|
||||
#wlan0_tx_log=True
|
||||
|
||||
[wifi]
|
||||
# Define the list of hidden wireless network interfaces (comma-separated regexp)
|
||||
hide=lo,docker.*
|
||||
# Define SIGNAL thresholds in db (lower is better...)
|
||||
# Based on: http://serverfault.com/questions/501025/industry-standard-for-minimum-wifi-signal-strength
|
||||
careful=-65
|
||||
warning=-75
|
||||
critical=-85
|
||||
|
||||
[diskio]
|
||||
# Define the list of hidden disks (comma-separated regexp)
|
||||
#hide=sda2,sda5,loop.*
|
||||
hide=loop.*
|
||||
# Alias for sda1
|
||||
#sda1_alias=IntDisk
|
||||
|
||||
[fs]
|
||||
# Define the list of hidden file system (comma-separated regexp)
|
||||
hide=/boot.*,/snap.*
|
||||
# Define filesystem space thresholds in %
|
||||
# Default values if not defined: 50/70/90
|
||||
# It is also possible to define per mount point value
|
||||
# Example: /_careful=40
|
||||
careful=50
|
||||
warning=70
|
||||
critical=90
|
||||
# Allow additional file system types (comma-separated FS type)
|
||||
#allow=zfs
|
||||
|
||||
[folders]
|
||||
# Define a folder list to monitor
|
||||
# The list is composed of items (list_#nb <= 10)
|
||||
# An item is defined by:
|
||||
# * path: absolute path
|
||||
# * careful: optional careful threshold (in MB)
|
||||
# * warning: optional warning threshold (in MB)
|
||||
# * critical: optional critical threshold (in MB)
|
||||
#folder_1_path=/tmp
|
||||
#folder_1_careful=2500
|
||||
#folder_1_warning=3000
|
||||
#folder_1_critical=3500
|
||||
#folder_2_path=/home/nicolargo/Videos
|
||||
#folder_2_warning=17000
|
||||
#folder_2_critical=20000
|
||||
#folder_3_path=/nonexisting
|
||||
#folder_4_path=/root
|
||||
|
||||
[sensors]
|
||||
# Sensors core thresholds (in Celsius...)
|
||||
# Default values if not defined: 60/70/80
|
||||
temperature_core_careful=60
|
||||
temperature_core_warning=70
|
||||
temperature_core_critical=80
|
||||
# Temperatures threshold in °C for hddtemp
|
||||
# Default values if not defined: 45/52/60
|
||||
temperature_hdd_careful=45
|
||||
temperature_hdd_warning=52
|
||||
temperature_hdd_critical=60
|
||||
# Battery threshold in %
|
||||
battery_careful=80
|
||||
battery_warning=90
|
||||
battery_critical=95
|
||||
# Sensors alias
|
||||
#temp1_alias=Motherboard 0
|
||||
#temp2_alias=Motherboard 1
|
||||
#core 0_alias=CPU Core 0
|
||||
#core 1_alias=CPU Core 1
|
||||
|
||||
[processlist]
|
||||
# Define CPU/MEM (per process) thresholds in %
|
||||
# Default values if not defined: 50/70/90
|
||||
cpu_careful=50
|
||||
cpu_warning=70
|
||||
cpu_critical=90
|
||||
mem_careful=50
|
||||
mem_warning=70
|
||||
mem_critical=90
|
||||
#
|
||||
# Nice priorities range from -20 to 19.
|
||||
# Configure nice levels using a comma separated list.
|
||||
#
|
||||
# Nice: Example 1, non-zero is warning (default behavior)
|
||||
nice_warning=-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
|
||||
#
|
||||
# Nice: Example 2, low priority processes escalate from careful to critical
|
||||
#nice_careful=1,2,3,4,5,6,7,8,9
|
||||
#nice_warning=10,11,12,13,14
|
||||
#nice_critical=15,16,17,18,19
|
||||
|
||||
[ports]
|
||||
# Ports scanner plugin configuration
|
||||
# Interval in second between two scans
|
||||
refresh=30
|
||||
# Set the default timeout (in second) for a scan (can be overwritten in the scan list)
|
||||
timeout=3
|
||||
# If port_default_gateway is True, add the default gateway on top of the scan list
|
||||
port_default_gateway=True
|
||||
#
|
||||
# Define the scan list (1 < x < 255)
|
||||
# port_x_host (name or IP) is mandatory
|
||||
# port_x_port (TCP port number) is optional (if not set, use ICMP)
|
||||
# port_x_description is optional (if not set, define to host:port)
|
||||
# port_x_timeout is optional and overwrite the default timeout value
|
||||
# port_x_rtt_warning is optional and defines the warning threshold in ms
|
||||
#
|
||||
#port_1_host=192.168.0.1
|
||||
#port_1_port=80
|
||||
#port_1_description=Home Box
|
||||
#port_1_timeout=1
|
||||
#port_2_host=www.free.fr
|
||||
#port_2_description=My ISP
|
||||
#port_3_host=www.google.com
|
||||
#port_3_description=Internet ICMP
|
||||
#port_3_rtt_warning=1000
|
||||
#port_4_description=Internet Web
|
||||
#port_4_host=www.google.com
|
||||
#port_4_port=80
|
||||
#port_4_rtt_warning=1000
|
||||
#
|
||||
# Define Web (URL) monitoring list (1 < x < 255)
|
||||
# web_x_url is the URL to monitor (example: http://my.site.com/folder)
|
||||
# web_x_description is optional (if not set, define to URL)
|
||||
# web_x_timeout is optional and overwrite the default timeout value
|
||||
# web_x_rtt_warning is optional and defines the warning respond time in ms (approximatively)
|
||||
#
|
||||
#web_1_url=https://blog.nicolargo.com
|
||||
#web_1_description=My Blog
|
||||
#web_1_rtt_warning=3000
|
||||
#web_2_url=https://github.com
|
||||
#web_3_url=http://www.google.fr
|
||||
#web_3_description=Google Fr
|
||||
#web_4_url=https://blog.nicolargo.com/nonexist
|
||||
#web_4_description=Intranet
|
||||
|
||||
[docker]
|
||||
# Thresholds for CPU and MEM (in %)
|
||||
#cpu_careful=50
|
||||
#cpu_warning=70
|
||||
#cpu_critical=90
|
||||
#mem_careful=20
|
||||
#mem_warning=50
|
||||
#mem_critical=70
|
||||
#
|
||||
# Per container thresholds
|
||||
#containername_cpu_careful=10
|
||||
#containername_cpu_warning=20
|
||||
#containername_cpu_critical=30
|
||||
#
|
||||
# By default, Glances only display running containers
|
||||
# Set the following key to True to display all containers
|
||||
all=False
|
||||
|
||||
##############################################################################
|
||||
# Client/server
|
||||
##############################################################################
|
||||
|
||||
[serverlist]
|
||||
# Define the static servers list
|
||||
#server_1_name=localhost
|
||||
#server_1_alias=My local PC
|
||||
#server_1_port=61209
|
||||
#server_2_name=localhost
|
||||
#server_2_port=61235
|
||||
#server_3_name=192.168.0.17
|
||||
#server_3_alias=Another PC on my network
|
||||
#server_3_port=61209
|
||||
#server_4_name=pasbon
|
||||
#server_4_port=61237
|
||||
|
||||
[passwords]
|
||||
# Define the passwords list
|
||||
# Syntax: host=password
|
||||
# Where: host is the hostname
|
||||
# password is the clear password
|
||||
# Additionally (and optionally) a default password could be defined
|
||||
#localhost=abc
|
||||
default=superpivert
|
||||
|
||||
##############################################################################
|
||||
# Exports
|
||||
##############################################################################
|
||||
|
||||
[graph]
|
||||
# Configuration for the --export graph option
|
||||
# Set the path where the graph (.svg files) will be created
|
||||
# Can be overwrite by the --graph-path command line option
|
||||
path=/tmp
|
||||
# It is possible to generate the graphs automatically by setting the
|
||||
# generate_every to a non zero value corresponding to the seconds between
|
||||
# two generation. Set it to 0 to disable graph auto generation.
|
||||
generate_every=60
|
||||
# See followings configuration keys definitions in the Pygal lib documentation
|
||||
# http://pygal.org/en/stable/documentation/index.html
|
||||
width=800
|
||||
height=600
|
||||
style=DarkStyle
|
||||
|
||||
[influxdb]
|
||||
# Configuration for the --export influxdb option
|
||||
# https://influxdb.com/
|
||||
host=localhost
|
||||
port=8086
|
||||
user=root
|
||||
password=root
|
||||
db=glances
|
||||
# Prefix will be added for all measurement name
|
||||
# Ex: prefix=foo
|
||||
# => foo.cpu
|
||||
# => foo.mem
|
||||
# You can also use dynamic values
|
||||
prefix=herrcrazi-X540YA
|
||||
#prefix=localhost
|
||||
# Tags will be added for all measurements
|
||||
#tags=foo:bar,spam:eggs
|
||||
# You can also use dynamic values
|
||||
#tags=system:`uname -s`
|
||||
|
||||
[cassandra]
|
||||
# Configuration for the --export cassandra option
|
||||
# Also works for the ScyllaDB
|
||||
# https://influxdb.com/ or http://www.scylladb.com/
|
||||
host=localhost
|
||||
port=9042
|
||||
protocol_version=3
|
||||
keyspace=glances
|
||||
replication_factor=2
|
||||
# If not define, table name is set to host key
|
||||
table=localhost
|
||||
|
||||
[opentsdb]
|
||||
# Configuration for the --export opentsdb option
|
||||
# http://opentsdb.net/
|
||||
host=localhost
|
||||
port=4242
|
||||
#prefix=glances
|
||||
#tags=foo:bar,spam:eggs
|
||||
|
||||
[statsd]
|
||||
# Configuration for the --export statsd option
|
||||
# https://github.com/etsy/statsd
|
||||
host=localhost
|
||||
port=8125
|
||||
#prefix=glances
|
||||
|
||||
[elasticsearch]
|
||||
# Configuration for the --export elasticsearch option
|
||||
# Data are available via the ES RESTful API. ex: URL/<index>/cpu/system
|
||||
# https://www.elastic.co
|
||||
host=localhost
|
||||
port=9200
|
||||
index=glances
|
||||
|
||||
[riemann]
|
||||
# Configuration for the --export riemann option
|
||||
# http://riemann.io
|
||||
host=localhost
|
||||
port=5555
|
||||
|
||||
[rabbitmq]
|
||||
# Configuration for the --export rabbitmq option
|
||||
host=localhost
|
||||
port=5672
|
||||
user=guest
|
||||
password=guest
|
||||
queue=glances_queue
|
||||
|
||||
[mqtt]
|
||||
# Configuration for the --export mqtt option
|
||||
host=localhost
|
||||
port=8883
|
||||
user=guest
|
||||
password=guest
|
||||
topic=glances
|
||||
|
||||
[couchdb]
|
||||
# Configuration for the --export couchdb option
|
||||
# https://www.couchdb.org
|
||||
host=localhost
|
||||
port=5984
|
||||
db=glances
|
||||
# user and password are optional (comment if not configured on the server side)
|
||||
#user=root
|
||||
#password=root
|
||||
|
||||
[kafka]
|
||||
# Configuration for the --export kafka option
|
||||
# http://kafka.apache.org/
|
||||
host=localhost
|
||||
port=9092
|
||||
topic=glances
|
||||
#compression=gzip
|
||||
|
||||
[zeromq]
|
||||
# Configuration for the --export zeromq option
|
||||
# http://www.zeromq.org
|
||||
# Use * to bind on all interfaces
|
||||
host=*
|
||||
port=5678
|
||||
# Glances envelopes the stats in a publish message with two frames:
|
||||
# - First frame containing the following prefix (STRING)
|
||||
# - Second frame with the Glances plugin name (STRING)
|
||||
# - Third frame with the Glances plugin stats (JSON)
|
||||
prefix=G
|
||||
|
||||
[prometheus]
|
||||
# Configuration for the --export prometheus option
|
||||
# https://prometheus.io
|
||||
# Create a Prometheus exporter listening on localhost:9091 (default configuration)
|
||||
# Metric are exporter using the following name:
|
||||
# <prefix>_<plugin>_<stats> (all specials character are replaced by '_')
|
||||
# Note: You should add this exporter to your Prometheus server configuration:
|
||||
# scrape_configs:
|
||||
# - job_name: 'glances_exporter'
|
||||
# scrape_interval: 5s
|
||||
# static_configs:
|
||||
# - targets: ['localhost:9091']
|
||||
host=localhost
|
||||
port=9091
|
||||
prefix=glances
|
||||
# Labels will be added for all measurements
|
||||
#labels=foo:bar,spam:eggs
|
||||
# You can also use dynamic values
|
||||
#labels=system:`uname -s`
|
||||
|
||||
[restful]
|
||||
# Configuration for the --export RESTful option
|
||||
# Example, export to http://localhost:6789/
|
||||
host=localhost
|
||||
port=6789
|
||||
protocol=http
|
||||
path=/
|
||||
|
||||
##############################################################################
|
||||
# AMPS
|
||||
# * enable: Enable (true) or disable (false) the AMP
|
||||
# * regex: Regular expression to filter the process(es)
|
||||
# * refresh: The AMP is executed every refresh seconds
|
||||
# * one_line: (optional) Force (if true) the AMP to be displayed in one line
|
||||
# * command: (optional) command to execute when the process is detected (thk to the regex)
|
||||
# * countmin: (optional) minimal number of processes
|
||||
# A warning will be displayed if number of process < count
|
||||
# * countmax: (optional) maximum number of processes
|
||||
# A warning will be displayed if number of process > count
|
||||
# * <foo>: Others variables can be defined and used in the AMP script
|
||||
##############################################################################
|
||||
|
||||
[amp_dropbox]
|
||||
# Use the default AMP (no dedicated AMP Python script)
|
||||
# Check if the Dropbox daemon is running
|
||||
# Every 3 seconds, display the 'dropbox status' command line
|
||||
enable=false
|
||||
regex=.*dropbox.*
|
||||
refresh=3
|
||||
one_line=false
|
||||
command=dropbox status
|
||||
countmin=1
|
||||
|
||||
[amp_python]
|
||||
# Use the default AMP (no dedicated AMP Python script)
|
||||
# Monitor all the Python scripts
|
||||
# Alert if more than 20 Python scripts are running
|
||||
enable=false
|
||||
regex=.*python.*
|
||||
refresh=3
|
||||
countmax=20
|
||||
|
||||
[amp_nginx]
|
||||
# Use the NGinx AMP
|
||||
# Nginx status page should be enable (https://easyengine.io/tutorials/nginx/status-page/)
|
||||
enable=false
|
||||
regex=\/usr\/sbin\/nginx
|
||||
refresh=60
|
||||
one_line=false
|
||||
status_url=http://localhost/nginx_status
|
||||
|
||||
[amp_systemd]
|
||||
# Use the Systemd AMP
|
||||
enable=false
|
||||
regex=\/lib\/systemd\/systemd
|
||||
refresh=30
|
||||
one_line=true
|
||||
systemctl_cmd=/bin/systemctl --plain
|
||||
|
||||
[amp_systemv]
|
||||
# Use the Systemv AMP
|
||||
enable=false
|
||||
regex=\/sbin\/init
|
||||
refresh=30
|
||||
one_line=true
|
||||
service_cmd=/usr/bin/service --status-all
|
||||
433
metrics/influxdb.conf
Normal file
433
metrics/influxdb.conf
Normal file
@@ -0,0 +1,433 @@
|
||||
### Welcome to the InfluxDB configuration file.
|
||||
|
||||
# The values in this file override the default values used by the system if
|
||||
# a config option is not specified. The commented out lines are the the configuration
|
||||
# field and the default value used. Uncommentting a line and changing the value
|
||||
# will change the value used at runtime when the process is restarted.
|
||||
|
||||
# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
|
||||
# The data includes a random ID, os, arch, version, the number of series and other
|
||||
# usage data. No data from user databases is ever transmitted.
|
||||
# Change this option to true to enable reporting.
|
||||
reporting-enabled = false
|
||||
|
||||
# we'll try to get the hostname automatically, but if it the os returns something
|
||||
# that isn't resolvable by other servers in the cluster, use this option to
|
||||
# manually set the hostname
|
||||
# hostname = "localhost"
|
||||
|
||||
###
|
||||
### [meta]
|
||||
###
|
||||
### Controls the parameters for the Raft consensus group that stores metadata
|
||||
### about the InfluxDB cluster.
|
||||
###
|
||||
|
||||
[meta]
|
||||
# Where the metadata/raft database is stored
|
||||
dir = "/var/lib/influxdb/meta"
|
||||
|
||||
# Automatically create a default retention policy when creating a database.
|
||||
# retention-autocreate = true
|
||||
|
||||
# If log messages are printed for the meta service
|
||||
# logging-enabled = true
|
||||
|
||||
###
|
||||
### [data]
|
||||
###
|
||||
### Controls where the actual shard data for InfluxDB lives and how it is
|
||||
### flushed from the WAL. "dir" may need to be changed to a suitable place
|
||||
### for your system, but the WAL settings are an advanced configuration. The
|
||||
### defaults should work for most systems.
|
||||
###
|
||||
|
||||
[data]
|
||||
# The directory where the TSM storage engine stores TSM files.
|
||||
dir = "/var/lib/influxdb/data"
|
||||
|
||||
# The directory where the TSM storage engine stores WAL files.
|
||||
wal-dir = "/var/lib/influxdb/wal"
|
||||
|
||||
# Trace logging provides more verbose output around the tsm engine. Turning
|
||||
# this on can provide more useful output for debugging tsm engine issues.
|
||||
# trace-logging-enabled = false
|
||||
|
||||
# Whether queries should be logged before execution. Very useful for troubleshooting, but will
|
||||
# log any sensitive data contained within a query.
|
||||
# query-log-enabled = true
|
||||
|
||||
# Settings for the TSM engine
|
||||
|
||||
# CacheMaxMemorySize is the maximum size a shard's cache can
|
||||
# reach before it starts rejecting writes.
|
||||
# cache-max-memory-size = 1048576000
|
||||
|
||||
# CacheSnapshotMemorySize is the size at which the engine will
|
||||
# snapshot the cache and write it to a TSM file, freeing up memory
|
||||
# cache-snapshot-memory-size = 26214400
|
||||
|
||||
# CacheSnapshotWriteColdDuration is the length of time at
|
||||
# which the engine will snapshot the cache and write it to
|
||||
# a new TSM file if the shard hasn't received writes or deletes
|
||||
# cache-snapshot-write-cold-duration = "10m"
|
||||
|
||||
# CompactFullWriteColdDuration is the duration at which the engine
|
||||
# will compact all TSM files in a shard if it hasn't received a
|
||||
# write or delete
|
||||
# compact-full-write-cold-duration = "4h"
|
||||
|
||||
# The maximum series allowed per database before writes are dropped. This limit can prevent
|
||||
# high cardinality issues at the database level. This limit can be disabled by setting it to
|
||||
# 0.
|
||||
# max-series-per-database = 1000000
|
||||
|
||||
# The maximum number of tag values per tag that are allowed before writes are dropped. This limit
|
||||
# can prevent high cardinality tag values from being written to a measurement. This limit can be
|
||||
# disabled by setting it to 0.
|
||||
# max-values-per-tag = 100000
|
||||
|
||||
###
|
||||
### [coordinator]
|
||||
###
|
||||
### Controls the clustering service configuration.
|
||||
###
|
||||
|
||||
# [coordinator]
|
||||
# The default time a write request will wait until a "timeout" error is returned to the caller.
|
||||
# write-timeout = "10s"
|
||||
|
||||
# The maximum number of concurrent queries allowed to be executing at one time. If a query is
|
||||
# executed and exceeds this limit, an error is returned to the caller. This limit can be disabled
|
||||
# by setting it to 0.
|
||||
# max-concurrent-queries = 0
|
||||
|
||||
# The maximum time a query will is allowed to execute before being killed by the system. This limit
|
||||
# can help prevent run away queries. Setting the value to 0 disables the limit.
|
||||
# query-timeout = "0s"
|
||||
|
||||
# The the time threshold when a query will be logged as a slow query. This limit can be set to help
|
||||
# discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging.
|
||||
# log-queries-after = "0s"
|
||||
|
||||
# The maximum number of points a SELECT can process. A value of 0 will make the maximum
|
||||
# point count unlimited.
|
||||
# max-select-point = 0
|
||||
|
||||
# The maximum number of series a SELECT can run. A value of 0 will make the maximum series
|
||||
# count unlimited.
|
||||
|
||||
# The maximum number of series a SELECT can run. A value of zero will make the maximum series
|
||||
# count unlimited.
|
||||
# max-select-series = 0
|
||||
|
||||
# The maxium number of group by time bucket a SELECt can create. A value of zero will max the maximum
|
||||
# number of buckets unlimited.
|
||||
# max-select-buckets = 0
|
||||
|
||||
###
|
||||
### [retention]
|
||||
###
|
||||
### Controls the enforcement of retention policies for evicting old data.
|
||||
###
|
||||
|
||||
# [retention]
|
||||
# Determines whether retention policy enforcment enabled.
|
||||
# enabled = true
|
||||
|
||||
# The interval of time when retention policy enforcement checks run.
|
||||
# check-interval = "30m"
|
||||
|
||||
###
|
||||
### [shard-precreation]
|
||||
###
|
||||
### Controls the precreation of shards, so they are available before data arrives.
|
||||
### Only shards that, after creation, will have both a start- and end-time in the
|
||||
### future, will ever be created. Shards are never precreated that would be wholly
|
||||
### or partially in the past.
|
||||
|
||||
# [shard-precreation]
|
||||
# Determines whether shard pre-creation service is enabled.
|
||||
# enabled = true
|
||||
|
||||
# The interval of time when the check to pre-create new shards runs.
|
||||
# check-interval = "10m"
|
||||
|
||||
# The default period ahead of the endtime of a shard group that its successor
|
||||
# group is created.
|
||||
# advance-period = "30m"
|
||||
|
||||
###
|
||||
### Controls the system self-monitoring, statistics and diagnostics.
|
||||
###
|
||||
### The internal database for monitoring data is created automatically if
|
||||
### if it does not already exist. The target retention within this database
|
||||
### is called 'monitor' and is also created with a retention period of 7 days
|
||||
### and a replication factor of 1, if it does not exist. In all cases the
|
||||
### this retention policy is configured as the default for the database.
|
||||
|
||||
# [monitor]
|
||||
# Whether to record statistics internally.
|
||||
# store-enabled = true
|
||||
|
||||
# The destination database for recorded statistics
|
||||
# store-database = "_internal"
|
||||
|
||||
# The interval at which to record statistics
|
||||
# store-interval = "10s"
|
||||
|
||||
###
|
||||
### [admin]
|
||||
###
|
||||
### Controls the availability of the built-in, web-based admin interface. If HTTPS is
|
||||
### enabled for the admin interface, HTTPS must also be enabled on the [http] service.
|
||||
###
|
||||
### NOTE: This interface is deprecated as of 1.1.0 and will be removed in a future release.
|
||||
|
||||
# [admin]
|
||||
# Determines whether the admin service is enabled.
|
||||
# enabled = false
|
||||
|
||||
# The default bind address used by the admin service.
|
||||
# bind-address = ":8083"
|
||||
|
||||
# Whether the admin service should use HTTPS.
|
||||
# https-enabled = false
|
||||
|
||||
# The SSL certificate used when HTTPS is enabled.
|
||||
# https-certificate = "/etc/ssl/influxdb.pem"
|
||||
|
||||
###
|
||||
### [http]
|
||||
###
|
||||
### Controls how the HTTP endpoints are configured. These are the primary
|
||||
### mechanism for getting data into and out of InfluxDB.
|
||||
###
|
||||
|
||||
# [http]
|
||||
# Determines whether HTTP endpoint is enabled.
|
||||
# enabled = true
|
||||
|
||||
# The bind address used by the HTTP service.
|
||||
# bind-address = ":8086"
|
||||
|
||||
# Determines whether HTTP authentication is enabled.
|
||||
# auth-enabled = false
|
||||
|
||||
# The default realm sent back when issuing a basic auth challenge.
|
||||
# realm = "InfluxDB"
|
||||
|
||||
# Determines whether HTTP request logging is enable.d
|
||||
# log-enabled = true
|
||||
|
||||
# Determines whether detailed write logging is enabled.
|
||||
# write-tracing = false
|
||||
|
||||
# Determines whether the pprof endpoint is enabled. This endpoint is used for
|
||||
# troubleshooting and monitoring.
|
||||
# pprof-enabled = true
|
||||
|
||||
# Determines whether HTTPS is enabled.
|
||||
# https-enabled = false
|
||||
|
||||
# The SSL certificate to use when HTTPS is enabled.
|
||||
# https-certificate = "/etc/ssl/influxdb.pem"
|
||||
|
||||
# Use a separate private key location.
|
||||
# https-private-key = ""
|
||||
|
||||
# The JWT auth shared secret to validate requests using JSON web tokens.
|
||||
# shared-sercret = ""
|
||||
|
||||
# The default chunk size for result sets that should be chunked.
|
||||
# max-row-limit = 10000
|
||||
|
||||
# The maximum number of HTTP connections that may be open at once. New connections that
|
||||
# would exceed this limit are dropped. Setting this value to 0 disables the limit.
|
||||
# max-connection-limit = 0
|
||||
|
||||
# Enable http service over unix domain socket
|
||||
# unix-socket-enabled = false
|
||||
|
||||
# The path of the unix domain socket.
|
||||
# bind-socket = "/var/run/influxdb.sock"
|
||||
|
||||
###
|
||||
### [subscriber]
|
||||
###
|
||||
### Controls the subscriptions, which can be used to fork a copy of all data
|
||||
### received by the InfluxDB host.
|
||||
###
|
||||
|
||||
# [subscriber]
|
||||
# Determines whether the subscriber service is enabled.
|
||||
# enabled = true
|
||||
|
||||
# The default timeout for HTTP writes to subscribers.
|
||||
# http-timeout = "30s"
|
||||
|
||||
# Allows insecure HTTPS connections to subscribers. This is useful when testing with self-
|
||||
# signed certificates.
|
||||
# insecure-skip-verify = false
|
||||
|
||||
# The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used
|
||||
# ca-certs = ""
|
||||
|
||||
# The number of writer goroutines processing the write channel.
|
||||
# write-concurrency = 40
|
||||
|
||||
# The number of in-flight writes buffered in the write channel.
|
||||
# write-buffer-size = 1000
|
||||
|
||||
|
||||
###
|
||||
### [[graphite]]
|
||||
###
|
||||
### Controls one or many listeners for Graphite data.
|
||||
###
|
||||
|
||||
# [[graphite]]
|
||||
# Determines whether the graphite endpoint is enabled.
|
||||
# enabled = false
|
||||
# database = "graphite"
|
||||
# retention-policy = ""
|
||||
# bind-address = ":2003"
|
||||
# protocol = "tcp"
|
||||
# consistency-level = "one"
|
||||
|
||||
# These next lines control how batching works. You should have this enabled
|
||||
# otherwise you could get dropped metrics or poor performance. Batching
|
||||
# will buffer points in memory if you have many coming in.
|
||||
|
||||
# Flush if this many points get buffered
|
||||
# batch-size = 5000
|
||||
|
||||
# number of batches that may be pending in memory
|
||||
# batch-pending = 10
|
||||
|
||||
# Flush at least this often even if we haven't hit buffer limit
|
||||
# batch-timeout = "1s"
|
||||
|
||||
# UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
|
||||
# udp-read-buffer = 0
|
||||
|
||||
### This string joins multiple matching 'measurement' values providing more control over the final measurement name.
|
||||
# separator = "."
|
||||
|
||||
### Default tags that will be added to all metrics. These can be overridden at the template level
|
||||
### or by tags extracted from metric
|
||||
# tags = ["region=us-east", "zone=1c"]
|
||||
|
||||
### Each template line requires a template pattern. It can have an optional
|
||||
### filter before the template and separated by spaces. It can also have optional extra
|
||||
### tags following the template. Multiple tags should be separated by commas and no spaces
|
||||
### similar to the line protocol format. There can be only one default template.
|
||||
# templates = [
|
||||
# "*.app env.service.resource.measurement",
|
||||
# # Default template
|
||||
# "server.*",
|
||||
# ]
|
||||
|
||||
###
|
||||
### [collectd]
|
||||
###
|
||||
### Controls one or many listeners for collectd data.
|
||||
###
|
||||
|
||||
[[collectd]]
|
||||
enabled = true
|
||||
bind-address = ":25826"
|
||||
database = "collectd"
|
||||
# retention-policy = ""
|
||||
typesdb = "/usr/share/collectd/types.db"
|
||||
|
||||
# These next lines control how batching works. You should have this enabled
|
||||
# otherwise you could get dropped metrics or poor performance. Batching
|
||||
# will buffer points in memory if you have many coming in.
|
||||
|
||||
# Flush if this many points get buffered
|
||||
batch-size = 1000
|
||||
|
||||
# Number of batches that may be pending in memory
|
||||
batch-pending = 5
|
||||
|
||||
# Flush at least this often even if we haven't hit buffer limit
|
||||
batch-timeout = "1s"
|
||||
|
||||
# UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
|
||||
read-buffer = 0
|
||||
|
||||
###
|
||||
### [opentsdb]
|
||||
###
|
||||
### Controls one or many listeners for OpenTSDB data.
|
||||
###
|
||||
|
||||
# [[opentsdb]]
|
||||
# enabled = false
|
||||
# bind-address = ":4242"
|
||||
# database = "opentsdb"
|
||||
# retention-policy = ""
|
||||
# consistency-level = "one"
|
||||
# tls-enabled = false
|
||||
# certificate= "/etc/ssl/influxdb.pem"
|
||||
|
||||
# Log an error for every malformed point.
|
||||
# log-point-errors = true
|
||||
|
||||
# These next lines control how batching works. You should have this enabled
|
||||
# otherwise you could get dropped metrics or poor performance. Only points
|
||||
# metrics received over the telnet protocol undergo batching.
|
||||
|
||||
# Flush if this many points get buffered
|
||||
# batch-size = 1000
|
||||
|
||||
# Number of batches that may be pending in memory
|
||||
# batch-pending = 5
|
||||
|
||||
# Flush at least this often even if we haven't hit buffer limit
|
||||
# batch-timeout = "1s"
|
||||
|
||||
###
|
||||
### [[udp]]
|
||||
###
|
||||
### Controls the listeners for InfluxDB line protocol data via UDP.
|
||||
###
|
||||
|
||||
# [[udp]]
|
||||
# enabled = false
|
||||
# bind-address = ":8089"
|
||||
# database = "udp"
|
||||
# retention-policy = ""
|
||||
|
||||
# These next lines control how batching works. You should have this enabled
|
||||
# otherwise you could get dropped metrics or poor performance. Batching
|
||||
# will buffer points in memory if you have many coming in.
|
||||
|
||||
# Flush if this many points get buffered
|
||||
# batch-size = 5000
|
||||
|
||||
# Number of batches that may be pending in memory
|
||||
# batch-pending = 10
|
||||
|
||||
# Will flush at least this often even if we haven't hit buffer limit
|
||||
# batch-timeout = "1s"
|
||||
|
||||
# UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
|
||||
# read-buffer = 0
|
||||
|
||||
###
|
||||
### [continuous_queries]
|
||||
###
|
||||
### Controls how continuous queries are run within InfluxDB.
|
||||
###
|
||||
|
||||
# [continuous_queries]
|
||||
# Determiens whether the continuous query service is enabled.
|
||||
# enabled = true
|
||||
|
||||
# Controls whether queries are logged when executed by the CQ service.
|
||||
# log-enabled = true
|
||||
|
||||
# interval for how often continuous queries will be checked if they need to run
|
||||
# run-interval = "1s"
|
||||
6
ssh-user
Executable file
6
ssh-user
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -e "Username for $1:"
|
||||
read username
|
||||
echo "Connecting to $username@$1..."
|
||||
ssh $username@$1
|
||||
32
tmux/.tmux.conf
Normal file
32
tmux/.tmux.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# More friendly split pane
|
||||
bind-key h split-window -h
|
||||
bind-key v split-window -v
|
||||
bind - split-window -h
|
||||
bind _ split-window -v
|
||||
|
||||
bind Enter copy-mode
|
||||
bind Escape copy-mode
|
||||
|
||||
bind r source-file ~/.tmux.conf; display " [tmux] ♦ Configuration reloaded from .tmux.conf"
|
||||
|
||||
#set -g utf8 on
|
||||
#set-option -g status-utf8 on
|
||||
set -g default-terminal "xterm-256color"
|
||||
|
||||
set -g status-bg colour235
|
||||
set -g status-fg white
|
||||
set -g status-left '#(sh ~/.tmux/health-indicator.sh #{client_prefix})#S #(~/.tmux/segment.sh end 31 29) ▣ #{session_windows} #{?session_many_attached,#(~/.tmux/subsegment.sh end) 🖥 #{session-attached},}#(~/.tmux/segment.sh end 29 65) #H #(~/.tmux/segment.sh end 65 71) #[fg=colour235]#(whoami) #(~/.tmux/segment.sh end 71 235)'
|
||||
set -g status-left-length 80
|
||||
set -g status-right-length 120
|
||||
set -g status-justify centre
|
||||
set -g status-interval 1
|
||||
|
||||
set -g window-status-format '#(~/.tmux/segment.sh start 235 237 round)#I#(~/.tmux/subsegment.sh end 234) #W #(~/.tmux/segment.sh end 237 235 round)'
|
||||
set -g window-status-current-format '#(~/.tmux/segment.sh start 235 71 round)#[fg=colour235]#I#(~/.tmux/subsegment.sh end 234)#[fg=colour235] #W #(~/.tmux/segment.sh end 71 235 round)'
|
||||
|
||||
set -g status-right '#{?#(~/.tmux/mediaplaying.sh test),#(~/.tmux/segment.sh start 235 65)#[fg=colour235] ♫ #(~/.tmux/mediaplaying.sh) #(~/.tmux/segment.sh start 65 71),#(~/.tmux/segment.sh start 235 71)}#[fg=colour235] %H:%M:%S #(~/.tmux/subsegment.sh start) %d %b '
|
||||
set -g pane-active-border-style fg=colour76
|
||||
BIN
tmux/.tmux/.subsegment.sh.swp
Normal file
BIN
tmux/.tmux/.subsegment.sh.swp
Normal file
Binary file not shown.
32
tmux/.tmux/.tmux.conf
Normal file
32
tmux/.tmux/.tmux.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# More friendly split pane
|
||||
bind-key h split-window -h
|
||||
bind-key v split-window -v
|
||||
bind - split-window -h
|
||||
bind _ split-window -v
|
||||
|
||||
bind Enter copy-mode
|
||||
bind Escape copy-mode
|
||||
|
||||
bind r source-file ~/.tmux.conf; display " [tmux] ♦ Configuration reloaded from .tmux.conf"
|
||||
|
||||
#set -g utf8 on
|
||||
#set-option -g status-utf8 on
|
||||
set -g default-terminal "xterm-256color"
|
||||
|
||||
set -g status-bg colour235
|
||||
set -g status-fg white
|
||||
set -g status-left '#(sh ~/.tmux/health-indicator.sh #{client_prefix})#S #(~/.tmux/segment.sh end 31 29) ▣ #{session_windows} #{?session_many_attached,#(~/.tmux/subsegment.sh end) 🖥 #{session-attached},}#(~/.tmux/segment.sh end 29 65) #H #(~/.tmux/segment.sh end 65 71) #[fg=colour235]#(whoami) #(~/.tmux/segment.sh end 71 235)'
|
||||
set -g status-left-length 80
|
||||
set -g status-right-length 120
|
||||
set -g status-justify centre
|
||||
set -g status-interval 1
|
||||
|
||||
set -g window-status-format '#(~/.tmux/segment.sh start 235 237 round)#I#(~/.tmux/subsegment.sh end 234) #W #(~/.tmux/segment.sh end 237 235 round)'
|
||||
set -g window-status-current-format '#(~/.tmux/segment.sh start 235 71 round)#[fg=colour235]#I#(~/.tmux/subsegment.sh end 234)#[fg=colour235] #W #(~/.tmux/segment.sh end 71 235 round)'
|
||||
|
||||
set -g status-right '#{?#(~/.tmux/mediaplaying.sh test),#(~/.tmux/segment.sh start 235 65)#[fg=colour235] ♫ #(~/.tmux/mediaplaying.sh) #(~/.tmux/segment.sh start 65 71),#(~/.tmux/segment.sh start 235 71)}#[fg=colour235] %H:%M:%S #(~/.tmux/subsegment.sh start) %d %b '
|
||||
set -g pane-active-border-style fg=colour76
|
||||
23
tmux/.tmux/health-indicator.sh
Executable file
23
tmux/.tmux/health-indicator.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
cnormal1='colour31'
|
||||
cnormal2='white'
|
||||
cprefix='colour238'
|
||||
|
||||
bnormal='colour31'
|
||||
bprefix='colour208'
|
||||
normal='●'
|
||||
prefix='▲'
|
||||
|
||||
if [ $1 -eq 1 ]; then
|
||||
printf "#[fg=$cprefix,bg=$bprefix] $prefix "
|
||||
else
|
||||
if [ $(($(date +%s) % 2)) -eq 0 ]; then
|
||||
printf "#[fg=$cnormal1,bg=$bnormal] $normal "
|
||||
else
|
||||
printf "#[fg=$cnormal2,bg=$bnormal] $normal "
|
||||
fi
|
||||
fi
|
||||
|
||||
#printf "#[fg=white,bg=red] $(date +%N) $@"
|
||||
printf "#[fg=white]"
|
||||
10
tmux/.tmux/mediaplaying.sh
Executable file
10
tmux/.tmux/mediaplaying.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
playing=$(playerctl -a metadata --format='{{status}}:{{artist}} - {{title}}' | grep 'Playing' | sed -e "s/^Playing://")
|
||||
|
||||
if [ -n "$playing" ]; then
|
||||
echo $playing | sed -E 's/(.{30})(.{1,})$/\1.../'
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
26
tmux/.tmux/segment.sh
Executable file
26
tmux/.tmux/segment.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
case $4 in
|
||||
round)
|
||||
separator="\ue0b6";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b2";;
|
||||
esac
|
||||
echo -e "#[fg=colour$3,bg=colour$2]$separator#[fg=white,bg=colour$3]";;
|
||||
|
||||
end)
|
||||
case $4 in
|
||||
round)
|
||||
separator="\ue0b4";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b0";;
|
||||
esac
|
||||
echo -e "#[fg=colour$2,bg=colour$3]$separator#[fg=white]";;
|
||||
esac
|
||||
|
||||
|
||||
26
tmux/.tmux/subsegment.sh
Executable file
26
tmux/.tmux/subsegment.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
case $3 in
|
||||
round)
|
||||
separator="\ue0b7";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b3";;
|
||||
esac;;
|
||||
|
||||
end)
|
||||
case $3 in
|
||||
round)
|
||||
separator="\ue0b5";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b1";;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if [ ! -z $2 ]; then echo -ne "#[fg=colour$2]"; fi
|
||||
echo -ne "$separator"
|
||||
if [ ! -z $2 ]; then echo -ne "#[fg=white]"; fi
|
||||
Reference in New Issue
Block a user