Added Ansible Mode to Emacs
parent
78945a969d
commit
a56233db18
|
@ -9,5 +9,5 @@ t:/home/tuan/Templates
|
||||||
w:/home/tuan/workspace_l/Projects
|
w:/home/tuan/workspace_l/Projects
|
||||||
k:/home/tuan/Documents/Uni/Studium/2017&2018 Wintersemester/Rechnerstrukturen und Betriebssysteme [4,0]/Rechnerstrukturen
|
k:/home/tuan/Documents/Uni/Studium/2017&2018 Wintersemester/Rechnerstrukturen und Betriebssysteme [4,0]/Rechnerstrukturen
|
||||||
q:/home/tuan/.nextcloud/Quick Drop
|
q:/home/tuan/.nextcloud/Quick Drop
|
||||||
':/home/tuan/.emacs.d/snippets/c++-mode
|
':/home/tuan/f/b
|
||||||
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
||||||
|
|
|
@ -42,7 +42,7 @@ Host goldi
|
||||||
User goldi
|
User goldi
|
||||||
IdentityFile /mnt/veracrypt1/goldi
|
IdentityFile /mnt/veracrypt1/goldi
|
||||||
|
|
||||||
# Gitlab/Hub
|
# Services
|
||||||
Host github.com
|
Host github.com
|
||||||
Hostname github.com
|
Hostname github.com
|
||||||
Port 22
|
Port 22
|
||||||
|
@ -63,79 +63,64 @@ Host picoCTF
|
||||||
|
|
||||||
# Homeserver
|
# Homeserver
|
||||||
Host proxmox
|
Host proxmox
|
||||||
HostName 192.168.178.38
|
HostName 10.1.10.2
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
|
## CT
|
||||||
Host nginx
|
Host nginx
|
||||||
HostName 192.168.178.24
|
HostName 10.1.11.100
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
Host nextcloud
|
Host nextcloud
|
||||||
HostName 192.168.178.25
|
HostName 10.1.11.102
|
||||||
Port 22
|
|
||||||
User root
|
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
|
||||||
|
|
||||||
Host sonarr
|
|
||||||
HostName 192.168.178.43
|
|
||||||
Port 22
|
|
||||||
User root
|
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
|
||||||
|
|
||||||
Host portainer
|
|
||||||
HostName 192.168.178.39
|
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
Host fireflyiii
|
Host fireflyiii
|
||||||
HostName 192.168.178.40
|
HostName 10.1.11.105
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
Host pfsense
|
|
||||||
HostName 192.168.178.55
|
|
||||||
Port 2222
|
|
||||||
User root
|
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
|
||||||
|
|
||||||
Host pihole
|
Host pihole
|
||||||
HostName 192.168.178.47
|
HostName 10.1.11.108
|
||||||
Port 22
|
|
||||||
User root
|
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
|
||||||
|
|
||||||
Host nfs
|
|
||||||
HostName 192.168.178.37
|
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
Host plex
|
Host plex
|
||||||
HostName 192.168.178.48
|
HostName 10.1.11.110
|
||||||
|
Port 22
|
||||||
|
User root
|
||||||
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
|
Host plex-00
|
||||||
|
HostName 10.1.11.107
|
||||||
|
Port 22
|
||||||
|
User root
|
||||||
|
IdentityFile /mnt/veracrypt1/tudattr
|
||||||
|
|
||||||
|
Host ansible
|
||||||
|
HostName 10.1.11.104
|
||||||
|
Port 22
|
||||||
|
User root
|
||||||
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
|
## VM
|
||||||
|
|
||||||
|
Host nfs
|
||||||
|
HostName 10.1.11.109
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
||||||
Host torrent
|
Host torrent
|
||||||
HostName 192.168.178.64
|
HostName 10.1.11.111
|
||||||
Port 22
|
|
||||||
User root
|
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
|
||||||
|
|
||||||
Host minecraft
|
|
||||||
HostName 192.168.178.59
|
|
||||||
Port 22
|
|
||||||
User root
|
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
|
||||||
|
|
||||||
Host ftb
|
|
||||||
HostName 192.168.178.61
|
|
||||||
Port 22
|
Port 22
|
||||||
User root
|
User root
|
||||||
IdentityFile /mnt/veracrypt1/proxmox
|
IdentityFile /mnt/veracrypt1/proxmox
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#+TITLE: Emacs Configuration from [[https://gitlab.com/TuDatTr/][TuDatTr]]
|
#+TITLE: Emacs Configuration from [[https://gitlab.com/TuDatTr/][TuDatTr]]
|
||||||
#+REVEAL_ROOT: https://cdn.jsdelivr.net/npm/reveal.js
|
#+SETUPFILE: ~/Templates/Org-Mode/setupfile.org
|
||||||
#+OPTIONS: n:t
|
#+OPTIONS: \n:t
|
||||||
|
|
||||||
* Preface
|
* Preface
|
||||||
Before installing and using emacs, emacs should be run as a daemon.
|
Before installing and using emacs, emacs should be run as a daemon.
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(unless (package-installed-p 'use-package)
|
(unless (package-installed-p 'use-package)
|
||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
|
|
||||||
(require 'use-package)
|
(require 'use-package)
|
||||||
(setq use-package-always-ensure t)
|
(setq use-package-always-ensure t)
|
||||||
|
@ -51,36 +51,37 @@
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:init
|
:init
|
||||||
(setq evil-want-keybinding nil)
|
(setq evil-want-keybinding nil)
|
||||||
:config
|
:config
|
||||||
(evil-mode 1)
|
(evil-mode 1)
|
||||||
(setq evil-search-module 'evil-search))
|
(setq evil-search-module 'evil-search))
|
||||||
|
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:config
|
:config
|
||||||
(evil-collection-init))
|
(evil-collection-init))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://github.com/abo-abo/swiper][Ivy]]/[[https://github.com/abo-abo/swiper][Counsil]]/[[https://github.com/abo-abo/swiper][Swiper]]
|
*** [[https://github.com/abo-abo/swiper][Ivy]]/[[https://github.com/abo-abo/swiper][Counsil]]/[[https://github.com/abo-abo/swiper][Swiper]]
|
||||||
=Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!=
|
=Ivy - a generic completion frontend for Emacs=
|
||||||
|
=Swiper - isearch with an overview, and more. Oh, man!=
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package prescient)
|
(use-package prescient)
|
||||||
|
|
||||||
(use-package ivy-prescient
|
(use-package ivy-prescient
|
||||||
:config
|
:config
|
||||||
(ivy-prescient-mode 1))
|
(ivy-prescient-mode 1))
|
||||||
|
|
||||||
(use-package ivy)
|
(use-package ivy)
|
||||||
|
|
||||||
(use-package counsel
|
(use-package counsel
|
||||||
:diminish counsel-mode
|
:diminish counsel-mode
|
||||||
:config
|
:config
|
||||||
(counsel-mode 1))
|
(counsel-mode 1))
|
||||||
|
|
||||||
(use-package swiper
|
(use-package swiper
|
||||||
:bind (("C-s" . 'swiper)))
|
:bind (("C-s" . 'swiper)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://magit.vc/][Magit]]
|
*** [[https://magit.vc/][Magit]]
|
||||||
|
@ -95,11 +96,11 @@
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package auctex
|
(use-package auctex
|
||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
(setq TeX-parse-self t)
|
(setq TeX-parse-self t)
|
||||||
(setq-default TeX-master nil)
|
(setq-default TeX-master nil)
|
||||||
(setq TeX-PDF-mode t))
|
(setq TeX-PDF-mode t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://github.com/yjwen/org-reveal][ox-reveal]]
|
*** [[https://github.com/yjwen/org-reveal][ox-reveal]]
|
||||||
|
@ -142,9 +143,9 @@
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
:config
|
:config
|
||||||
(setq yas-snippet-dirs '("~/.emacs.d/snippets/"))
|
(setq yas-snippet-dirs '("~/.emacs.d/snippets/"))
|
||||||
(yas-global-mode 1))
|
(yas-global-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://github.com/company-mode/company-mode][company-mode]]
|
*** [[https://github.com/company-mode/company-mode][company-mode]]
|
||||||
|
@ -152,8 +153,8 @@
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package company
|
(use-package company
|
||||||
:config
|
:config
|
||||||
(global-company-mode))
|
(global-company-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** [[https://github.com/flycheck/flycheck][flycheck]]
|
*** [[https://github.com/flycheck/flycheck][flycheck]]
|
||||||
|
@ -168,9 +169,18 @@
|
||||||
*** [[https://github.com/hniksic/emacs-htmlize][htmlize.el]]
|
*** [[https://github.com/hniksic/emacs-htmlize][htmlize.el]]
|
||||||
=Convert buffer text and decorations to HTML.=
|
=Convert buffer text and decorations to HTML.=
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package htmlize)
|
(use-package htmlize)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** [[https://github.com/k1LoW/emacs-ansible][ansible]]
|
||||||
|
=Ansible minor mode=
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package ansible
|
||||||
|
:config
|
||||||
|
(ansible 1))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* Appearance
|
* Appearance
|
||||||
This section is for appearance customization. Either via packages or manually.
|
This section is for appearance customization. Either via packages or manually.
|
||||||
|
@ -191,8 +201,9 @@
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook 'window-setup-hook
|
(add-hook 'window-setup-hook
|
||||||
'(lambda ()
|
'(lambda ()
|
||||||
(set-face-background 'default "unspecified-bg")))
|
(if not (display-graphic-p)
|
||||||
|
(set-face-background 'default "unspecified-bg"))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Menubar
|
** Menubar
|
||||||
|
@ -228,35 +239,38 @@
|
||||||
(setq org-pretty-entities t)
|
(setq org-pretty-entities t)
|
||||||
(setq org-src-fontify-natively t)))
|
(setq org-src-fontify-natively t)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Keybindings
|
*** Keybindings
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(define-key org-mode-map (kbd "C-c ,") 'org-insert-structure-template)
|
(define-key org-mode-map (kbd "C-c ,") 'org-insert-structure-template)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Enables specific languages for org-babel, so those languages can be used and compiled in code blocks and disable the compilation concirmation. The code afterwords enables proper indentation inside those source blocks.
|
Enables specific languages for org-babel, so those languages can be used and compiled in code blocks and disable the compilation confirmation. The code afterwords enables proper indentation inside those source blocks.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(org-babel-do-load-languages
|
(org-babel-do-load-languages
|
||||||
'org-babel-load-languages
|
'org-babel-load-languages
|
||||||
'((emacs-lisp . t)
|
'((emacs-lisp . t)
|
||||||
(C . t)
|
(C . t)
|
||||||
(makefile . t)
|
(makefile . t)
|
||||||
(shell . t)
|
(shell . t)
|
||||||
(latex . t)
|
(latex . t)
|
||||||
(python . t)))
|
(python . t)))
|
||||||
|
|
||||||
|
(setq org-confirm-babel-evaluate nil)
|
||||||
|
(setq org-src-tab-acts-natively t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
(setq org-confirm-babel-evaluate nil)
|
|
||||||
(setq org-src-tab-acts-natively t)
|
|
||||||
#+end_src
|
|
||||||
** C-Mode
|
** C-Mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook 'c-mode-hook
|
(add-hook 'c-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(display-line-numbers-mode 1)))
|
(display-line-numbers-mode 1)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** C++-Mode
|
** C++-Mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(add-hook 'c++-mode-hook
|
(add-hook 'c++-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(display-line-numbers-mode 1)))
|
(display-line-numbers-mode 1)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
|
'(auth-source-save-behavior nil)
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(go-mode yasnippet use-package theme-magic rainbow-mode rainbow-delimiters ox-twbs ox-reveal ox-hugo org-bullets no-littering moe-theme magit ivy-prescient god-mode evil-collection diminish counsel auctex)))
|
'(ansible yasnippet use-package theme-magic rainbow-mode rainbow-delimiters ox-twbs ox-reveal ox-hugo org-bullets no-littering moe-theme magit ivy-prescient htmlize god-mode go-mode flycheck evil-collection diminish counsel company auctex)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: function template
|
||||||
|
# key: /**
|
||||||
|
# --
|
||||||
|
/**
|
||||||
|
@brief $0
|
||||||
|
|
||||||
|
@param[in]
|
||||||
|
@result
|
||||||
|
*/
|
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- mode: snippet -*-
|
||||||
|
# name: lecture title
|
||||||
|
# key: lec
|
||||||
|
# --
|
||||||
|
Lecture - Number - Name
|
|
@ -3,4 +3,6 @@
|
||||||
# key: template
|
# key: template
|
||||||
# --
|
# --
|
||||||
#+TITLE: $0
|
#+TITLE: $0
|
||||||
#+SETUPFILE: ~/Templates/Org-Mode/setupfile.org
|
#+SETUPFILE: ~/Templates/Org-Mode/setupfile.org
|
||||||
|
|
||||||
|
$1
|
Loading…
Reference in New Issue