diff --git a/install/chmod.sh b/install/chmod.sh index af784d6..effdd5c 100755 --- a/install/chmod.sh +++ b/install/chmod.sh @@ -10,7 +10,6 @@ chmod -R 771 $BIN_DIR chmod -R 751 $SBIN_DIR find $MACHINE_DIR -type d -exec chmod 775 {} \; chown root:root /etc/pam.d/* -chmod 644 /etc/pam.d/* exit 0 diff --git a/install/openwrt.sh b/install/openwrt.sh old mode 100644 new mode 100755 diff --git a/install/pacman.sh b/install/pacman.sh index 2534b6e..889ec89 100755 --- a/install/pacman.sh +++ b/install/pacman.sh @@ -31,6 +31,7 @@ pacman --noconfirm -S makepkg pacman --noconfirm -S tree pacman --noconfirm -S vim pacman --noconfirm -S iwctl +pacman --noconfirm -S ncdu pacman --noconfirm -S pciutils pacman --noconfirm -S git-filter-repo pacman --noconfirm -S xorg-setxkbmap diff --git a/install/tree_cpy.sh b/install/tree_cpy.sh index 1187386..37e3431 100755 --- a/install/tree_cpy.sh +++ b/install/tree_cpy.sh @@ -9,6 +9,4 @@ USR_DIR=$(realpath $USR_DIR) #uses ssymbolic link otherwise crossdevice troubles cp -s -p -r -f -t / $USR_DIR/. -sudo chown root:root / -sudo chown root:root /etc /var /run /dev /usr /sys -sudo chmod 755 / /etc /var /usr +sudo chown root:svr /etc /var /run /dev /usr /sys / diff --git a/usr/bin/aur b/usr/bin/aur index 09b1442..142dca4 100755 --- a/usr/bin/aur +++ b/usr/bin/aur @@ -1,6 +1,11 @@ #!/bin/bash aur () { - git clone https://aur.archlinux.org/$1.git + DIR=~/tmp + echo "note: ceci est un script maison" + mkdir $DIR + git clone https://aur.archlinux.org/$1.git $DIR/$1 + cd $DIR/$1 + makepkg -si } aur "$@" diff --git a/usr/bin/brc b/usr/bin/brc index fb20401..c5a399f 100755 --- a/usr/bin/brc +++ b/usr/bin/brc @@ -2,8 +2,7 @@ set -e -MACHINE_DIR=${1:$MACHINE_DIR} -MACHINE_DIR=${MACHINE_DIR:-"/svr"} +MACHINE_DIR="/svr" F_NAME=".bashrc"; cd "$MACHINE_DIR/usr/home"; commit_if_modified "$F_NAME" diff --git a/usr/bin/idea b/usr/bin/idea new file mode 120000 index 0000000..715a4d0 --- /dev/null +++ b/usr/bin/idea @@ -0,0 +1 @@ +/home/painpain/Desktop/idea-IU-253.30387.90/bin/idea \ No newline at end of file diff --git a/usr/bin/mountcrypt b/usr/bin/mountcrypt old mode 100644 new mode 100755 diff --git a/usr/bin/regex_gen b/usr/bin/regex_gen new file mode 100755 index 0000000..e40e645 --- /dev/null +++ b/usr/bin/regex_gen @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import subprocess +import sys + +# Ensure exrex is installed +try: + import exrex +except ImportError: + subprocess.check_call([sys.executable, "-m", "pip", "install", "exrex"]) + import exrex + +import argparse + +def main(): + parser = argparse.ArgumentParser(description="Generate all possibilities from a regex") + parser.add_argument("regex", type=str, help="Regex pattern (finite)") + args = parser.parse_args() + + try: + for match in exrex.generate(args.regex): + print(match) + except Exception as e: + print(f"Error: {e}", file=sys.stderr) + +if __name__ == "__main__": + main() diff --git a/usr/etc/pam.d/system-local-login b/usr/etc/pam.d/system-local-login old mode 100644 new mode 100755 diff --git a/usr/etc/resolv.conf b/usr/etc/resolv.conf index a188928..e674b15 100755 --- a/usr/etc/resolv.conf +++ b/usr/etc/resolv.conf @@ -1,7 +1,3 @@ + nameserver 1.1.1.1 nameserver 0.0.0.0 -nameserver 8.26.56.26 -nameserver 208.67.222.222 -nameserver 209.244.0.3 -nameserver 8.8.8.8 - diff --git a/usr/etc/systemd/resolved.conf b/usr/etc/systemd/resolved.conf index 68fcb8d..e69de29 100755 --- a/usr/etc/systemd/resolved.conf +++ b/usr/etc/systemd/resolved.conf @@ -1,44 +0,0 @@ -# This file is part of systemd. -> systemctl enable --now systemd-resolved -# -# systemd is free software; you can redistribute it and/or modify it under the -# terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; either version 2.1 of the License, or (at your option) -# any later version. -# -# Entries in this file show the compile time defaults. Local configuration -# should be created by either modifying this file (or a copy of it placed in -# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in -# the /etc/systemd/resolved.conf.d/ directory. The latter is generally -# recommended. Defaults can be restored by simply deleting the main -# configuration file and all drop-ins located in /etc/. -# -# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config. -# -# See resolved.conf(5) for details. - -[Resolve] -# Some examples of DNS servers which may be used for DNS= and FallbackDNS=: -DNS=1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001 #cloudflare-dns.com -# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net -FallbackDNS=193.110.81.0 185.253.5.0 2a0f:fc80:: 2a0f:fc81:: #dns0.eu -# -# Using DNS= configures global DNS servers and does not suppress link-specific -# configuration. Parallel requests will be sent to per-link DNS servers -# configured automatically by systemd-networkd.service(8), NetworkManager(8), or -# similar management services, or configured manually via resolvectl(1). See -# resolved.conf(5) and systemd-resolved(8) for more details. -#DNS= -#FallbackDNS=9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 8.8.8.8#dns.google 2001:4860:4860::8888#dns.google -#Domains= -DNSSEC=yes -DNSOverTLS=yes -MulticastDNS=yes -LLMNR=yes -Cache=yes -CacheFromLocalhost=no -DNSStubListener=yes -#DNSStubListenerExtra= -ReadEtcHosts=yes -#ResolveUnicastSingleLabel=no -#StaleRetentionSec=0 -#RefuseRecordTypes= diff --git a/usr/etc/systemd/system/tcpd.service b/usr/etc/systemd/system/tcpd.service index fd9f6c8..eb919b1 100755 --- a/usr/etc/systemd/system/tcpd.service +++ b/usr/etc/systemd/system/tcpd.service @@ -4,7 +4,7 @@ After=network.target [Service] Type=simple -ExecStart=/svr/usr/bin/tcpd /var/log/connections/lasts.tcpd +ExecStart=/usr/bin/tcpdump Restart=always [Install] diff --git a/usr/home/.bash_aliases b/usr/home/.bash_aliases index 8af0a68..4b1a159 100755 --- a/usr/home/.bash_aliases +++ b/usr/home/.bash_aliases @@ -24,9 +24,19 @@ alias val="valgrind --leak-check=full --show-leak-kinds=all" alias mvj='rsync -aH --remove-source-files' alias cpj='rsync -aH' alias git_light="git filter-repo --strip-blobs-bigger-than 10M" -alias src="source ~/.bashrc" alias s="sudo -E" +function src() { + d="$PWD"; while [ "$d" != "/" ]; do + for a in "$d/bin/activate" "$d/.*/bin/activate"; do + [ -f $a ] && source "$a" && break 2 + done + d=$(dirname "$d") + done + source $HOME/.bashrc +} + + ##convert mp3 to wav #to_wav () { # OUTDIR_NAME="wav_files" diff --git a/usr/home/.bashrc b/usr/home/.bashrc index 182e000..fbee607 100755 --- a/usr/home/.bashrc +++ b/usr/home/.bashrc @@ -4,9 +4,9 @@ if [ -f /etc/env ]; then - set -a - . /etc/env - set +a + set -a + . /etc/env + set +a fi set -o vi @@ -122,21 +122,16 @@ export AWK_GREP_KEY="'{ } }'" -#ctags -R . - bind -f /home/.inputrc - if [ -f /home/.bash_aliases ]; then - . /home/.bash_aliases + . /home/.bash_aliases fi # permet les accents setxkbmap us -variant intl -source $PY_ENV/bin/activate #envsubst < ${MACHINE_PATH}/dotfiles/ssh/config.template > ~/.ssh/config #export PATH=~/.npm-global/bin:$PATH -