diff --git a/config/etc/named.conf b/config/etc/named.conf new file mode 100644 index 0000000..79fc173 --- /dev/null +++ b/config/etc/named.conf @@ -0,0 +1,88 @@ +; raoult.com named.conf (gandi.net) + +; SOA looks ignored when setting gandi DNS +@ 3600 IN SOA ns1.gandi.net. hostmaster.gandi.net. ( + 1725266688 ; serial + 10800 ; refresh (3 hours) + 3600 ; retry (1h) + 604800 ; expire (1 week) + 3600 ; minimum (1h) +) + +;;; ---------------------------------- copy from here + +; IP addresses +@ 3600 IN A 82.64.229.101 +moreac 3600 IN A 82.67.122.150 + +; forgot what it is +@ 3600 IN TXT "google-site-verification=I7AEHSueTj0mpbBvL4QA3WKaPTfBiM0_6N8Var0UpU8" + +; subdomains +www 3600 IN CNAME raoult.com. +home 3600 IN CNAME raoult.com. +devs 3600 IN CNAME raoult.com. +ebooks 3600 IN CNAME raoult.com. + +; applications +dav 3600 IN CNAME raoult.com. +git 3600 IN CNAME raoult.com. +webtrees 3600 IN CNAME raoult.com. + +; hostnames +idril 3600 IN CNAME raoult.com. +arwen 3600 IN CNAME raoult.com. + +idefix 3600 IN CNAME moreac.raoult.com. + +; old shared +locations 3600 IN CNAME raoult.com. +marcel 3600 IN CNAME raoult.com. +xavier 3600 IN CNAME raoult.com. + +;;; ---------------------------------- end of Gandi DNS records + +;;;;; default gandi.net entries +; @ 10800 IN A 217.70.184.38 +; @ 10800 IN MX 10 spool.mail.gandi.net. +; @ 10800 IN MX 50 fb.mail.gandi.net. +; @ 10800 IN TXT "v=spf1 include:_mailcust.gandi.net ?all" +; _imap._tcp 10800 IN SRV 0 0 0 . +; _imaps._tcp 10800 IN SRV 0 1 993 mail.gandi.net. +; _pop3._tcp 10800 IN SRV 0 0 0 . +; _pop3s._tcp 10800 IN SRV 10 1 995 mail.gandi.net. +; _submission._tcp 10800 IN SRV 0 1 465 mail.gandi.net. +; gm1._domainkey 10800 IN CNAME gm1.gandimail.net. +; gm2._domainkey 10800 IN CNAME gm2.gandimail.net. +; gm3._domainkey 10800 IN CNAME gm3.gandimail.net. +; +; webmail 10800 IN CNAME webmail.gandi.net. +; www 10800 IN CNAME webredir.vip.gandi.net. + +;;;;; old freenom +; raoult.com. 300 IN SOA ns01.freenom.com. soa.freenom.com. ( +; 1725254393 ; serial +; 10800 ; refresh (3 hours) +; 3600 ; retry (1 hour) +; 604800 ; expire (1 week) +; 3600 ; minimum (1 hour) +; ) +; raoult.com. 300 IN NS ns02.freenom.com. +; raoult.com. 300 IN NS ns04.freenom.com. +; raoult.com. 300 IN NS ns03.freenom.com. +; raoult.com. 300 IN NS ns01.freenom.com. +; raoult.com. 3600 IN TXT "google-site-verification=I7AEHSueTj0mpbBvL4QA3WKaPTfBiM0_6N8Var0UpU8" + +;;;;; domain lists +; raoult.com +; www.raoult.com +; home.raoult.com +; arwen.raoult.com +; dav.raoult.com +; devs.raoult.com +; ebooks.raoult.com +; git.raoult.com +; locations.raoult.com +; marcel.raoult.com +; webtrees.raoult.com +; xavier.raoult.com diff --git a/config/home/bash_profile b/config/home/bash_profile index 680453f..0577cb5 100644 --- a/config/home/bash_profile +++ b/config/home/bash_profile @@ -15,4 +15,5 @@ # This imply a duplicate "$HOME/bin" in PATH, as we do everything in .bashrc.$user. # Having this ~/.bash_profile will avoid the execution of ~/.profile +# shellcheck disable=SC1091 [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" diff --git a/config/home/emacs.d/init.el b/config/home/emacs.d/init.el index 1434490..0461ce6 100755 --- a/config/home/emacs.d/init.el +++ b/config/home/emacs.d/init.el @@ -15,6 +15,7 @@ ;; (require 'use-package) (package-initialize) (setq use-package-always-ensure t) +;; (setq package-check-signature nil) (use-package delight :ensure t) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) @@ -454,8 +455,17 @@ Return new LIST-VAR value." (global-set-key (kbd "C-h c") 'describe-char) (global-set-key (kbd "C-x 4 C-b") 'switch-to-buffer-other-window) -(global-unset-key [mode-line mouse-3]) ; so disturbing mouse-3 there ! +(global-unset-key [mode-line mouse-3]) ; disabble annoying modeline mouse-3 +;; compilation buffer in different frame +;; https://emacs.stackexchange.com/a/21393/23591 +;; (push "*compilation*" special-display-buffer-names) +;; https://emacs.stackexchange.com/a/75534/23591 +(add-to-list 'display-buffer-alist + (cons (rx string-start "*compilation*" string-end) + (cons 'display-buffer-reuse-window + '((reusable-frames . visible) + (inhibit-switch-frames . nil))))) ;; next example maps C-x C-x to the same as C-c ;; (global-set-key (kbd "C-x C-x") (lookup-key global-map (kbd "C-c"))) @@ -498,7 +508,10 @@ Return new LIST-VAR value." (setq display-time-24hr-format t) ; time format (display-time-mode 0) ; disable time in the mode-line -(defalias 'yes-or-no-p 'y-or-n-p) ; just 'y' or 'n' instead of yes/no +(if (< emacs-major-version 29) ; just 'y' or 'n' instead of yes/no + (defalias 'yes-or-no-p 'y-or-n-p) + (setopt use-short-answers t)) +(setq duplicate-line-final-position -1) ; point on last new line (mouse-avoidance-mode 'exile) ; Avoid collision of mouse with point @@ -677,6 +690,7 @@ point reaches the beginning or end of the buffer, stop there." (global-set-key (kbd "M-u") 'my/upcase-word) (global-set-key (kbd "M-l") 'my/downcase-word) +(global-set-key (kbd "H-y") 'duplicate-dwim) ;; rewrite comment-kill to avoid filling kill-ring ;; From: https://emacs.stackexchange.com/a/5445/23591 @@ -768,7 +782,7 @@ in whole buffer. With neither, delete comments on current line." "Switch the buffers between the two last frames." (interactive) (let ((this-frame-buffer nil) - (other-frame-buffer nil)) + (other-frame-buffer nil)) (setq this-frame-buffer (car (frame-parameter nil 'buffer-list))) (other-frame 1) (setq other-frame-buffer (car (frame-parameter nil 'buffer-list))) @@ -931,6 +945,7 @@ in whole buffer. With neither, delete comments on current line." (require 'helm-projectile) ;; (require 'tramp) (setq + helm-candidate-number-limit 100 ;; From https://gist.github.com/antifuchs/9238468 helm-split-window-inside-p t ; open helm buffer in current window @@ -952,6 +967,8 @@ in whole buffer. With neither, delete comments on current line." helm-scroll-amount 8 ; scroll 8 lines other window M- helm-ff-file-name-history-use-recentf t + helm-move-to-line-cycle-in-source nil + ;; helm-ff-auto-update-initial-value nil helm-echo-input-in-header-line t) ; ?? ;;) (helm-mode) @@ -976,10 +993,19 @@ in whole buffer. With neither, delete comments on current line." ("" . helm-execute-persistent-action) ("C-i" . helm-execute-persistent-action) ; make TAB works in terminal ("C-z" . helm-select-action) ; list actions using C-z - - ;; bookmarks - - )) + ) + ;;("" . helm-previous-source) + ;;("" . helm-next-source) + ;;:map helm-imenu-map + ;;("" . helm-previous-source) + ;;("" . helm-next-source) + ;;:map helm-find-files-map + ;;("" . helm-previous-source) + ;;("" . helm-next-source)) + :bind* + (:map helm-find-files-map + ("" . helm-previous-source) + ("" . helm-next-source))) (use-package helm-swoop :bind @@ -1057,7 +1083,7 @@ in whole buffer. With neither, delete comments on current line." (define-key vundo-mode-map (kbd "") #'vundo-previous) (define-key vundo-mode-map (kbd "") #'vundo-stem-root) (define-key vundo-mode-map (kbd "") #'vundo-stem-end) - (define-key vundo-mode-map (kbd "q") #'vundo-quit) + (define-key vundo-mode-map (kbd "q") #'vundo-confirm) (define-key vundo-mode-map (kbd "C-g") #'vundo-quit) (define-key vundo-mode-map (kbd "RET") #'vundo-confirm)) @@ -1107,7 +1133,8 @@ in whole buffer. With neither, delete comments on current line." ;; ([return] . nil) ("TAB" . company-complete-selection) ;; ([tab] . company-complete-selection) - ("" . company-complete-common)) + ;;("" . company-complete-common) + ) :config ;; Too slow ! ;; (global-company-mode 1) @@ -2227,7 +2254,7 @@ The output will appear in the buffer *PHP*." 'sh-mode-hook (lambda () (setq indent-tabs-mode nil - tab-width 4 + tab-width 4 sh-basic-offset 4 comment-column 50 comment-auto-fill-only-comments t @@ -2310,7 +2337,7 @@ The output will appear in the buffer *PHP*." :diminish " ccls" :init (setq ccls-initialization-options - '(:index (:comments 2) :completion (:detailedLabel t))) + '(:index (:comments 2) :completion (:detailedLabel t))) (setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-cppcheck c/c++-gcc)) (setq ccls-sem-highlight-method 'font-lock) ;; alternatively, @@ -2409,11 +2436,22 @@ at beginning and end of lines." (while (re-search-forward "[ \t]+" nil t) (replace-match " ")) ;; remove spaces at lines beginning - (goto-char (point-min)) - (while (re-search-forward "^[ \t]+" nil t) - (replace-match "")) + ;;(goto-char (point-min)) + ;;(while (re-search-forward "^[ \t]+" nil t) + ;; (replace-match "")) ;; remove spaces at line start/end - (delete-trailing-whitespace)))) + ;(delete-trailing-whitespace) + ))) + +(defun my/align-c-array (beg end) + "Align array declaration on commas between BEG and END." + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region beg end) + (my/trim-spaces (point-min) (point-max)) + (align-regexp (point-min) (point-max) "\\(\\s-[[:alnum:]-_]+,\\)" -1 1 t) + (indent-region (point-min) (point-max) nil)))) (defun my/align (beg end) "Align columns with spaces."