diff --git a/source/apache/index.rst b/source/apache/index.rst new file mode 100644 index 0000000..d74b6c5 --- /dev/null +++ b/source/apache/index.rst @@ -0,0 +1,3 @@ +###### +Apache +###### diff --git a/source/applications.rst b/source/applications.rst new file mode 100644 index 0000000..c8884a9 --- /dev/null +++ b/source/applications.rst @@ -0,0 +1,10 @@ +############ +Applications +############ + +.. toctree:: + :maxdepth: 2 + + nodejs/index + tomcat/index + glassfish/index diff --git a/source/apt/configure.rst b/source/apt/configure.rst new file mode 100644 index 0000000..acd527b --- /dev/null +++ b/source/apt/configure.rst @@ -0,0 +1,55 @@ +********* +Configure +********* + +Keys +==== + +.. code:: shell + + apt-key add "path/to/key/file" + +Configuration +============= + +* etc/apt/apt.conf + +:: + + APT::Get::Show-Versions true; + Dpkg::Progress-Fancy true; + + Acquire::Check-Valid-Until false; + +* etc/apt/preferences + +:: + + Package: * + Pin: release n=stretch-backports + Pin-Priority: 400 + + Package: * + Pin: release n=buster + Pin-Priority: 200 + + Package: * + Pin: release n=sid + Pin-Priority: 100 + +* etc/apt/sources.list + +deb.debian.org ↔ ftp.cc.debian.org +file:/path + +:: + + deb http://deb.debian.org/debian stretch main contrib non-free + deb http://deb.debian.org/debian stretch-backports main contrib non-free + deb http://deb.debian.org/debian stretch-updates main contrib non-free + deb http://security.debian.org stretch/updates main contrib non-free + + deb http://deb.debian.org/debian buster main contrib non-free + deb http://security.debian.org buster/updates main contrib non-free + + deb http://deb.debian.org/debian sid main contrib non-free diff --git a/source/apt/index.rst b/source/apt/index.rst new file mode 100644 index 0000000..8474a92 --- /dev/null +++ b/source/apt/index.rst @@ -0,0 +1,8 @@ +### +APT +### + +.. toctree:: + + configure + upgrade diff --git a/source/apt/upgrade.rst b/source/apt/upgrade.rst new file mode 100644 index 0000000..15c3806 --- /dev/null +++ b/source/apt/upgrade.rst @@ -0,0 +1,27 @@ +******* +Upgrade +******* + +Hold +==== + +Hold +---- + +.. code:: shell + + apt-mark hold linux-* + +Show +---- + +.. code:: shell + + apt-mark showhold + +Unhold +------ + +.. code:: shell + + apt-mark unhold linux-* diff --git a/source/archive.rst b/source/archive.rst new file mode 100644 index 0000000..c7a06c6 --- /dev/null +++ b/source/archive.rst @@ -0,0 +1,9 @@ +Archive +======= + +.. toctree:: + :maxdepth: 2 + + tar/index + squashfs-tools/index + xorriso/index diff --git a/source/bash/configure.rst b/source/bash/configure.rst new file mode 100644 index 0000000..2b9bff7 --- /dev/null +++ b/source/bash/configure.rst @@ -0,0 +1,421 @@ +********* +Configure +********* + +Configuration +============= + +* etc/bash.bashrc + +.. code:: bash + + file="/usr/share/bash-completion/bash_completion" + if [ -f "${file}" ]; then + source "${file}" + fi + + PS1="\ + ┌ \e[0;31m\t\e[0m\ + – \e[0;32m\${?}\e[0m\ + – \e[0;33m\u\e[0m\ + @ \e[0;34m\h\e[0m\ + " + if git --version &> /dev/null; then + PS1="${PS1} –\e[0;35m\$(__git_ps1)\e[0m" + fi + PS1="${PS1}\n\ + │\e[0;36m\${PWD}\e[0m\n\ + └ " + PS2="\ + └ " + + file="/etc/bash.alias" + if [ -f "${file}" ]; then + source "${file}" + fi + +Alias +===== + +* etc/bash.alias + +Described +--------- + +.. code:: bash + + # apt + + # update packages catalog + alias aud='apt-get update' + + # show package information + alias a='apt-cache show' + + # package versions policy + alias ap='apt-cache policy' + + # upgrade forbidding package installation or removal + alias aug='apt-get upgrade' + + # upgrade allowing package installation or removal + alias adu='apt-get dist-upgrade' + + # install packages + alias ai='apt-get install' + + # clean packages cache + alias ac='apt-get autoclean;apt-get clean;apt-get autoremove' + + # bash + + # clear terminal + alias c='clear' + + # exit terminal + alias x='exit' + + # change current directory to its parent + alias ..='cd ..' + + # make a directory + alias md='mkdir' + + # make a directory after making its parents + alias mdp='mkdir --parents' + + # change current directory to the previous one + alias pd='cd -' + + # change mode as directory + alias cmd='chmod 755' + + # change mode as file + alias cmf='chmod 644' + + # change owner as root + alias cor='chown 0:0' + + # change owner as user + alias cou='chown 1000:1000' + + # look for a string in processes names + alias pg='ps -A|grep' + + # kill a process by id + alias k='kill -9' + + # kill all instances of a process by name + alias ka='killall' + + # grep from current directory with regex + alias g='grep -rn . -e' + + # list current directory entries + alias l='ls --all --color -l -p --time-style="+%Y%m%d-%H%M%S%-:::z"' + + # git + + # add to index + alias ga='git add' + + # add all to index + alias gaa='git add --all' + + # create a branch + alias gb='git branch' + + # delete a branch + alias gbd='git branch --delete' + + # force a branch deletion + alias gbdf='git branch --delete --force' + + # list branches + alias gbl='git branch --all --list --verbose --verbose' + + # set the link to a remote branch from a local branch + alias gbu='git branch -u' + + # clone a remote repository + alias gc='git clone' + + # clean untracked files + alias gcf='git clean -d --force' + + # index all and commit + alias gacm='git add --all;git commit -m' + + # commit the index + alias gcm='git commit -m' + + # redo the last commit with a different message + alias gcma='git commit --amend -m' + + # make a root commit + alias gcmr='git commit --allow-empty --allow-empty-message -m ""' + + # switch to a branch or checkout file(s) from a commit + alias gco='git checkout' + + # checkout an orphan branch + alias gcoo='git checkout --orphan' + + # checkout development branch + alias gcod='git checkout dev' + + # checkout feature branch + alias gcof='git checkout f' + + # pick a commit + alias gcp='git cherry-pick' + + # abort the commit pick + alias gcpa='git cherry-pick --abort' + + # continue the commit pick + alias gcpc='git cherry-pick --continue' + + # configure the user name + alias gcun='git config user.name' + + # configure the user email + alias gcue='git config user.email' + + # differences from last or between commits + alias gd='git diff' + + # display what is indexed in cache + alias gdc='git diff --cached' + + # differences via external tool + alias gdt='git difftool --dir-diff' + + # differences via external tool + alias gdw='git diff --word-diff-regex=.' + + # fetch from the remote repository + alias gf='git fetch --tags --verbose' + + # fetch from remote repository and prune local orphan branches + alias gfp='git fetch --prune --tags --verbose' + + # garbage collect all orphan commits + alias ggc='git reflog expire --expire=now --all;git gc --prune=now' + + # initialize a new repository + alias gi='git init' + + # initialize a new bare repository + alias gib='git init --bare' + + # log commits history + alias gl='git log --all --graph \ + --format="%C(auto)%h%d %C(red)%ai%n%C(auto)%B"' + + # log commits history with patches + alias glp='git log --all --graph \ + --format="%C(auto)%h%d %C(red)%ai%n%C(auto)%B" --patch' + + # log medium information + alias glm='git log --all --decorate --graph --pretty=medium' + + # fast-forward to remote branch + alias gmf='git merge --ff-only' + + # do a merge commit + alias gmc='git merge --no-ff -m' + + # abort the current merge commit + alias gma='git merge --abort' + + # squash a branch and index its modifications + alias gms='git merge --squash' + + # merge via external tool + alias gmt='git mergetool' + + # push to the remote repository + alias gp='git push --set-upstream --verbose' + + # delete from the remote repository + alias gpd='git push --verbose --delete' + + # force the push to the remote repository + alias gpf='git push --set-upstream --verbose --force' + + # rebase current branch onto another + alias grb='git rebase' + + # abort current rebase + alias grba='git rebase --abort' + + # continue current rebase + alias grbc='git rebase --continue' + + # force rebase without fast-forward + alias grbf='git rebase --no-ff' + + # rebase interactively + alias grbi='git rebase --interactive' + + # list all remote repositories + alias grm='git remote' + + # add a new remote repository + alias grma='git remote add' + + # list remote repositories + alias grml='git remote --verbose' + + # show a connection to a repository + alias grms='git remote show' + + # set the location of the remote repository + alias grmu='git remote set-url' + + # remove file(s) from index or move current branch pointer + alias grs='git reset' + + # move current branch pointer to the development branch + alias grsd='git reset dev' + + # wipe modifications or reset current branch to another commit + alias grsh='git reset --hard' + + # reset current branch to the development branch + alias grshd='git reset --hard dev' + + # current state of repository + alias gs='git status --untracked-files=all' + + # show a commit + alias gsh='git show' + + # tag a commit + alias gt='git tag' + + # delete a tag + alias gtd='git tag --delete' + + # rsync + + # synchronize + alias rs='rsync --archive --no-whole-file --progress --verbose' + + # no synchronize + alias rsn='rsync --archive --no-whole-file --progress --verbose -n' + + # synchronize and delete + alias rsd='rsync --archive --no-whole-file --progress --verbose --delete' + + # synchronize and delete + alias rsdn='rsync --archive --no-whole-file --progress --verbose --delete -n' + +Old +--- + +.. code:: bash + + alias c="clear" + alias cmd="chmod 755" + alias cmf="chmod 644" + alias cor="chown 0:0" + alias cou="chown 1000:1000" + alias k="kill -9" + alias ka="killall -9" + alias l="ls --all --color=always -l \ + --indicator-style=slash --time-style=\"+%Y%m%d-%H%M%S%-:::z\"" + alias pg="ps -A|grep" + alias x="exit" + + alias a="apt-cache show" + alias ac="apt-get autoclean;apt-get clean;apt-get autoremove" + alias acl="apt-get changelog" + alias adl="apt-get download" + alias adu="apt-get dist-upgrade" + alias adus="apt-get dist-upgrade --simulate" + alias adub="apt-get dist-upgrade --target-release stretch-backports" + alias adubs="apt-get dist-upgrade --target-release stretch-backports --simulate" + alias af="apt-get --fix-broken install" + alias afs="apt-get --fix-broken install --simulate" + alias ai="apt-get install" + alias ais="apt-get install --simulate" + alias aib="apt-get install --target-release stretch-backports" + alias aibs="apt-get install --target-release stretch-backports --simulate" + alias ait="apt-get install --target-release testing" + alias aits="apt-get install --target-release testing --simulate" + alias aiu="apt-get install --target-release unstable" + alias aius="apt-get install --target-release unstable --simulate" + alias ap="apt-cache policy" + alias as="apt-cache search" + alias asrc="apt-get source" + alias aud="apt-get update" + alias aug="apt-get upgrade" + alias augs="apt-get upgrade --simulate" + alias augb="apt-get upgrade --target-release stretch-backports" + alias augbs="apt-get upgrade --target-release stretch-backports --simulate" + + alias ga="git add" + alias gaa="git add --all" + alias gb="git branch" + alias gbd="git branch --delete" + alias gbdf="git branch --delete --force" + alias gbl="git branch --all --list --verbose --verbose" + alias gbu="git branch -u" + alias gc="git clone" + alias gcf="git clean -d --force" + alias gcm="git commit -m" + alias gcma="git commit --amend -m" + alias gcme="git commit --allow-empty --allow-empty-message -m" + alias gco="git checkout" + alias gcob="git checkout -b" + alias gcoo="git checkout --orphan" + alias gcp="git cherry-pick" + alias gcpa="git cherry-pick --abort" + alias gcpc="git cherry-pick --continue" + alias gcue="git config user.email" + alias gcun="git config user.name" + alias gd="git diff" + alias gdc="git diff --word-diff-regex=." + alias gdt="git difftool --dir-diff" + alias gf="git fetch --tags --verbose" + alias gfsnr="git fsck --no-progress --no-reflogs" + alias ggc="git reflog expire --expire=now --all; git gc --prune=now" + alias gi="git init" + alias gib="git init --bare" + alias gl="git log --abbrev-commit --all --decorate --graph --format=oneline" + alias gla="git log --all --decorate --graph \ + --format=\"%C(auto)%h %C(red)%an%C(auto)%d %C(reset)%s\"" + alias glm="git log --all --decorate --graph --format=medium" + alias gma="git merge --abort" + alias gmc="git merge --no-ff -m" + alias gmf="git merge --ff-only" + alias gms="git merge --squash" + alias gmt="git mergetool" + alias gp="git push --set-upstream --tags --verbose" + alias gpd="git push --delete origin" + alias grb="git rebase" + alias grba="git rebase --abort" + alias grbc="git rebase --continue" + alias grbi="git rebase --interactive" + alias grma="git remote add origin" + alias grmc="git rm --cached" + alias grms="git remote show origin" + alias grmu="git remote set-url origin" + alias grs="git reset" + alias grsh="git reset --hard" + alias grshd="git reset --hard dev" + alias grshm="git reset --hard master" + alias gs="git status --untracked-files" + alias gsc="git show" + alias gt="git tag" + alias gtd="git tag --delete" + + alias rs="rsync --archive --progress --verbose" + alias rsn="rsync --archive --progress --verbose -n" + alias rsd="rsync --archive --progress --verbose --delete" + alias rsdn="rsync --archive --progress --verbose --delete -n" + + alias tc="tar --numeric-owner --verbose --create --auto-compress --file" + alias tx="tar --numeric-owner --verbose --extract --file" diff --git a/source/bash/index.rst b/source/bash/index.rst new file mode 100644 index 0000000..edca14f --- /dev/null +++ b/source/bash/index.rst @@ -0,0 +1,8 @@ +#### +BASH +#### + +.. toctree:: + + configure + snippets diff --git a/source/bash/snippets.rst b/source/bash/snippets.rst new file mode 100644 index 0000000..be6ea83 --- /dev/null +++ b/source/bash/snippets.rst @@ -0,0 +1,26 @@ +******** +Snippets +******** + +Start a runnable script file +============================ + +.. code:: bash + + #! /bin/bash + +Find out current script +======================= + +.. code:: bash + + SCRIPT_FILE="$(realpath "${BASH_SOURCE[0]}")" + SCRIPT_DIRECTORY="$(dirname "${SCRIPT_FILE}")" + SCRIPT_NAME="$(basename "${SCRIPT_FILE}")" + +Quit the interpreter +==================== + +.. code:: bash + + exit diff --git a/source/bind/index.rst b/source/bind/index.rst new file mode 100644 index 0000000..5a4520c --- /dev/null +++ b/source/bind/index.rst @@ -0,0 +1,3 @@ +#### +BIND +#### diff --git a/source/boot.rst b/source/boot.rst new file mode 100644 index 0000000..1ddeb5c --- /dev/null +++ b/source/boot.rst @@ -0,0 +1,10 @@ +#### +Boot +#### + +.. toctree:: + :maxdepth: 2 + + systemd/index + linux/index + grub/index diff --git a/source/certbot/index.rst b/source/certbot/index.rst new file mode 100644 index 0000000..a5089f2 --- /dev/null +++ b/source/certbot/index.rst @@ -0,0 +1,3 @@ +####### +CertBot +####### diff --git a/source/code.rst b/source/code.rst new file mode 100644 index 0000000..5b65fb4 --- /dev/null +++ b/source/code.rst @@ -0,0 +1,8 @@ +#### +Code +#### + +.. toctree:: + :maxdepth: 2 + + python3/index diff --git a/source/containerization.rst b/source/containerization.rst new file mode 100644 index 0000000..cc8ef02 --- /dev/null +++ b/source/containerization.rst @@ -0,0 +1,8 @@ +################ +Containerization +################ + +.. toctree:: + :maxdepth: 2 + + lxc/index diff --git a/source/data.rst b/source/data.rst new file mode 100644 index 0000000..ca544da --- /dev/null +++ b/source/data.rst @@ -0,0 +1,9 @@ +#### +Data +#### + +.. toctree:: + :maxdepth: 2 + + sql/index + postgresql/index diff --git a/source/desktop.rst b/source/desktop.rst new file mode 100644 index 0000000..fe23f48 --- /dev/null +++ b/source/desktop.rst @@ -0,0 +1,8 @@ +####### +Desktop +####### + +.. toctree:: + :maxdepth: 2 + + gnome/index diff --git a/source/documents.rst b/source/documents.rst new file mode 100644 index 0000000..32665e7 --- /dev/null +++ b/source/documents.rst @@ -0,0 +1,13 @@ +######### +Documents +######### + +.. toctree:: + :maxdepth: 2 + + pandoc/index + sphinx/index + markdown/index + restructuredtext/index + libreoffice/index + pdftk/index diff --git a/source/ffmpeg/index.rst b/source/ffmpeg/index.rst new file mode 100644 index 0000000..32d0d06 --- /dev/null +++ b/source/ffmpeg/index.rst @@ -0,0 +1,7 @@ +###### +FFMPEG +###### + +.. toctree:: + + snippets diff --git a/source/ffmpeg/snippets.rst b/source/ffmpeg/snippets.rst new file mode 100644 index 0000000..d94ff86 --- /dev/null +++ b/source/ffmpeg/snippets.rst @@ -0,0 +1,10 @@ +******** +Snippets +******** + +Change container +================ + +.. code:: bash + + ffmpeg -i input.avi output.mkv diff --git a/source/git/configure.rst b/source/git/configure.rst new file mode 100644 index 0000000..3d9ca44 --- /dev/null +++ b/source/git/configure.rst @@ -0,0 +1,19 @@ +********* +Configure +********* + +Identity +======== + +.. code:: shell + + git config user.name "First Last" + git config user.email "user@domain.tld" + +* ~/.gitconfig + +.. code:: ini + + [user] + name = "First Last" + email = "user@domain.tld" diff --git a/source/git/index.rst b/source/git/index.rst new file mode 100644 index 0000000..0b2cba7 --- /dev/null +++ b/source/git/index.rst @@ -0,0 +1,8 @@ +### +Git +### + +.. toctree:: + + configure + snippets diff --git a/source/git/snippets.rst b/source/git/snippets.rst new file mode 100644 index 0000000..9988023 --- /dev/null +++ b/source/git/snippets.rst @@ -0,0 +1,13 @@ +******** +Snippets +******** + +TODO +==== + +* .gitignore +* aliases +* git diff + + * cached (staging area) + * character diff --git a/source/glassfish/certify.rst b/source/glassfish/certify.rst new file mode 100644 index 0000000..7c51c73 --- /dev/null +++ b/source/glassfish/certify.rst @@ -0,0 +1,3 @@ +******************* +Certify application +******************* diff --git a/source/glassfish/configure.rst b/source/glassfish/configure.rst new file mode 100644 index 0000000..6ee633c --- /dev/null +++ b/source/glassfish/configure.rst @@ -0,0 +1,3 @@ +***************** +Configure service +***************** diff --git a/source/glassfish/deploy.rst b/source/glassfish/deploy.rst new file mode 100644 index 0000000..30b8632 --- /dev/null +++ b/source/glassfish/deploy.rst @@ -0,0 +1,3 @@ +****************** +Deploy application +****************** diff --git a/source/glassfish/index.rst b/source/glassfish/index.rst new file mode 100644 index 0000000..1a5c989 --- /dev/null +++ b/source/glassfish/index.rst @@ -0,0 +1,9 @@ +######### +GlassFish +######### + +.. toctree:: + + configure + deploy + certify diff --git a/source/gnome/configure.rst b/source/gnome/configure.rst new file mode 100644 index 0000000..d47343d --- /dev/null +++ b/source/gnome/configure.rst @@ -0,0 +1,54 @@ +********* +Configure +********* + +General +======= + +Settings +-------- + +* automatic date/time +* automatic timezone + +Tweak tool +---------- + +* dark theme + +dconf +----- + +* backgrounds +* updates + +Applications +============ + +Terminal (gnome-terminal) +------------------------- + +* dark variant +* colors +* infinite scroll + +Files (nautilus) +---------------- + +Settings + +Text editor (gedit) +------------------- + +Settings + +Plugins: +* git + +Keyboard shortcuts +------------------ + +Calculator +---------- + +Advanced mode diff --git a/source/gnome/index.rst b/source/gnome/index.rst new file mode 100644 index 0000000..bc4daea --- /dev/null +++ b/source/gnome/index.rst @@ -0,0 +1,6 @@ +##### +GNOME +##### + +.. toctree:: + configure diff --git a/source/gource/index.rst b/source/gource/index.rst new file mode 100644 index 0000000..0f3b040 --- /dev/null +++ b/source/gource/index.rst @@ -0,0 +1,7 @@ +###### +Gource +###### + +.. toctree:: + + render diff --git a/source/gource/render.rst b/source/gource/render.rst new file mode 100644 index 0000000..876e1e5 --- /dev/null +++ b/source/gource/render.rst @@ -0,0 +1,18 @@ +****** +Render +****** + +* TODO FFMPEG pipe + +.. code:: bash + + gource \ + --date-format "%Y - %m - %d / %H : %M : %S" \ + -f \ + --highlight-dirs \ + --highlight-users \ + --key \ + --output-framerate 60 \ + --start-date "yyyy-mm-dd HH:MM:SS" \ + --auto-skip-seconds 1 \ + --seconds-per-day 10 diff --git a/source/gpg/index.rst b/source/gpg/index.rst new file mode 100644 index 0000000..3a61534 --- /dev/null +++ b/source/gpg/index.rst @@ -0,0 +1,3 @@ +### +GPG +### diff --git a/source/grub/image.rst b/source/grub/image.rst new file mode 100644 index 0000000..477c0ae --- /dev/null +++ b/source/grub/image.rst @@ -0,0 +1,3 @@ +********** +Make image +********** diff --git a/source/grub/index.rst b/source/grub/index.rst new file mode 100644 index 0000000..07add72 --- /dev/null +++ b/source/grub/index.rst @@ -0,0 +1,8 @@ +#### +GRUB +#### + +.. toctree:: + + modules + image diff --git a/source/grub/modules.rst b/source/grub/modules.rst new file mode 100644 index 0000000..97cf153 --- /dev/null +++ b/source/grub/modules.rst @@ -0,0 +1,3 @@ +******* +Modules +******* diff --git a/source/hosts/index.rst b/source/hosts/index.rst new file mode 100644 index 0000000..19864d6 --- /dev/null +++ b/source/hosts/index.rst @@ -0,0 +1,12 @@ +***** +Hosts +***** + +LocalHost +========= + +:: + + ::1 localhost + + 127.0.0.1 localhost diff --git a/source/imagemagick/index.rst b/source/imagemagick/index.rst new file mode 100644 index 0000000..c3262a3 --- /dev/null +++ b/source/imagemagick/index.rst @@ -0,0 +1,7 @@ +########### +ImageMagick +########### + +.. toctree:: + + snippets diff --git a/source/imagemagick/snippets.rst b/source/imagemagick/snippets.rst new file mode 100644 index 0000000..89393b1 --- /dev/null +++ b/source/imagemagick/snippets.rst @@ -0,0 +1,3 @@ +******** +Snippets +******** diff --git a/source/index.rst b/source/index.rst index fb1d2ad..5a8cff8 100644 --- a/source/index.rst +++ b/source/index.rst @@ -1 +1,32 @@ .. toctree:: + + tasks + +.. toctree:: + :caption: Pro + :maxdepth: 3 + :numbered: 2 + + archive + documents + version + script + network + data + web + code + applications + security + system + boot + containerization + virtualization + +.. toctree:: + :caption: Home + :maxdepth: 3 + :numbered: 2 + + desktop + media + privacy diff --git a/source/isc-dhcp-server/index.rst b/source/isc-dhcp-server/index.rst new file mode 100644 index 0000000..dd57d3a --- /dev/null +++ b/source/isc-dhcp-server/index.rst @@ -0,0 +1,27 @@ +############### +ISC-DHCP-server +############### + +************* +Configuration +************* + +* /etc/dhcp/dhcpd.conf + +:: + + option domain-name "sub.domain.tld"; + option domain-name-servers 1.2.3.200; + + default-lease-time 600; + max-lease-time 7200; + + authoritative; + + subnet 1.2.3.0 netmask 255.255.255.0 { + range 1.2.3.123 1.2.3.128; + } + host name { + hardware ethernet 01:23:45:67:89:ab; + fixed-address 1.2.3.4; + } diff --git a/source/libreoffice/convert.rst b/source/libreoffice/convert.rst new file mode 100644 index 0000000..8cb59cc --- /dev/null +++ b/source/libreoffice/convert.rst @@ -0,0 +1,11 @@ +******* +Convert +******* + +.. code:: + + libreoffice \ + --headless \ + --convert-to "png" \ + --outdir "chemin/fichier.png" \ + input_file.o?? diff --git a/source/libreoffice/index.rst b/source/libreoffice/index.rst new file mode 100644 index 0000000..85fd5af --- /dev/null +++ b/source/libreoffice/index.rst @@ -0,0 +1,7 @@ +########### +LibreOffice +########### + +.. toctree:: + + convert diff --git a/source/linux/arguments.rst b/source/linux/arguments.rst new file mode 100644 index 0000000..cd7e59e --- /dev/null +++ b/source/linux/arguments.rst @@ -0,0 +1,3 @@ +********* +Arguments +********* diff --git a/source/linux/index.rst b/source/linux/index.rst new file mode 100644 index 0000000..859e4d3 --- /dev/null +++ b/source/linux/index.rst @@ -0,0 +1,8 @@ +##### +Linux +##### + +.. toctree:: + + arguments + modules diff --git a/source/linux/modules.rst b/source/linux/modules.rst new file mode 100644 index 0000000..97cf153 --- /dev/null +++ b/source/linux/modules.rst @@ -0,0 +1,3 @@ +******* +Modules +******* diff --git a/source/lxc/container.rst b/source/lxc/container.rst new file mode 100644 index 0000000..3bbad8a --- /dev/null +++ b/source/lxc/container.rst @@ -0,0 +1,3 @@ +********* +Container +********* diff --git a/source/lxc/host.rst b/source/lxc/host.rst new file mode 100644 index 0000000..e6187b3 --- /dev/null +++ b/source/lxc/host.rst @@ -0,0 +1,3 @@ +**** +Host +**** diff --git a/source/lxc/index.rst b/source/lxc/index.rst new file mode 100644 index 0000000..2d10a42 --- /dev/null +++ b/source/lxc/index.rst @@ -0,0 +1,8 @@ +### +LXC +### + +.. toctree:: + + host + container diff --git a/source/markdown/index.rst b/source/markdown/index.rst new file mode 100644 index 0000000..bb7e95d --- /dev/null +++ b/source/markdown/index.rst @@ -0,0 +1,7 @@ +######## +MarkDown +######## + +.. toctree:: + + syntax diff --git a/source/markdown/syntax.rst b/source/markdown/syntax.rst new file mode 100644 index 0000000..2afad77 --- /dev/null +++ b/source/markdown/syntax.rst @@ -0,0 +1,52 @@ +****** +Syntax +****** + +Titles +====== + +:: + + # title 1 + ## title 2 + ### title 3 + #### title 4 + ##### title 5 + ###### title 6 + +Lists +===== + +:: + + * element 1 + * element 2 + * element 2.1 + * element 2.2 + * element 2.2.1 + * element 2.2.2 + +Blocks +====== + +:: + + ```language + multi + line + message + ``` + +Links +===== + +:: + + [link_caption](link_address) + +Images +====== + +:: + + ![alternative_text](image_address) diff --git a/source/media.rst b/source/media.rst new file mode 100644 index 0000000..2bf1bc1 --- /dev/null +++ b/source/media.rst @@ -0,0 +1,10 @@ +##### +Media +##### + +.. toctree:: + :maxdepth: 2 + + imagemagick/index + ffmpeg/index + mkvtoolnix/index diff --git a/source/mkvtoolnix/index.rst b/source/mkvtoolnix/index.rst new file mode 100644 index 0000000..c68cb63 --- /dev/null +++ b/source/mkvtoolnix/index.rst @@ -0,0 +1,3 @@ +########## +MKVtoolnix +########## diff --git a/source/network.rst b/source/network.rst new file mode 100644 index 0000000..39eb75d --- /dev/null +++ b/source/network.rst @@ -0,0 +1,9 @@ +Network +======= + +.. toctree:: + :maxdepth: 2 + + bind/index + hosts/index + isc-dhcp-server/index diff --git a/source/nginx/configure.rst b/source/nginx/configure.rst new file mode 100644 index 0000000..b96e1e2 --- /dev/null +++ b/source/nginx/configure.rst @@ -0,0 +1,77 @@ +********* +Configure +********* + +* /etc/nginx/nginx.conf + +.. code:: + + pid /run/nginx.pid; + user user; + worker_processes auto; + + events { + multi_accept off; + worker_connections 512; + } + + http { + # General + + keepalive_timeout 60; + sendfile on; + server_tokens off; + tcp_nopush on; + tcp_nodelay on; + types_hash_max_size 2048; + + # Names + + server_name_in_redirect off; + server_names_hash_bucket_size 128; + + # File types + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + # Security + + ssl_buffer_size 8k; + ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-SHA384,ECDHE-ECDSA-AES256-SHA384,ECDHE-RSA-AES256-SHA,ECDHE-ECDSA-AES256-SHA,DHE-DSS-AES256-GCM-SHA384,DHE-RSA-AES256-GCM-SHA384,DHE-RSA-AES256-SHA256,DHE-DSS-AES256-SHA256,DHE-RSA-AES256-SHA,DHE-DSS-AES256-SHA"; + ssl_dhparam /etc/nginx/dhparam; + ssl_ecdh_curve secp384r1; + ssl_prefer_server_ciphers on; + ssl_protocols TLSv1.2; + ssl_session_cache shared:ssl_session_cache:16m; + ssl_session_timeout 15m; + + # Log + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + # Compression + + gzip on; + gzip_buffers 32 8k; + gzip_comp_level 5; + gzip_http_version 1.1; + gzip_proxied any; + gzip_types *; + gzip_vary off; + + # Misc + + add_header Strict-Transport-Security max-age=31557600; + client_max_body_size 16m; + index index.html; + proxy_pass_request_body on; + proxy_pass_request_headers on; + proxy_redirect off; + + # Includes + + include /etc/nginx/sites-enabled/*; + } + diff --git a/source/nginx/index.rst b/source/nginx/index.rst new file mode 100644 index 0000000..662a780 --- /dev/null +++ b/source/nginx/index.rst @@ -0,0 +1,8 @@ +##### +NginX +##### + +.. toctree:: + + configure + serve diff --git a/source/nginx/serve.rst b/source/nginx/serve.rst new file mode 100644 index 0000000..443eeec --- /dev/null +++ b/source/nginx/serve.rst @@ -0,0 +1,37 @@ +***** +Serve +***** + +* /etc/nginx/sites-available/… + +.. code:: + + server { + listen 80; + server_name _; + location "/mirrors" { + root "/"; + autoindex on; + } + location "/" { + root "/data/http"; + autoindex on; + } + } + server { + listen 443 ssl http2; + server_name "sous.domaine.tld"; + ssl_certificate "/etc/nginx/certificates/nom.crt"; + ssl_certificate_key "/etc/nginx/certificates/nom.key"; + location "/static" { + root "/data/https"; + default_type "text/html"; + index "index.html"; + } + location "/" { + proxy_pass "http://127.0.0.1:8069"; + proxy_redirect off; + proxy_set_header Host $host; + } + } + diff --git a/source/nodejs/index.rst b/source/nodejs/index.rst new file mode 100644 index 0000000..dd28dac --- /dev/null +++ b/source/nodejs/index.rst @@ -0,0 +1,3 @@ +###### +NodeJS +###### diff --git a/source/openssl/index.rst b/source/openssl/index.rst new file mode 100644 index 0000000..426da90 --- /dev/null +++ b/source/openssl/index.rst @@ -0,0 +1,3 @@ +####### +OpenSSL +####### diff --git a/source/pandoc/build.rst b/source/pandoc/build.rst new file mode 100644 index 0000000..ebb4fb4 --- /dev/null +++ b/source/pandoc/build.rst @@ -0,0 +1,42 @@ +***** +Build +***** + +Formats +======= + +Documents +--------- + +* html5 +* odt +* docx +* latex (--latex-engine="xelatex") + +Presentations +------------- + +* beamer +* dzslides +* revealjs +* s5 +* slideous +* slidy + +Generation +========== + +.. code:: shell + + pandoc \ + --data-dir="directory/path" \ + --from="markdown" \ + "input_file" \ + --to="html5" \ + --output="output_file" \ + --standalone \ + --number-sections \ + --toc \ + --toc-depth=3 \ + --template="template_name" \ + --css="style/relative/path" diff --git a/source/pandoc/index.rst b/source/pandoc/index.rst new file mode 100644 index 0000000..7aef516 --- /dev/null +++ b/source/pandoc/index.rst @@ -0,0 +1,7 @@ +###### +PanDoc +###### + +.. toctree:: + + build diff --git a/source/pdftk/index.rst b/source/pdftk/index.rst new file mode 100644 index 0000000..58a2b4d --- /dev/null +++ b/source/pdftk/index.rst @@ -0,0 +1,3 @@ +##### +PDFtk +##### diff --git a/source/postgresql/configure.rst b/source/postgresql/configure.rst new file mode 100644 index 0000000..6ee633c --- /dev/null +++ b/source/postgresql/configure.rst @@ -0,0 +1,3 @@ +***************** +Configure service +***************** diff --git a/source/postgresql/create.rst b/source/postgresql/create.rst new file mode 100644 index 0000000..975040d --- /dev/null +++ b/source/postgresql/create.rst @@ -0,0 +1,3 @@ +*************** +Create database +*************** diff --git a/source/postgresql/index.rst b/source/postgresql/index.rst new file mode 100644 index 0000000..9e8cae6 --- /dev/null +++ b/source/postgresql/index.rst @@ -0,0 +1,7 @@ +########## +PostGreSQL +########## + +.. toctree:: + configure + create diff --git a/source/privacy.rst b/source/privacy.rst new file mode 100644 index 0000000..1676c47 --- /dev/null +++ b/source/privacy.rst @@ -0,0 +1,9 @@ +Privacy +======= + +.. toctree:: + :maxdepth: 2 + + certbot/index + tcplay/index + gpg/index diff --git a/source/python3/index.rst b/source/python3/index.rst new file mode 100644 index 0000000..621cf65 --- /dev/null +++ b/source/python3/index.rst @@ -0,0 +1,8 @@ +####### +Python3 +####### + +.. toctree:: + + syntax + snippets diff --git a/source/python3/snippets.rst b/source/python3/snippets.rst new file mode 100644 index 0000000..c3a019a --- /dev/null +++ b/source/python3/snippets.rst @@ -0,0 +1,21 @@ +******** +Snippets +******** + +Répertoires +=========== + +Détruire +-------- + +.. code:: python3 + + import shutil + shutil.rmtree(path) + +Web +=== + +.. code:: python3 + + requests.get(url).content.decode(charset) diff --git a/source/python3/syntax.rst b/source/python3/syntax.rst new file mode 100644 index 0000000..978f0a9 --- /dev/null +++ b/source/python3/syntax.rst @@ -0,0 +1,20 @@ +****** +Syntax +****** + +Imports +======= + +.. code:: python3 + + import module + +module.py → module/__init__.py +------------------------------ + +* __init__.py + +first/module.py → second/module.py +---------------------------------- + +* first diff --git a/source/restructuredtext/image.png b/source/restructuredtext/image.png new file mode 100644 index 0000000..b95c77d Binary files /dev/null and b/source/restructuredtext/image.png differ diff --git a/source/restructuredtext/index.rst b/source/restructuredtext/index.rst new file mode 100644 index 0000000..7e95e29 --- /dev/null +++ b/source/restructuredtext/index.rst @@ -0,0 +1,8 @@ +################ +ReStructuredText +################ + +.. toctree:: + + tree + syntax diff --git a/source/restructuredtext/syntax.rst b/source/restructuredtext/syntax.rst new file mode 100644 index 0000000..0877b8f --- /dev/null +++ b/source/restructuredtext/syntax.rst @@ -0,0 +1,78 @@ +****** +Syntax +****** + +Sections +======== + +.. code:: restructuredtext + + #### + Part + #### + + ******* + Chapter + ******* + + Section + ======= + + SubSection + ---------- + + SubSubSection + ^^^^^^^^^^^^^ + + Paragraph + """"""""" + +ToSort +====== + +.. code:: restructuredtext + + .. raw:: html + +
+ +* *1 star* +* **2 stars** +* ``2 backquotes`` + +After this comma, +| output new line + + +.. comment + +.. + multiline + + comment + +.. image:: image.png + +Indent 0 + + Indent 1 which + continues here. + + Indent 2 + +* item + + * subitem + +* item + +#. first +#. second + +---- + +.. epigraph:: + + No matter where you go, there you are. + + -- Buckaroo Banzai diff --git a/source/restructuredtext/tree.rst b/source/restructuredtext/tree.rst new file mode 100644 index 0000000..6789b5d --- /dev/null +++ b/source/restructuredtext/tree.rst @@ -0,0 +1,7 @@ +**** +Tree +**** + +.. code:: + + index diff --git a/source/rsync/index.rst b/source/rsync/index.rst new file mode 100644 index 0000000..b580cf6 --- /dev/null +++ b/source/rsync/index.rst @@ -0,0 +1,7 @@ +##### +Rsync +##### + +.. toctree:: + + snippets diff --git a/source/rsync/snippets.rst b/source/rsync/snippets.rst new file mode 100644 index 0000000..c26a232 --- /dev/null +++ b/source/rsync/snippets.rst @@ -0,0 +1,17 @@ +******** +Snippets +******** + +Simulate sync with deletion +=========================== + +.. code:: bash + + rsync \ + --archive \ + --no-whole-file \ + --progress \ + --verbose \ + --delete --dry-run + "/local/directory/" \ + "user@host:/remote/directory/" diff --git a/source/script.rst b/source/script.rst new file mode 100644 index 0000000..9760ebb --- /dev/null +++ b/source/script.rst @@ -0,0 +1,9 @@ +###### +Script +###### + +.. toctree:: + :maxdepth: 2 + + bash/index + rsync/index diff --git a/source/security.rst b/source/security.rst new file mode 100644 index 0000000..a020487 --- /dev/null +++ b/source/security.rst @@ -0,0 +1,8 @@ +######## +Security +######## + +.. toctree:: + :maxdepth: 2 + + openssl/index diff --git a/source/sphinx/build.rst b/source/sphinx/build.rst new file mode 100644 index 0000000..a4fdaf6 --- /dev/null +++ b/source/sphinx/build.rst @@ -0,0 +1,3 @@ +******************* +Build documentation +******************* diff --git a/source/sphinx/configure.rst b/source/sphinx/configure.rst new file mode 100644 index 0000000..4964497 --- /dev/null +++ b/source/sphinx/configure.rst @@ -0,0 +1,13 @@ +*********************** +Configure documentation +*********************** + +MarkDown +======== + +.. code:: python3 + + source_parsers = { + '.md': 'recommonmark.parser.CommonMarkParser', + } + source_suffix = ['.rst', '.md'] diff --git a/source/sphinx/create.rst b/source/sphinx/create.rst new file mode 100644 index 0000000..2cfae80 --- /dev/null +++ b/source/sphinx/create.rst @@ -0,0 +1,3 @@ +******************** +Create documentation +******************** diff --git a/source/sphinx/index.rst b/source/sphinx/index.rst new file mode 100644 index 0000000..088c028 --- /dev/null +++ b/source/sphinx/index.rst @@ -0,0 +1,10 @@ +###### +Sphinx +###### + +.. toctree:: + + install + configure + create + build diff --git a/source/sphinx/install.rst b/source/sphinx/install.rst new file mode 100644 index 0000000..0509b11 --- /dev/null +++ b/source/sphinx/install.rst @@ -0,0 +1,9 @@ +******* +Install +******* + +.. code:: shell + + python3-sphinx + python3-sphinx-rtd-theme + python3-recommonmark diff --git a/source/sql/index.rst b/source/sql/index.rst new file mode 100644 index 0000000..c2ca329 --- /dev/null +++ b/source/sql/index.rst @@ -0,0 +1,8 @@ +### +SQL +### + +.. toctree:: + + syntax + snippets diff --git a/source/sql/snippets.rst b/source/sql/snippets.rst new file mode 100644 index 0000000..89393b1 --- /dev/null +++ b/source/sql/snippets.rst @@ -0,0 +1,3 @@ +******** +Snippets +******** diff --git a/source/sql/syntax.rst b/source/sql/syntax.rst new file mode 100644 index 0000000..2c53af4 --- /dev/null +++ b/source/sql/syntax.rst @@ -0,0 +1,3 @@ +****** +Syntax +****** diff --git a/source/squashfs-tools/index.rst b/source/squashfs-tools/index.rst new file mode 100644 index 0000000..d8ff447 --- /dev/null +++ b/source/squashfs-tools/index.rst @@ -0,0 +1,3 @@ +############## +SquashFS-tools +############## diff --git a/source/system.rst b/source/system.rst new file mode 100644 index 0000000..d3d5450 --- /dev/null +++ b/source/system.rst @@ -0,0 +1,8 @@ +###### +System +###### + +.. toctree:: + :maxdepth: 2 + + apt/index diff --git a/source/systemd/index.rst b/source/systemd/index.rst new file mode 100644 index 0000000..fbebc14 --- /dev/null +++ b/source/systemd/index.rst @@ -0,0 +1,8 @@ +####### +SystemD +####### + +.. toctree:: + + system + journal diff --git a/source/systemd/journal.rst b/source/systemd/journal.rst new file mode 100644 index 0000000..aade4db --- /dev/null +++ b/source/systemd/journal.rst @@ -0,0 +1,3 @@ +*************** +Control journal +*************** diff --git a/source/systemd/system.rst b/source/systemd/system.rst new file mode 100644 index 0000000..a4f9575 --- /dev/null +++ b/source/systemd/system.rst @@ -0,0 +1,3 @@ +************** +Control system +************** diff --git a/source/tar/index.rst b/source/tar/index.rst new file mode 100644 index 0000000..b9b92e7 --- /dev/null +++ b/source/tar/index.rst @@ -0,0 +1,3 @@ +### +TAr +### diff --git a/source/tasks.rst b/source/tasks.rst new file mode 100644 index 0000000..3d3ddef --- /dev/null +++ b/source/tasks.rst @@ -0,0 +1,3 @@ +##### +Tasks +##### diff --git a/source/tcplay/index.rst b/source/tcplay/index.rst new file mode 100644 index 0000000..62e1de7 --- /dev/null +++ b/source/tcplay/index.rst @@ -0,0 +1,3 @@ +###### +TCplay +###### diff --git a/source/tomcat/certify.rst b/source/tomcat/certify.rst new file mode 100644 index 0000000..7c51c73 --- /dev/null +++ b/source/tomcat/certify.rst @@ -0,0 +1,3 @@ +******************* +Certify application +******************* diff --git a/source/tomcat/configure.rst b/source/tomcat/configure.rst new file mode 100644 index 0000000..6ee633c --- /dev/null +++ b/source/tomcat/configure.rst @@ -0,0 +1,3 @@ +***************** +Configure service +***************** diff --git a/source/tomcat/deploy.rst b/source/tomcat/deploy.rst new file mode 100644 index 0000000..30b8632 --- /dev/null +++ b/source/tomcat/deploy.rst @@ -0,0 +1,3 @@ +****************** +Deploy application +****************** diff --git a/source/tomcat/index.rst b/source/tomcat/index.rst new file mode 100644 index 0000000..633977f --- /dev/null +++ b/source/tomcat/index.rst @@ -0,0 +1,9 @@ +###### +TomCat +###### + +.. toctree:: + + configure + deploy + certify diff --git a/source/version.rst b/source/version.rst new file mode 100644 index 0000000..63ef20c --- /dev/null +++ b/source/version.rst @@ -0,0 +1,9 @@ +####### +Version +####### + +.. toctree:: + :maxdepth: 2 + + git/index + gource/index diff --git a/source/virtualbox/index.rst b/source/virtualbox/index.rst new file mode 100644 index 0000000..d1cfe6e --- /dev/null +++ b/source/virtualbox/index.rst @@ -0,0 +1,3 @@ +########## +VirtualBox +########## diff --git a/source/virtualization.rst b/source/virtualization.rst new file mode 100644 index 0000000..52c5d63 --- /dev/null +++ b/source/virtualization.rst @@ -0,0 +1,8 @@ +############## +Virtualization +############## + +.. toctree:: + :maxdepth: 2 + + virtualbox/index diff --git a/source/web.rst b/source/web.rst new file mode 100644 index 0000000..6140b0a --- /dev/null +++ b/source/web.rst @@ -0,0 +1,9 @@ +### +Web +### + +.. toctree:: + :maxdepth: 2 + + nginx/index + apache/index diff --git a/source/xorriso/index.rst b/source/xorriso/index.rst new file mode 100644 index 0000000..0423d05 --- /dev/null +++ b/source/xorriso/index.rst @@ -0,0 +1,3 @@ +####### +XoRRISO +#######