From a7fd4554c0ca65a07e77a377c0f8ba7ae285d697 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Sun, 28 Aug 2022 15:00:56 +0200 Subject: [PATCH 01/10] include default config in zshrc file --- config_files/.zshrc | 109 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 7 deletions(-) diff --git a/config_files/.zshrc b/config_files/.zshrc index 3e07ae0..70077b9 100644 --- a/config_files/.zshrc +++ b/config_files/.zshrc @@ -5,15 +5,110 @@ # ---------------------------------------------------- -# configs from old file -# i'm not sure what to do with them -# will it work on another computer ? +# default configs # ---------------------------------------------------- -export ZSH="$HOME/.oh-my-zsh" -ZSH_THEME="robbyrussell" -plugins=(git) -source $ZSH/oh-my-zsh.sh + # If you come from bash you might have to change your $PATH. + # export PATH=$HOME/bin:/usr/local/bin:$PATH + + # Path to your oh-my-zsh installation. + export ZSH="$HOME/.oh-my-zsh" + + # Set name of the theme to load --- if set to "random", it will + # load a random theme each time oh-my-zsh is loaded, in which case, + # to know which specific one was loaded, run: echo $RANDOM_THEME + # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes + ZSH_THEME="robbyrussell" + + # Set list of themes to pick from when loading at random + # Setting this variable when ZSH_THEME=random will cause zsh to load + # a theme from this variable instead of looking in $ZSH/themes/ + # If set to an empty array, this variable will have no effect. + # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + + # Uncomment the following line to use case-sensitive completion. + # CASE_SENSITIVE="true" + + # Uncomment the following line to use hyphen-insensitive completion. + # Case-sensitive completion must be off. _ and - will be interchangeable. + # HYPHEN_INSENSITIVE="true" + + # Uncomment one of the following lines to change the auto-update behavior + # zstyle ':omz:update' mode disabled # disable automatic updates + # zstyle ':omz:update' mode auto # update automatically without asking + # zstyle ':omz:update' mode reminder # just remind me to update when it's time + + # Uncomment the following line to change how often to auto-update (in days). + # zstyle ':omz:update' frequency 13 + + # Uncomment the following line if pasting URLs and other text is messed up. + # DISABLE_MAGIC_FUNCTIONS="true" + + # Uncomment the following line to disable colors in ls. + # DISABLE_LS_COLORS="true" + + # Uncomment the following line to disable auto-setting terminal title. + # DISABLE_AUTO_TITLE="true" + + # Uncomment the following line to enable command auto-correction. + # ENABLE_CORRECTION="true" + + # Uncomment the following line to display red dots whilst waiting for completion. + # You can also set it to another string to have that shown instead of the default red dots. + # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" + # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) + # COMPLETION_WAITING_DOTS="true" + + # Uncomment the following line if you want to disable marking untracked files + # under VCS as dirty. This makes repository status check for large repositories + # much, much faster. + # DISABLE_UNTRACKED_FILES_DIRTY="true" + + # Uncomment the following line if you want to change the command execution time + # stamp shown in the history command output. + # You can set one of the optional three formats: + # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" + # or set a custom format using the strftime function format specifications, + # see 'man strftime' for details. + # HIST_STAMPS="mm/dd/yyyy" + + # Would you like to use another custom folder than $ZSH/custom? + # ZSH_CUSTOM=/path/to/new-custom-folder + + # Which plugins would you like to load? + # Standard plugins can be found in $ZSH/plugins/ + # Custom plugins may be added to $ZSH_CUSTOM/plugins/ + # Example format: plugins=(rails git textmate ruby lighthouse) + # Add wisely, as too many plugins slow down shell startup. + plugins=(git) + + source $ZSH/oh-my-zsh.sh + + # User configuration + + # export MANPATH="/usr/local/man:$MANPATH" + + # You may need to manually set your language environment + # export LANG=en_US.UTF-8 + + # Preferred editor for local and remote sessions + # if [[ -n $SSH_CONNECTION ]]; then + # export EDITOR='vim' + # else + # export EDITOR='mvim' + # fi + + # Compilation flags + # export ARCHFLAGS="-arch x86_64" + + # Set personal aliases, overriding those provided by oh-my-zsh libs, + # plugins, and themes. Aliases can be placed here, though oh-my-zsh + # users are encouraged to define aliases within the ZSH_CUSTOM folder. + # For a full list of active aliases, run `alias`. + # + # Example aliases + # alias zshconfig="mate ~/.zshrc" + # alias ohmyzsh="mate ~/.oh-my-zsh" From 39ba314aea1f8c3743e220bc4be1d0e0d8f32922 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Sun, 28 Aug 2022 16:32:12 +0200 Subject: [PATCH 02/10] add computer tuto and removed some tutos --- config_files/.screenrc | 9 ++++++--- tutos/computer.txt | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tutos/computer.txt diff --git a/config_files/.screenrc b/config_files/.screenrc index 28fd6b8..0d80a14 100644 --- a/config_files/.screenrc +++ b/config_files/.screenrc @@ -41,14 +41,17 @@ bind F eval "hardstatus alwayslastline" chdir $HOME/huhuhu_config screen chdir $HOME/huhuhu_config/tutos + screen -t tutos_shell vim -n shell.txt screen -t tutos_git vim -n git.txt screen -t tutos_screen vim -n screen.txt -screen -t tutos_node vim -n node.txt -screen -t tutos_react vim -n react.txt -screen -t tutos_php vim -n php.txt +#screen -t tutos_node vim -n node.txt +#screen -t tutos_react vim -n react.txt +#screen -t tutos_php vim -n php.txt screen -t tutos_sites vim -n sites.txt screen -t tutos_vim vim -n vim.txt +screen -t tutos_computer vim -n computer.txt + chdir $HOME screen diff --git a/tutos/computer.txt b/tutos/computer.txt new file mode 100644 index 0000000..67652f4 --- /dev/null +++ b/tutos/computer.txt @@ -0,0 +1,4 @@ +**touchscreen :** + **sudo xinput --list** list all input + **xinput disable 12** disable the input 12, touchscreen for Lenovo-FLEX-3-1120 + **load to start :** add "xinput disable 12" in application autostart From e78d7fa73b668e7d73deddb70c7d76ef9310e577 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Sun, 28 Aug 2022 18:42:25 +0200 Subject: [PATCH 03/10] added some content to tuto computer --- tutos/computer.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tutos/computer.txt b/tutos/computer.txt index 67652f4..a85225d 100644 --- a/tutos/computer.txt +++ b/tutos/computer.txt @@ -2,3 +2,18 @@ **sudo xinput --list** list all input **xinput disable 12** disable the input 12, touchscreen for Lenovo-FLEX-3-1120 **load to start :** add "xinput disable 12" in application autostart + +**appimage :** + **chmod +x .appimage** make it executable + **sudo vim /usr/share/applications/.desktop** create a file.desktop with content : + [Desktop Entry] + Exec=/absolute/path/to/file/.AppImage + Name= + Type=Application + **( cd /usr/share/applications && chmod 644 .desktop )** maybe change permissions + +**firefox extension source code** + **right click on install** and select "copy link" + **curl -L > /tmp/myextension.xpi** download the extension with curl inside a tmp file + **unzip /tmp/myextension.xpi -d /tmp/myextension** unzip the content + enjoy reading it ;) From 6bc33cb8fbd6e06afefaa0f3aa3c11a8d5572ed5 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Sun, 28 Aug 2022 19:47:37 +0200 Subject: [PATCH 04/10] added variable in vimrc to allow better comportment with explore buffer and alternate buffer --- config_files/.vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config_files/.vimrc b/config_files/.vimrc index efed60f..b7d5e22 100644 --- a/config_files/.vimrc +++ b/config_files/.vimrc @@ -55,6 +55,10 @@ set number " don't allow wrap set nowrap +" using alternate buffer, ':b#', comes back to last file, and not explore buffer +" see :help g:netrw_altfile +let g:netrw_altfile = 1 + "--------------------------------------------------------------- From c0ff122c97c9ca48be9c19802d8150d8a97401fe Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Mon, 29 Aug 2022 13:22:33 +0200 Subject: [PATCH 05/10] changes vimrc Explore variable --- config_files/.vimrc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config_files/.vimrc b/config_files/.vimrc index b7d5e22..2952a2a 100644 --- a/config_files/.vimrc +++ b/config_files/.vimrc @@ -55,9 +55,20 @@ set number " don't allow wrap set nowrap -" using alternate buffer, ':b#', comes back to last file, and not explore buffer +" using alternate buffer with Explore, ':b#' +" =0 ot go back to explore buffer +" =1 ot go back to last edited file " see :help g:netrw_altfile -let g:netrw_altfile = 1 +" ! not good : +" with =1 the alternate buffer is not changed, so +" las edited file is not last file before Explore, but the previous one +" use :Lexplore instead of :Explore +"let g:netrw_altfile = 0 + +" choose how to print list in :Explore window +" =0 is default +" =3 is tree style +let g:netrw_liststyle = 3 From 90985a82b03f8f9626417e2ab3058407bb6d6db7 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Mon, 29 Aug 2022 13:25:59 +0200 Subject: [PATCH 06/10] added infos in vim tutos about explore buffer --- tutos/vim.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutos/vim.txt b/tutos/vim.txt index 7a50417..1836419 100644 --- a/tutos/vim.txt +++ b/tutos/vim.txt @@ -23,7 +23,9 @@ **:bn** go to next buffer **:bd** delete buffer **:b#** switch to last edited buffer - **:explore / :ex** navigate through directory, rename, and plus + **:Explore / :ex** navigate through directory, rename, and plus + **:Lexplore / :Lex** buffer directory open in left split window + **:Lexplore 30** Explore window is of size 30 **search through files :** **:vim** the one function that gets to be name as the software ;) performes a kind of grep search on a list of files From 6ccd5915daf9f9c8c906ed5b8a092b71a81fd4a0 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Tue, 30 Aug 2022 11:38:30 +0200 Subject: [PATCH 07/10] added aciton in install : declar vim as default editor for git --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 813b18e..57a062b 100644 --- a/install.sh +++ b/install.sh @@ -12,6 +12,10 @@ D_CONFIG_FILES="config_files" mkdir -p ~/.vim/templates mkdir -p ~/.vim/swapfiles +# tells git to use vim as default editor +echo -e $MAGENTA"declared vim as default editor for git"$ENDCO +git config --global core.editor "vim" + # receive 1 argument : absolute path to config file function save_bak { @@ -80,3 +84,4 @@ install "$HOME/.vim/templates/skeleton.cpp" install "$HOME/.vim/templates/skeleton.hpp" install "$HOME/.vim/templates/skeleton_main.cpp" install "$HOME/.vim/templates/skeleton_makefile" + From c49ec6ce728c1b85f916f12d1f94bd699a8e12ab Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Tue, 30 Aug 2022 12:03:48 +0200 Subject: [PATCH 08/10] added tuto computer how to use accent on qwerty keyboard --- tutos/computer.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tutos/computer.txt b/tutos/computer.txt index a85225d..7d6c303 100644 --- a/tutos/computer.txt +++ b/tutos/computer.txt @@ -17,3 +17,9 @@ **curl -L > /tmp/myextension.xpi** download the extension with curl inside a tmp file **unzip /tmp/myextension.xpi -d /tmp/myextension** unzip the content enjoy reading it ;) + +**enable accents on ubuntu** + **compose key = right alt** change in keyboard > layout > compose key + **r-alt ' e** é + **r-alt ` e** è + From 27143d547824f39d37a2d52fbf17ba7934c1ba9a Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Wed, 31 Aug 2022 19:30:15 +0200 Subject: [PATCH 09/10] added in tuto vim how to open file under cursor --- install.sh | 11 +++++++++++ tutos/vim.txt | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 57a062b..5312b3e 100644 --- a/install.sh +++ b/install.sh @@ -16,6 +16,17 @@ mkdir -p ~/.vim/swapfiles echo -e $MAGENTA"declared vim as default editor for git"$ENDCO git config --global core.editor "vim" +# install those package : +# vim +# wget +# vlc +# signal-desktop +# element-desktop +# nextcloud-desktop +# transmission +# htop +# build-essential (gcc g++ make etc...) + # receive 1 argument : absolute path to config file function save_bak { diff --git a/tutos/vim.txt b/tutos/vim.txt index 1836419..705eee4 100644 --- a/tutos/vim.txt +++ b/tutos/vim.txt @@ -123,11 +123,12 @@ **guu** passe la ligne en lowercase **bgUw** change le mot en uppercase **~** change casse du caractere sous le cursor -* va a la prochaine occurence du mot sous le curseur +***** va a la prochaine occurence du mot sous le curseur **q:** affiche les dernieres commandes **==** rétablit la bonne indentation pour la ligne **=G** rétablit la bonne indentation pour toute la page **''** go to last cursor position +**gx** open the file under cursor, or url /REMPLACER/ **:s/old/new** remplace la 1ere occurence de ancien par nouveau From 1618f36dca7864d535a629f1a522c8d606f0ff36 Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Sun, 2 Oct 2022 13:59:18 +0200 Subject: [PATCH 10/10] tuto connection ssh + tuto git create and switch to new branch + list sites --- tutos/computer.txt | 9 +++++++-- tutos/git.txt | 1 + tutos/sites.txt | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tutos/computer.txt b/tutos/computer.txt index 7d6c303..c4b3071 100644 --- a/tutos/computer.txt +++ b/tutos/computer.txt @@ -12,14 +12,19 @@ Type=Application **( cd /usr/share/applications && chmod 644 .desktop )** maybe change permissions -**firefox extension source code** +**firefox extension source code :** **right click on install** and select "copy link" **curl -L > /tmp/myextension.xpi** download the extension with curl inside a tmp file **unzip /tmp/myextension.xpi -d /tmp/myextension** unzip the content enjoy reading it ;) -**enable accents on ubuntu** +**enable accents on ubuntu :** **compose key = right alt** change in keyboard > layout > compose key **r-alt ' e** é **r-alt ` e** è +**connect to planet hoster with ssh :** + ssh hugugtzx@world-370.fr.planethoster.net -p 5022 + **to enable vi :** `export TERM=xterm` + **locked files on nextcloud :** https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883 + diff --git a/tutos/git.txt b/tutos/git.txt index ca3acd9..03b6c56 100644 --- a/tutos/git.txt +++ b/tutos/git.txt @@ -17,6 +17,7 @@ **git branch** lists all a git project's branches **git branch branch_name** creates a new branch **git checkout branch_name** to switch from one branch to another +**git checkout -b branch-name** create and switch to new branch **git log** shows a list of all previous commits **git log --summary** show more informations **git merge branch_name** join file changes from branch_name into current branch diff --git a/tutos/sites.txt b/tutos/sites.txt index d10fa69..d4759de 100644 --- a/tutos/sites.txt +++ b/tutos/sites.txt @@ -1,3 +1,9 @@ +**axiom.ai :** create bots to automat tasks on internet +**wolframalpha.com :** answer complex questions in math, science, and life +**tinywow.com :** free tools for tasks online +**opensourcealternative.to :** open source alternatives +**jotform.com :** 10 000 forms templates for your website + **create a live usb with partition** https://theartofmachinery.com/2016/04/21/partitioned_live_usb.html **tools** www.preparetocode.io **design** http://www.dailyui.co/