Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

93 changed files with 478 additions and 1844 deletions

View File

@ -1,65 +0,0 @@
---
kind: pipeline
type: docker
name: lint
steps:
- name: yaml linting
image: pipelinecomponents/yamllint
commands:
- yamllint .
- name: markdown linting
image: 06kellyjac/markdownlint-cli
commands:
- markdownlint . --config .markdownlint.yaml
---
kind: pipeline
type: docker
name: test build
steps:
- name: build
image: python
commands:
- make install -e BUILDDIR=build
trigger:
event:
exclude:
- push
---
kind: pipeline
type: docker
name: deploy
steps:
- name: build
image: python
commands:
- make install -e BUILDDIR=notebook
- name: deploy
image: appleboy/drone-scp
when:
status:
- success
settings:
host: www.service.consul
user: drone-deploy
overwrite: true
key:
from_secret: dronePrivateKey
target: /srv/http
source: notebook
trigger:
branch:
- master
event:
- push
---
kind: secret
name: dronePrivateKey
get:
path: secrets/data/droneci/keyRSA
name: dronePrivateKey

View File

@ -1,9 +0,0 @@
---
# Default state for all rules
default: true
MD009:
strict: false
MD013: false
MD033: false
MD024: false

View File

@ -1,7 +0,0 @@
extends: default
rules:
# 80 chars should be enough, but don't fail if a line is longer
line-length:
max: 80
level: warning

View File

@ -1,143 +0,0 @@
# Bikepacking
## Bivouac
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|Tente|MT900 1 place|1|1300g|sacoche potence|
|Sac de couchage|millet light Down 5|1|540g|sacoche de selle|
|Oreiller gonflable|Oreiller de trekking Helium gris|1|190g||sacoche de selle|
|matelas gonflable|Matelas gonflable de trekking - MT500 air S - 120 x 52 cm|1|380g|sacoche de selle|
|gamelle|mini tangria|1|197g|sacoche potence|
|Rechaud|mini tangria|1|166g|sacoche potence|
|bouteille alcool a bruler|tangria 300ml|1|292g (pleine)|sacoche potence|
|fourchette spock|SPORK ORIGINAL LIGHT MY FIRE|1|11g|top tube|
|couteau||1|84g|top tube|
|tasse a café||1|23g|sacoche potence|
|**TOTAL**|||3183g|
## Vétement bivouac
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|Tshirt manche longue|odlo|1|162g|sacoche fourche|
|Tshirt manche courte|odlo|1|126g|sacoche fourche|
|tshirt sans manche|craft|1|85g|sacoche fourche|
|Tong||1|202g|sacoche de selle
|doudoune|forclaz MT100 -5|1|280g|sacoche de selle|
|short|Forclaz MT500|1|260g|sacoche fourche|
|legging running||1|212g|sacoche de selle|
|calecon||2|2*53g|sacoche de fourche|
|chausette merinos||1|66g|sacoche de selle|
|casquette|columbia|1|90g|sac a dos|
|**TOTAL**|||1589g|
## Vétement vélo
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|imperméable|rab downpour plus 2|1|384g|sac a dos|
|1er couche technique|van rysel VELO ETE TRAINING|1|84g|cycliste|
|haut de vélo 1|?|1|~200g|cycliste|
|haut de vélo 2|?|1|~200g|sacoche de fouche|
|short|Forclaz MT500||260g|cycliste|
|chausette||2|2*35g|cycliste/sacoche de fourche|
|manchette||1|24g|sac a dos|
|tour de coup||2|2*33g|cycliste|
|casque|fox|1|353g|cycliste|
|cuissart 1|van rysel|1|172g|cycliste|
|cuissart 2|odlo|1|~200g|sacoche de fourche|
|gant|five glove|1|26g|cycliste|
|lunettes soleil|Lunettes de soleil randonnée - MH530 |1|26g|cycliste|
|chaussure|mavic|1|?|
|**TOTAL**|||2065g|
## Divers
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|bidon|zefal 750ml|2|1550g (plein)|vélo|
|sac poubelle||||sacoche de selle|
|Sac congelation||||sac a dos|
|briquet|bic mini|1||sac a dos|
|carte vital/carte bleu||||cycliste|
|liquide||||cycliste|
|ficelle|paracode+ 1 mousqueton||100 g|sacoche de selle?|
|**TOTAL**|||1650g|
## Hygiene/phamarcie
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|dolipranne||||
|immodium||||
|désinfectant||||
|couverture de survie||||
|créme solaire||||
|brosse a dent||||
|pince a linge||||
|dentifrise solide||||
|pince a épiler||||
|coupe ongle||||
|savon en feuille||||
|lessive en feuille||||
|boule quies||||
|**Sous total**|||400g|sacoche potence|
|savon|Savon en Feuilles Sea to Summit|1|14g|
|lessive|Lessive en feuilles Sea to Summit |1|14g|
|serviette|decath|1|170g|sacoche de potence|
|paquet mouchoir/PQ||||
|**TOTAL**|||428g|
## Electronique
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|batterie|anker powercore 10000|1|188g|sac a dos|
|chargeur||1|78g|sac a dos|
|cable usbC||1|20g|sac a dos|
|cable usb||1|7g|sac a dos|
|cable montre|||9g|sac a dos|
|écouteur||1|44g|sac a dos|
|téléphone||1|199g|sac a dos|
|liseuse||1|319g|sac a dos|
|GPS||1|76g|vélo|
|montre||1|53g|cycliste|
|petzel|||40g|sac a dos|
|lumière velo avant||1|160g|sac a dos|
|lumière velo arriére||1|38g|sac a dos|
|**TOTAL**|||1231g|
## Mécanique
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|huile de chaine||||top tube|
|chambre a air||||vélo|
|antivol 1|Antivol Combiflex 250|1|73g|sac a dos|
|antivol 2|Abus Bordo Lite 6055C/85 BK |1|708g|vélo|
|----------------------------------------------------|-------------------|-----------|-------|
|rustine / colle / papier à poncer||||
|patch tubeless||||
|multioutils|crank brother|||
|démonte pneu||||
|derive chaîne + attache rapide||||
|**SOUS TOTAL**|||500g|top tube|
|rayons||||
|pompe||||
|duct tape ||||
|**TOTAL**|||1281g|
## Vélo
|Designation|Commentaire|Nombre|Poids|Emplacement|
|-----------|-----------|------|-----|-----------|
|vélo||||
|sacoche fourche||||
|sacoche potence||||
|sacoche selle||||
|sac a dos||||
|sacoche top cadre||||
|sacoche bouch bag||||
## **TOTAL**: 11427

View File

@ -1,6 +1,4 @@
# rando # checklist rando
## general
- Tente - Tente
- Sac de couchage - Sac de couchage
@ -8,17 +6,16 @@
- Tapis de sol/matelas gonflable - Tapis de sol/matelas gonflable
- gamelle - gamelle
- Rechaud - Rechaud
- fourchette spock - couvert
- couteau - tasse cafe
- tasse a café
- trousse a pharmacie/dolipranne/immodium.. - trousse a pharmacie/dolipranne/immodium..
- imper - imper
- pantalon de pluie au besoin - pantalon de pluie au besoin
- Chaussure rando
- Tong - Tong
- polaire
- chausette - chausette
- slip - slip
- gant
- tour de coup\*2
- lingette bb/paquet mouchoir/PQ - lingette bb/paquet mouchoir/PQ
- savon - savon
- créme solaire - créme solaire
@ -28,21 +25,14 @@
- brosse a dent - brosse a dent
- Gourde/bouteille d'eau ~min 2L - Gourde/bouteille d'eau ~min 2L
- ficelle - ficelle
- couteau
- batterie - batterie
- chargeur - chargeur
- pince a linge - pince a linge
- petzel - petzel
- sac poubelle - sac poubelle
- Sac congelation - Sac congation
- briquet - briquet
- carte d'identité
- liquide
- short
- pantalon leggins pour le soir
## rando
- Chaussure rando
- polaire
- baton - baton
- casquette - cart d'identité
- liquide

View File

@ -1,13 +1,9 @@
# velo travail
## voiture ## voiture
- vélo dans la voiture - vélo dans la voiture
- huile - huile
- casque velo - casque velo
## affaire travail ## affaire travail
- haut - haut
- pantalon - pantalon
- callecon - callecon
@ -21,7 +17,6 @@
- ceinture - ceinture
## affaire velo ## affaire velo
- sous vetement haut - sous vetement haut
- deuxiéme couche - deuxiéme couche
- kway - kway
@ -33,3 +28,7 @@
- chaussure - chaussure
- chausette - chausette
- écouteur - écouteur

View File

@ -1,5 +1,4 @@
# Américano # Américano
* Cointreau 2cl * Cointreau 2cl
* Martini Blanc 3cl * Martini Blanc 3cl
* Campari 4cl * Campari 4cl

View File

@ -1,5 +1,4 @@
# Cosmopolitan (version modifié Noël 2020) # Cosmopolitan (version modifié Noël 2020)
- Vodka 3cl - Vodka 3cl
- Cointreau 1cl - Cointreau 1cl
- Limoncello 0.5cl - Limoncello 0.5cl

View File

@ -1,10 +1,8 @@
# Gin Fizz # Gin Fizz
- Gin 6cl - Gin 6cl
- Sirop de sucre de canne 2cl - Sirop de sucre de canne 2cl
- Jus de citron vert 4cl - Jus de citron vert 4cl
- Eau gazeuse 12 cl - Eau gazeuse 12 cl
## Indication ## Indication
- Mélange à réaliser au shaker avant d'ajouter l'eau gazeuse. - Mélange à réaliser au shaker avant d'ajouter l'eau gazeuse.

View File

@ -1,5 +1,4 @@
# Sex on the beach # Sex on the beach
- Vodka 3cl - Vodka 3cl
- Chambord 2cl - Chambord 2cl
- Liqueur de pêche 2cl - Liqueur de pêche 2cl

View File

@ -1,5 +1,4 @@
# Singapore Sling # Singapore Sling
- Gin 4cl - Gin 4cl
- Liqueur de cerise 2cl - Liqueur de cerise 2cl
- Sirop de grenadine 1cl - Sirop de grenadine 1cl

View File

@ -1,5 +1,4 @@
# Soupe de cidre ( 7 personnes) # Soupe de cidre ( 7 personnes)
- Cognac 3 cl - Cognac 3 cl
- Sirop de sucre de canne 15cl - Sirop de sucre de canne 15cl
- Jus d'orange 30cl - Jus d'orange 30cl

View File

@ -1,5 +1,4 @@
# Apérol Spritz # Apérol Spritz
- Apérol 2cl - Apérol 2cl
- Proseco 3cl - Proseco 3cl
- Eau gazeuse 1 trait - Eau gazeuse 1 trait

View File

@ -1,81 +0,0 @@
# Idee Cuisine
## Quotidien
- Pâte bolo
- Pâte carbo
- Pâte au saumon chaud
- Pate saumon surimi froid
- Pate facon risotto copa champigon
- Pate facon risotto crevette/saumon
- Ravioli
- Rissoto
- Escalope à la crème
- Gratin dauphinois
- Salade
- Pizza
- Lasagne saumon ou bœuf
- Steak haché/cordon bleue
- Steak pomme de terre
- Oeuf à la cocq
- Salade de riz au thon
- Salade composée
- Omelette
- Wrap
- Ouef au thon
- Oeuf dur saumon fume
- Quiche
- Croque monsieur
- Pain perdu
- Mont d or
- Tardine gourmande
- Enchiladas
- Enchiladas saumon
- Terrine surimi
- Vol au vent
- Gratin d'endives au jambon
- Oeuf cocote
- Fondu savoyarde
- Lentille saucisse
- Feuille de brique saumon ou chorizo
- jambon sauce porto
## Soupe
- Salade
- Cresson
- Butternut
- Oignon
## Sauce
- Bechamel
- Vinaigrette
- Sauce au poivre
- Sauce au maroile
- Sauce a l'oseille
## Preparer
- Casoulet
- Chilicon carne
- Filet mignon
- Poulet roti
- Carbonnade
- Joue de porc
- Roti orloff
- Dos de cabillaud au chorizo
- Pavé de saumon epinard
- Coquille saint jacques a l'irlandaise avec langue d oiseau
- Fondu savoyarde
## desert
- Clafoutie au pomme
- Mouse de fraise
- Mousse au chocolat
- crêpes
- Gauffre
- Thé brun
- Créme renOignon
- Fromage blanc au groseille

64
Cuisine/idee cuisine.md Normal file
View File

@ -0,0 +1,64 @@
# Idee Cuisine
## quotidien
- Pâte bolo
- Pâte carbo
- Pâte au saumon chaud
- Pate saumon surimi froid
- Pate facon risotto copa champigon
- Pate facon risotto crevette
- Ravioli
- Rissoto
- Escalope à la crème
- Gratin dauphinois
- Salade
- Pizza
- Lasagne saumon ou bœuf
- Steak haché/cordon bleue
- Steak pomme de terre
- Ouef à la cocq
- Salade de riz au thon
- Salade composée
- Omelette
- Wrap
- Ouef au thon
- Oeuf dur saumon fume
- Quiche
- Croque monsieur
- Pain perdu
- mont d or
- tardine gourmande
- Enchiladas
- Enchiladas saumon
- terrine surimi
- vol au vent
- gratin d'endives au jambon
- Oeuf cocote
- fondu savoyarde
- lentille saucisse
## sauce
- bechamel
- vinaigrette
- sauce au poivre
- Sauce au maroile
- sauce a l'oseille
## preparer
- Casoulet
- Chilicon carne
- filet mignon
- poulet roti
- carbonnade
- joue de porc
- roti orloff
## desert
- clafoutie au pomme
- mouse de fraise
- Mousse au chocolat
- crêpes
- gauffre
- thé brun
- créme renversé

View File

@ -1,29 +0,0 @@
# citations
> Se vouloir libre, c'est aussi vouloir les autres libres
simone de beauvoir
> Les ordinateurs ne sont pas le truc. Ils sont le truc qui nous conduit au truc
Halt and catch fire
> Un grand pouvoir implique de grande responsabilité
Oncle ben
> La vie trouve toujours son chemin
Jurasic Park
> La noblesse ne sacquiert pas en naissant. Elle se mérite par les actes.
Robin des bois prince des voleur
> Gagner, ce nest pas finir en première position. Ce nest pas battre les autres. Gagner cest se vaincre soi-même. Vaincre notre corps, nos limites et nos peurs. Gagner, cest se dépasser soi-même et transformer les rêves en réalité.
Kilian Jornet, ultra traileur, vainqueur de lUTM
> Soit sans peur face à tes ennemis. Soit juste et droit pour être aimé de Dieu. Dit toujours la vérité, même si cela doit te couter la vie. Protège les innocents, et garde toi du mal. Tel est ton serment.
Kingdom of heaven

View File

@ -1,19 +0,0 @@
# replique
- C'est Pas piquer des hanneton
- on est pas la pour embrasser la princesse
- on est pas la pour enfiller des perles
- On n'est pas là pour sucer des glaçons
## audiart
- Le jour où on mettra les cons sur orbite, t'as pas fini de tourner
- Les cons, ça ose tout. C'est même à ça qu'on les reconnaît
- Dans la vie on partage toujours les emmerdes, jamais le pognon.
## inspecteur harry
> Lorsque je vois un adulte du sexe masculin courir derrière une femelle avec lintention évidente de la violer, je le descends avant, cest ma politique.
> Lintention ? Elle restait à établir.
> Quand un gars à poil court derrière une fille la queue en lair avec un couteau de boucher à la main, cest drôle, jai peine à croire quil est en train de quêter pour la croix rouge.
> les avis c'est comme les trous du cul tout le monde en a un

View File

@ -1,5 +1,3 @@
# Divers
[site permettant d'avoir les prox d'achat de masion ou terrain](https://app.dvf.etalab.gouv.fr) [site permettant d'avoir les prox d'achat de masion ou terrain](https://app.dvf.etalab.gouv.fr)
[liste api public](https://github.com/public-apis/public-apis) [liste api public](https://github.com/public-apis/public-apis)

View File

@ -1,5 +1,3 @@
# lien
[site permettant d'avoir les prox d'achat de masion ou terrain](https://app.dvf.etalab.gouv.fr) [site permettant d'avoir les prox d'achat de masion ou terrain](https://app.dvf.etalab.gouv.fr)
[liste api public](https://github.com/public-apis/public-apis) [liste api public](https://github.com/public-apis/public-apis)

View File

@ -1,5 +1,4 @@
# Mental Model # Mental Model
## Links ## Links
- [Ask HN: Which books teach mental models?](https://news.ycombinator.com/item?id=19895407) - [Ask HN: Which books teach mental models?](https://news.ycombinator.com/item?id=19895407)

View File

@ -1,5 +1,3 @@
# hey hey my my
Hey hey, my my Hey hey, my my
Rock and roll can never die Rock and roll can never die
There's more to the picture There's more to the picture

View File

@ -0,0 +1,7 @@
>Se vouloir libre, c'est aussi vouloir les autres libres
simone de beauvoir
>Les ordinateurs ne sont pas le truc. Ils sont le truc qui nous conduit au truc
Halte and catch fire

View File

@ -1,5 +1,3 @@
# eldorado
Un chevalier Un chevalier
sur son coursier, sur son coursier,
jour et nuit au grand galop jour et nuit au grand galop
@ -25,3 +23,4 @@ dans les profondeurs de la terre,
chevauche sans repos, chevauche sans repos,
dit l'ombre solitaire, dit l'ombre solitaire,
si tu cherches El Dorado ! si tu cherches El Dorado !
"

View File

@ -1,5 +1,4 @@
# littanie contre la peur
Je ne connaîtrai pas la peur, car la peur tue l'esprit. La peur est la petite mort qui conduit à l'oblitération totale. J'affronterai ma peur. Je lui permettrai de passer sur moi, au travers de moi. Et lorsqu'elle sera passée, je tournerai mon œil intérieur sur son chemin. Et là où elle sera passée, il n'y aura plus rien. Rien que moi. Je ne connaîtrai pas la peur, car la peur tue l'esprit. La peur est la petite mort qui conduit à l'oblitération totale. J'affronterai ma peur. Je lui permettrai de passer sur moi, au travers de moi. Et lorsqu'elle sera passée, je tournerai mon œil intérieur sur son chemin. Et là où elle sera passée, il n'y aura plus rien. Rien que moi.
I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain. I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing. Only I will remain.

View File

@ -0,0 +1,18 @@
# replique
- C'est Pas piquer des hanneton
- on est pas la pour embrasser la princesse
- on est pas la pour enfiller des perles
- On n'est pas là pour sucer des glaçons
## audiart
- Le jour où on mettra les cons sur orbite, t'as pas fini de tourner
- Les cons, ça ose tout. C'est même à ça qu'on les reconnaît
- Dans la vie on partage toujours les emmerdes, jamais le pognon.
## inspecteur harry
> - Lorsque je vois un adulte du sexe masculin courir derrière une femelle avec lintention évidente de la violer, je le descends avant, cest ma politique.
> - Lintention ? Elle restait à établir.
> - Quand un gars à poil court derrière une fille la queue en lair avec un couteau de boucher à la main, cest drôle, jai peine à croire quil est en train de quêter pour la croix rouge.
- les avis c'est comme les trous du cul tout le monde en a un

View File

@ -1,3 +1 @@
# République Alamo
République. Jaime le son de ce mot. Il signifie que les gens peuvent vivre libres, parler comme bon leur semble, aller et venir, acheter ou vendre, senivrer ou rester sobres, selon leurs désirs. Certains mots vous font vibrer. République est lun de ces mots qui me nouent la gorge la même sensation qui sempare du père voyant voit son bébé faire ses premiers pas ou son premier enfant entreprendre de se raser et parler comme un homme. Certains mots vous réchauffent le cœur. République est lun de ces mots. République. Jaime le son de ce mot. Il signifie que les gens peuvent vivre libres, parler comme bon leur semble, aller et venir, acheter ou vendre, senivrer ou rester sobres, selon leurs désirs. Certains mots vous font vibrer. République est lun de ces mots qui me nouent la gorge la même sensation qui sempare du père voyant voit son bébé faire ses premiers pas ou son premier enfant entreprendre de se raser et parler comme un homme. Certains mots vous réchauffent le cœur. République est lun de ces mots.

View File

@ -1,5 +1,3 @@
# Voyez Cela (13 éme guerrier)
Voyez cela je vois mon père. Voyez cela je vois mon père.
Voyez cela je vois ma mère et mes sœurs et mes frères. Voyez cela je vois ma mère et mes sœurs et mes frères.
Voyez cela je vois tous mes ancêtres qui sont assis et me regardent. Voyez cela je vois tous mes ancêtres qui sont assis et me regardent.

View File

@ -1,75 +0,0 @@
# molecule
Molecule est un framework permettant de tester les roles ansible.
Il supporte diferent driver:
- Docker (default)
- Vagrant
- Libvirtd
## Hierarchie
Les fichiers de configuration sont instalé dans le role sous `molecule/default`
Les principaux fichier sont les suivants:
- `molecule.yml` configuration central
- `converge.yml` playbook contenant l'appel du role a tester
- `verify.yml` playbook effectuant les tests
### molecule.yml
ce ficheier de config poséde diferent clés principal:
- `dependency`
- `driver`
- `lint`
- `platform`
- `provisioner`
- `scenario`
- `verifier`
## Scenario
Scenario par defaut:
```YAML
scenario:
create_sequence:
- dependency
- create
- prepare
check_sequence:
- dependency
- cleanup
- destroy
- create
- prepare
- converge
- check
- destroy
converge_sequence:
- dependency
- create
- prepare
- converge
destroy_sequence:
- dependency
- cleanup
- destroy
test_sequence:
- dependency
- lint
- cleanup
- destroy
- syntax
- create
- prepare
- converge
- idempotence
- side_effect
- verify
- cleanup
- destroy
```

View File

@ -1,37 +0,0 @@
# ansible
![ansible](../img/ansible.png)
## commande ansible
**_launch playbook on staging_**
`ansible-playbook -i staging site.yml --vault-password-file=.vaultpassword`
**_init new role architecture_**
`ansible-galaxy user_config init`
**_launch ansible bootstrap_**
`ansible-playbook -i nas, bootstrap.yml -u root --ask-pass`
**_encrypt string_**
`ansible-vault encrypt_string`
## ignore know host file on ansible
```bash
export ANSIBLE_HOST_KEY_CHECKING=False
--ssh-extra-args='-o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'
```
## Merge Dict instead Replace
in ansible config file set
```config
hash_behaviour = merge
```
## test ansible template in local
```sh
ansible -m debug -a "msg='{{ lookup('template','./daemon.json.j2')}}'" --extra-vars=@../../../group_vars/all/docker localhost
```

View File

@ -1,496 +0,0 @@
# DevOps notes
## intro
pourquoi
demarche:
- culture
- valeur
- croyances
principes: 3 Ways
process: methode
outils:
## explorer devops
**time to market**: période entre les premières idées concernant un produit et
sa disponibilité éventuelle sur les marchés de consommation répondre au besoin marché
**time to value**: Mesure du temps nécessaire pour que l'entreprise recouvre
la valeur d'une fonctionnalité ou d'un service. crée u ne nouvelle valeur
**agile**: mise en prod par petite itération
**mur de la confution**: les devs et la prod n'on pas les même objectif changement/stabilité
### objectif
- version plus petite et plus fréquente
- limitation de l'impact (effet blast)
- communication inter équipe
- gain de temps -> automatisation
- Vision global et systémique
- casser les Silo
**CALMS**:
- Culture:Valeurs et comportements qui contribuent à instaurer l'environnement
social et psychologique
- Automatisation
- Lean: amélioration continue, horizontalité, standardisé
- Mesure: monitoring, KPI
- solidarité: feedback
Minimum value product: objectif minimum du client
### le cercle d'or
Why: But Cause Croyance
How: ce qui nous distingue
What: produit
L IT na plus besoin de saligner ou de sintégrer au business, elle est le business
## principe fondamentaux
### les 3 voies
#### flux: dev vers Ops
comprendre le flux fluidifier ,
outils:lean automatisation
- ne pas transmettre de default
- une optimisation local ne doit pas dégrader de dégradation global
**Value Stream Mapping**:décrit le flux dinformations, de matériaux et de
travail entre silos fonctionnels, en mettant l'accent sur DevOps la
quantification et l'élimination du gaspillage,
théorie des contraintes
- au moins toujour une contrainte
- limiter au maillons le plus failble (like rando)
- l'amélioration passe par l'optimisation des contraintes
- identifier la contraintes
- exploiter
- subordonner et synchroniser
- élever la performance
- répéter le process
#### feedback: des ops vers les dev , ITSM
rapide
améliorer les pratiques
- monitoring
- automatisation des tests
- post mortem
- donnée de changement, incident
#### experimentation et apprentissage coninue
- allouer du temps
- droit a l'erreur
neccessite:
- 3p: Protection, Permission, Puissance
- **assertivité**: voir la valeur de l'autre oposé de la domination
chaos Engineering
- généré des problématique sur une instance de production: permet d'évaluer
encourger une culture d'apprentisasge: voir chatops
**maitrise** répétition et entrainnement
## Principal pratiques de DevOps
### tests en continue
décalage a gauche: meilleure qualité lors de dev évute les proléme de mise en prod
test fonctionnelle: unitaire
test non fonctionelle: capacité, securité, performance
test-driven development: création des tests avant le dev
### intégration continue
commit régulier: lancement des test..
### continous delivery
s'assurer que le logiciel est toujour dans un étét livrable (s'arréte a la QA)
### continous deploiement
continue delivery jusqu'en Prod
### Site Reliability Engineering
mettre en place la resilience,
capacité du systéme a s'adapter
### ChatOps
partage entre les équipee
### KanBan
- notion importante de la capacité pour chaque "colonne"
- je vais cherché l'activité (Pul)
- lead time: entré de backlog et fin de process
- cycle time: entré dans le process et fin de process
- temps de backog= lead time - cycle time
- visualiser les contraintes
## Frameworks business et technologique
### Agile
valeur sur kes individu plutot que les pocesss
manifase agile
| valorisé | plutot que |
|---|---|
|individus|Processus et Outils|
|logiciel opé|doc exhaustive|
|collaboration avec les clients| Négociation contractuelle|
|adapatation au changement|suivre un plan|
- truc qui fonctionne plutot que la doc
#### SCRUM
- livrer pendant une période définie (sprint)
- itération fonctionnelle
- User stories: demandes rédigée du point de vue client
- Epics; grandes stories découper eb yser story
Product Backlog -> sprint Backlog -> itération
roles:
- équipe de dev
- product owner
- scrum master
#### Safe
agilité a grande échelle
### ITSM
- mise en oeuvre des services
- fournit des conseils et une structure aux processus
Agile Service Management: adapter les processus.
### lean
suivre le produit
chasse au mouda: gaspillage:
**DOWNTIME**:
- Default: ne pas respecter le besoin client
- Overproduction:
- waiting: attente de tests
- No use: outils non utilisé car probléme d'adhesion
- Transport: ping pong ticket
- Inventaire: Stock
- Mouvement:
- Excessive traitemnt: doc d'explication général trouvable sur internet
#### VSM
**Value Stream Mapping**: chaine de valeur sequence activité requise pour
concevoir prosuire et livrer
Demande client -> chaine de valueur -> produit
voir sur le terrain
#### Improvment Kata
répétition d'une pratique jusqu'elle devienne une habitude
roue de demming
2 existant -> 4 PDCA -> 3 objectif d'amélioration -> 1 Vision (long terme)
premiére étape: **Vision**
#### Cultutre de la sécurité
- valeur que partage les employé en matiére de sécurité
- post mortem **sans reproche**
- évaluer les incident
- SPOF
- cordon d'andon (remercier d'avoir tirer la sonnette d'alarme)
#### crée une organisation apprennante
- **engagement de la direction essentiel**
- ne pas apprendre est une dette culturel
#### Finacement en continu
- traditionnellement annuelle
- en mode agile: **révisé frequemmen** (trimestre)
- mesure du retour
- finacement a risque
## Culture, Comportement et modéle d'opération
**On ne peur pas changer la culture mais on peu changer les comportement.**
Dette culturel: Considération ignorée par rapport de la croissance et de l'innovation
caracterisque:
- valeur aligné sur le comportement
- collaboration
- fierté dans le travail
- Confiance
- amélioration continue
- Sûr
- Reconnaissance
- mesurable
confiance élevé > confiance faible
MVB: Most Valuable Bureacratie
### type de culture
| pathologique | Bureautratique | Génératrice |
| ----------------------------- | --------------------------------------- | --------------------------------- |
| inforation non dispo | information pe ignoré | information activement recherché |
| messager fusillé | messager isolé | messager encourager |
| responsabilité évitées | responsabilité sont compartimentalisées | les responsabilité sont partagées |
| les lien direct sont découagé | lien direct non encourager | lien direct sont récompensé |
| echec couvert | organisation juste est pardonne | echec entraine une investigation |
| originamité bridée | originaité crée des problémes | originalité mise en avant |
- les gens n'offrent pas de résistance a leur propres idées,
**il ne peuvent que ce changer eux même**
- implication des partie prenante impérative
- une personne impliquer dans les décisions est plus suceptible d'acepter le changement
### étape de l'aceptation du changement: courbe de kubler ross
- choc
- denie
- frustration
- depression
- experiment
- decision
- Integration
communication rapide est effice neccessaire #ChatOps
### Encourager la collaboration
- volontaire
- partagé
- fournir des feedback
- partage des connaissances
- partage des responsabilité
- engagement réalilste
### s'attendre au conflit
inventaire des conflits de Thomas-Kilmann (erreur dans le tableau?)
### Eviter la fatigue aux changement
> Le degré de fatigue face aux changements ressentie par les personnes est directement
> liée à la façon dont le changement est géré.
- génére de l'**apathie**
- elle est normal
- expliquer les raisons
- montrer les interconnection
- avoir un feedback
- célébrer les succée
### Valorisé les nouveux changements
- expérience d'immerssion
- Team Building
- Hackaton
- communité (guilde)
## Automatisation
un outils par servce
avantage de l'Automatisation:
- indepotent
- environement maitrisé
- moins d'incidents
**artefact**: tout objet compris dans objet (documentation,plan de test , images
, fichier de donnée...)
**API**: interface entre des module ou des applications
**Microservices**: logicielle composée de modules plus petits qui interagissent
via des API
**Virtualisation**: VM ou conteneurs isolation de l'environnement
**Open Source** : logiciel distribué avec le code sources
**Machine Learning**: analyse de données utilisanr des données.
### Cloud, conteneurs et Microservices
IAS: délégation de la partie Infra
PAS: gestion de l'os, database déléger on ne gére uniquement l'applications
SAS: office 365
### IA & Machine Learning
Analyse de données qui utilise des algorithmes pour apprendre des données.
- analyse de log ...
### Infrastructure as code
un grand pouvoir implique de grande responsabilité
### Automatisation de la communication
- alarmes
- améliorer la réponse
- collaboration virtuelle
### premiére étapes de l'Automatisation
- définir l'architecture
- évaluer l'existant
- automatier le travail a haute valeur ajoutée, répétitif et sujet aux erreurs
- Optimiser les goulots d'étrangleemnt
- **pouvoir évoluer avec le temps**
- modéliser
- automaitiser les process de déploiement et de versions Build
- automatiser les test unitaire
- automatiser les tests d'acceptation (UAT)
- automatiser la mise en prod
### Toolchains
- chaque élément sert un objectif particulier
- les interfaces sont assuré par des API
- elle ne doivent pas tous être fournit par le même fournissuer
- neccessite une conception architectural
- **elle doit être évolutif**
example d'élément:
- Gestion des exigences
- Orchestration et visualisation
- Gestion des versions
- Intégration continue et versions
- Gestion des artefacts
- Virtualisation de conteneurs et de systèmes
- d'exploitation
- Automatisation des tests et de l'environnement
- Configuration et déploiement du serveur
- Gestion de la configuration du système
- Alertes et alarmes
- Monitoring
modéliser la chane de valueur -> automatiser les release -> automatiser les test
unitaire et le coverage -> automatiser les test d'acceptation -> automatiser la
mise en prod -> amélioration continue
## Mesures, indicateurs et reporting
si on ne peut pas mesurer on ne peu pas améliorer
- mesurer la vitesse: fréquence, vitesse de déploiement
- qualité: Taux d'echec des changement
- stabilité: MTTD délai moyen de detection des incident, MTTR délai de
réparation, MTRS Délai moyen de rétablisement du service
- Culture: Engagement et moral, partage de connaissances.
1er voies: Les mesures nous permettent de trouver des contraintes
2 éme voies: Les preuves créent la confiance et permettent de faire plus
3 éme voies: Les hypothèses nécessitent des résultats quantifiables
pour déterminer la prochaine expérience
4 types de travail (IT) :?
- Projets business
- Projets IT
- Travail planifié
- Travail non planifié
## Partage, observeation, évolution
Devops Days internes
### Developpement
- turn over
- dificulté a monté en compétence
- autoformation
### Compétence
- priorité de l'entreprie
- culture G IT
- intéret pour le code
- adaptable
T-shaped: une spécialiter
pi-shaped: deux spécialiter
comb-shaped: multi spécialiter
leadership transformationnel
**Enps** employes promotter stat
- on part de ou on ai
- transparence
- se concentrer sur les comportement critique
- Expérimenter et apprendre
- Eviter l'inertie
### Facteur determinant de réussite
- engagement de la direction
- création d'une culture d'apprentissage collaboratibe
- Valeur et vocabulaire Commun
- **casser les silos**
- Indicateur
- Application de methode Agile et lean
- Communication ouverte et frequente
### Défis & Risque
- manque d'engagement
- transformer le eux en nous
- Manque d'éducation
- Mauvaise communication

View File

@ -1,3 +0,0 @@
# Documentation
[diataxis documentation Framework](https://diataxis.fr)

View File

@ -1,224 +0,0 @@
# FFmpeg cheat sheet
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: <https://www.ffmpeg.org/download.html>
Full documentation: <https://www.ffmpeg.org/ffmpeg.html>
## Basic conversion
```bash
ffmpeg -i in.mp4 out.avi
```
### Remux an MKV file into MP4
```bash
ffmpeg -i in.mkv -c:v copy -c:a copy out.mp4
```
### High-quality encoding
Use the `crf` (Constant Rate Factor) parameter to control the output quality.
The lower crf, the higher the quality (range: 0-51). The default value is 23,
and visually lossless compression corresponds to `-crf 18`. Use the `preset`
parameter to control the speed of the compression process.
Additional info: <https://trac.ffmpeg.org/wiki/Encode/H.264>
```bash
ffmpeg -i in.mp4 -preset slower -crf 18 out.mp4
```
## Trimming
Without re-encoding:
```bash
ffmpeg -ss [start] -i in.mp4 -t [duration] -c copy out.mp4
```
- [`-ss`](http://ffmpeg.org/ffmpeg-all.html#Main-options) specifies
the start time, e.g. `00:01:23.000` or `83` (in seconds)
- [`-t`](http://ffmpeg.org/ffmpeg-all.html#Main-options) specifies the duration
of the clip (same format).
- Recent `ffmpeg` also has a flag to supply the end time with `-to`.
- [`-c`](http://ffmpeg.org/ffmpeg-all.html#Main-options) copy copies the first
video, audio, and subtitle bitstream from the input to the output file without
re-encoding them. This won't harm the quality and make the command run within seconds.
With re-encoding:
If you leave out the `-c copy` option, `ffmpeg` will automatically re-encode
the output video and audio according to the format you chose. For high quality
video and audio, read the [x264 Encoding Guide](https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide)
and the [AAC Encoding Guide](http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide)
, respectively.
For example:
```bash
ffmpeg -ss [start] -i in.mp4 -t [duration] -c:v libx264 -c:a aac -strict
experimental -b:a 128k out.mp4
```
## Mux video and audio from another video
To copy the video from in0.mp4 and audio from in1.mp4:
```bash
ffmpeg -i in0.mp4 -i in1.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4
```
- With [-c copy](http://ffmpeg.org/ffmpeg.html#Stream-copy) the streams will be
`stream copied`, not re-encoded, so there will be no quality loss. If you want
to re-encode, see [FFmpeg Wiki: H.264 Encoding Guide](https://trac.ffmpeg.org/wiki/Encode/H.264).
- The `-shortest` option will cause the output duration to match the duration
of the shortest input stream.
- See the
[`-map` option documentation](http://ffmpeg.org/ffmpeg.html#Advanced-options)
for more info.
## Concat demuxer
First, make a text file.
```bash
file 'in1.mp4'
file 'in2.mp4'
file 'in3.mp4'
file 'in4.mp4'
```
Then, run `ffmpeg`:
```bash
ffmpeg -f concat -i list.txt -c copy out.mp4
```
## Delay audio/video
Delay video by 3.84 seconds:
```bash
ffmpeg -i in.mp4 -itsoffset 3.84 -i in.mp4 -map 1:v -map 0:a -vcodec copy
-acodec copy out.mp4
```
Delay audio by 3.84 seconds:
```bash
ffmpeg -i in.mp4 -itsoffset 3.84 -i in.mp4 -map 0:v -map 1:a -vcodec copy
-acodec copy out.mp4
```
## Burn subtitles
Use the [libass](http://ffmpeg.org/ffmpeg.html#ass) library (make sure your
ffmpeg install has the library in the configuration `--enable-libass`).
First convert the subtitles to .ass format:
```bash
ffmpeg -i sub.srt sub.ass
```
Then add them using a video filter:
```bash
ffmpeg -i in.mp4 -vf ass=sub.ass out.mp4
```
## Extract the frames from a video
To extract all frames from between 1 and 5 seconds, and also between 11 and 15 seconds:
```bash
ffmpeg -i in.mp4 -vf select='between(t,1,5)+between(t,11,15)' -vsync 0 out%d.png
```
To extract one frame per second only:
```bash
ffmpeg -i in.mp4 -fps=1 -vsync 0 out%d.png
```
## Rotate a video
Rotate 90 clockwise:
```bash
ffmpeg -i in.mov -vf "transpose=1" out.mov
```
For the transpose parameter you can pass:
```bash
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip
```
Use `-vf "transpose=2,transpose=2"` for 180 degrees.
## Download "Transport Stream" video streams
1. Loate the playlist file, e.g. using Chrome > F12 > Network > Filter: m3u8
2. Download and concatenate the video fragments:
```bash
ffmpeg -i "path_to_playlist.m3u8" -c copy -bsf:a aac_adtstoasc out.mp4
```
If you get a "Protocol 'https not on whitelist 'file,crypto'!" error
, add the `protocol_whitelist` option:
```bash
ffmpeg -protocol_whitelist "file,http,https,tcp,tls" -i "path_to_playlist.m3u8"
-c copy -bsf:a aac_adtstoasc out.mp4
```
## Mute some of the audio
To replace the first 90 seconds of audio with silence:
```bash
ffmpeg -i in.mp4 -vcodec copy -af "volume=enable='lte(t,90)':volume=0" out.mp4
```
To replace all audio between 1'20" and 1'30" with silence:
```bash
ffmpeg -i in.mp4 -vcodec copy -af "volume=enable='between(t,80,90)':volume=0" out.mp4
```
## Deinterlace
Deinterlacing using "yet another deinterlacing filter".
```bash
ffmpeg -i in.mp4 -vf yadif out.mp4
```
## Create a video slideshow from images
Parameters: `-r` marks the image framerate (inverse time of each image);
`-vf fps=25` marks the true framerate of the output.
```bash
ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4
```
## Extract images from a video
- Extract all frames: `ffmpeg -i input.mp4 thumb%04d.jpg -hide_banner`
- Extract a frame each second: `ffmpeg -i input.mp4 -vf fps=1 thumb%04d.jpg -hide_banner`
- Extract only one frame: `ffmpeg -i input.mp4 -ss 00:00:10.000 -vframes 1 thumb.jpg`
## Metadata: Change the title
```bash
ffmpeg -i in.mp4 -map_metadata -1 -metadata title="My Title" -c:v copy -c:a
copy out.mp4
```

View File

@ -1,40 +0,0 @@
# Commit Convention
To be more readable you can use following commit procedure
```commit
<type>[optional scope]: <description>
<body>
<footer>
```
## Type
- build: modify script build (MakeFile or other)
- chore: updatating grunt task
- ci: Continual Integration change
- docs: documentation changes
- feat: new feature for the user,
- fix: bug fix for the user
- perf: performance improvment
- refactor: refactoring code
- style: formatting change
- test: test modification
## Scope
Example of scope:
- name of job
- logger
- init
- runner
- config
- etc...
## footer
Can reference closed issue and breaking changes

View File

@ -1,12 +0,0 @@
# hugo
hugo is a static website generator
## Usefull command
- `hugo server -b localhost/starter` launch a test server on your local machine
- -b is for baseURL option depend to configuration
- you can add -t with theme name if you have few theme installed
- `hugo new site .` create a new site skeleton
- `hugo new test.md` create a new file in content folder
- `hugo` compile site

View File

@ -1,3 +1 @@
# JS
[Javascript without JQuery](https://github.com/nefe/You-Dont-Need-jQuery) [Javascript without JQuery](https://github.com/nefe/You-Dont-Need-jQuery)

View File

@ -1,19 +0,0 @@
---
created: 2022-02-26T10:26:47+01:00
modified: 2022-04-05T23:25:53+02:00
---
# Helm
Helm est un gestionnaire de package kubernetes
Il permet de créer des template de configuration kubernetes appelé charts
Si utilisation d un chart personnalisé penser à construire les dépendance
```sh
Helm dependency build .
```
```sh
Helm install -n vault vault . -f values.yml
```

View File

@ -1,37 +0,0 @@
---
created: 2022-02-20T19:34:47+01:00
modified: 2022-02-20T19:59:55+01:00
---
# Kubernetes
## pod
Un pod peut contenir plusieurs container avec une couche réseau et stockage partagé
## Storage
hostpath: permet de mapper un dossier de l host par contre attention ne pas utiliser sur un cluster avec plusieurs noeud car le dossier devra être identique sur tous les noeud
Persistant volume: stockage géré par kubernetes permet d utiliser différente resource réseau (NFS, système distribué...) Le persistant volume a un cycle de vie externe au pod qui l'utilise
Persistant volume claim: requête d un pod pour un ersistent volume
ConfigMap: objet kubernetes permettant de stocker des configurations peut être monté sur un pod pour par example fournir un fichier de configuration
## namespace
Permet de séparer les pod et de ne travailler que sur les pod nécessaire
## workload
### deployment
### statefullset
### daemonset
## secret
Stocké en base64
Voir external-secrets pour synchro avec un vault

View File

@ -1,10 +0,0 @@
# IPtables
## Forward un port sur un autre
```sh
iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 8600
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 8600
iptables -t nat -A OUTPUT -d localhost -p udp -m udp --dport 53 -j REDIRECT --to-ports 8600
iptables -t nat -A OUTPUT -d localhost -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 8600
```

View File

@ -1,3 +0,0 @@
# Flask
[tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world)

View File

@ -706,6 +706,7 @@ deux conception:
- journal de transactions: enregistre mes transactions qui ont eu lieu depuis la derniére sauvegarde - journal de transactions: enregistre mes transactions qui ont eu lieu depuis la derniére sauvegarde
### mode de récupération ### mode de récupération
- full (par default) obligatoire en haute dispo - full (par default) obligatoire en haute dispo
@ -754,6 +755,7 @@ RESTORE FILELISTONLY list les fichier restaurable pour l'in des sauvegarde conte
RESTORE VERIFYONLY: controle la sauvegarde RESTORE VERIFYONLY: controle la sauvegarde
## surveillance et performance ## surveillance et performance
### Historisation des données ### Historisation des données
@ -766,7 +768,6 @@ Tables temporelles:
l'intervalle de temps est ouvert a droite fermée a gauche l'intervalle de temps est ouvert a droite fermée a gauche
interrogation temporelle interrogation temporelle
- as-of - as-of
- from - from
- between - between
@ -776,6 +777,8 @@ interrogation temporelle
### verrouillages et blocages ### verrouillages et blocages
mode de verrouillage pessimiste par default mode de verrouillage pessimiste par default
- une écriture bloque la lecture et l'écriture d'autre processus - une écriture bloque la lecture et l'écriture d'autre processus
- le verrouillafe peut entrainner des: wait,Blocage,deadlock - le verrouillafe peut entrainner des: wait,Blocage,deadlock

View File

@ -5,54 +5,24 @@ if not done you can meet issue during request
## action ## action
need to have **postgresqk-old-upgrade** installed on arch **need to have postgresqk-old-upgrade installed on arch**
- stop service - stop service
```systemctl stop postgresql.service``` ```systemctl stop postgresql.service```
- rename cluster directory - rename cluster directory
```mv /var/lib/postgres/data /var/lib/postgres/olddata
```bash
mv /var/lib/postgres/data /var/lib/postgres/olddata
mkdir /var/lib/postgres/data /var/lib/postgres/tmp mkdir /var/lib/postgres/data /var/lib/postgres/tmp
chown postgres:postgres /var/lib/postgres/data /var/lib/postgres/tmp chown postgres:postgres /var/lib/postgres/data /var/lib/postgres/tmp
``` ```
- log in postgres account - log in postgres account
```
```bash
sudo -iu postgres sudo -iu postgres
cd /var/lib/postgres/tmp cd /var/lib/postgres/tmp
``` ```
- launch upgrade - launch upgrade
```
```bash
pg_upgrade -b /opt/pgsql-PG_VERSION/bin -B /usr/bin -d /var/lib/postgres/olddata -D /var/lib/postgres/data pg_upgrade -b /opt/pgsql-PG_VERSION/bin -B /usr/bin -d /var/lib/postgres/olddata -D /var/lib/postgres/data
``` ```
- check both pg_hba.conf in new and old cluster - check both pg_hba.conf in new and old cluster
- restart server `sc-start postgresql` - restart server `sc-start postgresql`
## sequece manipulation
sequence are use to generate uniq identifier
- get sequence value
```SQL
select * from name_seq;
```
- increment sequence value
```SQL
select nextval(name_seq);
```
- set sequence value:
```SQL
select setval(name_seq,newvalue);
```

View File

@ -1,36 +1,29 @@
# SQL Cheatsheet # Quick SQL Cheatsheet
## Quick SQL Cheatsheet
A quick reminder of all relevant SQL queries and examples on how to use them. A quick reminder of all relevant SQL queries and examples on how to use them.
This repository is constantly being updated and added to by the community. This repository is constantly being updated and added to by the community.
Pull requests are welcome. Enjoy! Pull requests are welcome. Enjoy!
## Table of Contents # Table of Contents
1. [ Finding Data Queries. ](#find)
1. [Finding Data Queries.](#find) 2. [ Data Modification Queries. ](#modify)
2. [Data Modification Queries.](#modify) 3. [ Reporting Queries. ](#report)
3. [Reporting Queries.](#report) 4. [ Join Queries. ](#joins)
4. [Join Queries.](#joins) 5. [ View Queries. ](#view)
5. [View Queries.](#view) 6. [ Altering Table Queries.](#alter)
6. [Altering Table Queries.](#alter) 7. [ Creating Table Query.](#create)
7. [Creating Table Query.](#create)
<a name="find"></a> <a name="find"></a>
# 1. Finding Data Queries
## 1. Finding Data Queries
### **SELECT**: used to select data from a database ### **SELECT**: used to select data from a database
* `SELECT` * `FROM` table_name; * `SELECT` * `FROM` table_name;
### **DISTINCT**: filters away duplicate values and returns rows of specified column ### **DISTINCT**: filters away duplicate values and returns rows of specified column
* `SELECT DISTINCT` column_name; * `SELECT DISTINCT` column_name;
### **WHERE**: used to filter records/rows ### **WHERE**: used to filter records/rows
* `SELECT` column1, column2 `FROM` table_name `WHERE` condition; * `SELECT` column1, column2 `FROM` table_name `WHERE` condition;
* `SELECT` * `FROM` table_name `WHERE` condition1 `AND` condition2; * `SELECT` * `FROM` table_name `WHERE` condition1 `AND` condition2;
* `SELECT` * `FROM` table_name `WHERE` condition1 `OR` condition2; * `SELECT` * `FROM` table_name `WHERE` condition1 `OR` condition2;
@ -39,20 +32,17 @@ Pull requests are welcome. Enjoy!
* `SELECT` * `FROM` table_name `WHERE EXISTS` (`SELECT` column_name `FROM` table_name `WHERE` condition); * `SELECT` * `FROM` table_name `WHERE EXISTS` (`SELECT` column_name `FROM` table_name `WHERE` condition);
### **ORDER BY**: used to sort the result-set in ascending or descending order ### **ORDER BY**: used to sort the result-set in ascending or descending order
* `SELECT` * `FROM` table_name `ORDER BY` column; * `SELECT` * `FROM` table_name `ORDER BY` column;
* `SELECT` * `FROM` table_name `ORDER BY` column `DESC`; * `SELECT` * `FROM` table_name `ORDER BY` column `DESC`;
* `SELECT` * `FROM` table_name `ORDER BY` column1 `ASC`, column2 `DESC`; * `SELECT` * `FROM` table_name `ORDER BY` column1 `ASC`, column2 `DESC`;
### **SELECT TOP**: used to specify the number of records to return from top of table ### **SELECT TOP**: used to specify the number of records to return from top of table
* `SELECT TOP` number columns_names `FROM` table_name `WHERE` condition; * `SELECT TOP` number columns_names `FROM` table_name `WHERE` condition;
* `SELECT TOP` percent columns_names `FROM` table_name `WHERE` condition; * `SELECT TOP` percent columns_names `FROM` table_name `WHERE` condition;
* Not all database systems support `SELECT TOP`. The MySQL equivalent is the `LIMIT` clause * Not all database systems support `SELECT TOP`. The MySQL equivalent is the `LIMIT` clause
* `SELECT` column_names `FROM` table_name `LIMIT` offset, count; * `SELECT` column_names `FROM` table_name `LIMIT` offset, count;
### **LIKE**: operator used in a WHERE clause to search for a specific pattern in a column ### **LIKE**: operator used in a WHERE clause to search for a specific pattern in a column
* % (percent sign) is a wildcard character that represents zero, one, or multiple characters * % (percent sign) is a wildcard character that represents zero, one, or multiple characters
* _ (underscore) is a wildcard character that represents a single character * _ (underscore) is a wildcard character that represents a single character
* `SELECT` column_names `FROM` table_name `WHERE` column_name `LIKE` pattern; * `SELECT` column_names `FROM` table_name `WHERE` column_name `LIKE` pattern;
@ -64,31 +54,26 @@ Pull requests are welcome. Enjoy!
* `LIKE` [a-c]% (find any values starting with “a”, “b”, or “c” * `LIKE` [a-c]% (find any values starting with “a”, “b”, or “c”
### **IN**: operator that allows you to specify multiple values in a WHERE clause ### **IN**: operator that allows you to specify multiple values in a WHERE clause
* essentially the IN operator is shorthand for multiple OR conditions * essentially the IN operator is shorthand for multiple OR conditions
* `SELECT` column_names `FROM` table_name `WHERE` column_name `IN` (value1, value2, …); * `SELECT` column_names `FROM` table_name `WHERE` column_name `IN` (value1, value2, …);
* `SELECT` column_names `FROM` table_name `WHERE` column_name `IN` (`SELECT STATEMENT`); * `SELECT` column_names `FROM` table_name `WHERE` column_name `IN` (`SELECT STATEMENT`);
### **BETWEEN**: operator selects values within a given range inclusive ### **BETWEEN**: operator selects values within a given range inclusive
* `SELECT` column_names `FROM` table_name `WHERE` column_name `BETWEEN` value1 `AND` value2; * `SELECT` column_names `FROM` table_name `WHERE` column_name `BETWEEN` value1 `AND` value2;
* `SELECT` * `FROM` Products `WHERE` (column_name `BETWEEN` value1 `AND` value2) `AND NOT` column_name2 `IN` (value3, value4); * `SELECT` * `FROM` Products `WHERE` (column_name `BETWEEN` value1 `AND` value2) `AND NOT` column_name2 `IN` (value3, value4);
* `SELECT` * `FROM` Products `WHERE` column_name `BETWEEN` #01/07/1999# AND #03/12/1999#; * `SELECT` * `FROM` Products `WHERE` column_name `BETWEEN` #01/07/1999# AND #03/12/1999#;
### **NULL**: values in a field with no value ### **NULL**: values in a field with no value
* `SELECT` * `FROM` table_name `WHERE` column_name `IS NULL`; * `SELECT` * `FROM` table_name `WHERE` column_name `IS NULL`;
* `SELECT` * `FROM` table_name `WHERE` column_name `IS NOT NULL`; * `SELECT` * `FROM` table_name `WHERE` column_name `IS NOT NULL`;
### **AS**: aliases are used to assign a temporary name to a table or column ### **AS**: aliases are used to assign a temporary name to a table or column
* `SELECT` column_name `AS` alias_name `FROM` table_name; * `SELECT` column_name `AS` alias_name `FROM` table_name;
* `SELECT` column_name `FROM` table_name `AS` alias_name; * `SELECT` column_name `FROM` table_name `AS` alias_name;
* `SELECT` column_name `AS` alias_name1, column_name2 `AS` alias_name2; * `SELECT` column_name `AS` alias_name1, column_name2 `AS` alias_name2;
* `SELECT` column_name1, column_name2 + , + column_name3 `AS` alias_name; * `SELECT` column_name1, column_name2 + , + column_name3 `AS` alias_name;
### **UNION**: set operator used to combine the result-set of two or more SELECT statements ### **UNION**: set operator used to combine the result-set of two or more SELECT statements
* Each SELECT statement within UNION must have the same number of columns * Each SELECT statement within UNION must have the same number of columns
* The columns must have similar data types * The columns must have similar data types
* The columns in each SELECT statement must also be in the same order * The columns in each SELECT statement must also be in the same order
@ -96,147 +81,115 @@ Pull requests are welcome. Enjoy!
* `UNION` operator only selects distinct values, `UNION ALL` will allow duplicates * `UNION` operator only selects distinct values, `UNION ALL` will allow duplicates
### **INTERSECT**: set operator which is used to return the records that two SELECT statements have in common ### **INTERSECT**: set operator which is used to return the records that two SELECT statements have in common
* Generally used the same way as **UNION** above * Generally used the same way as **UNION** above
* `SELECT` columns_names `FROM` table1 `INTERSECT SELECT` column_name `FROM` table2; * `SELECT` columns_names `FROM` table1 `INTERSECT SELECT` column_name `FROM` table2;
### **EXCEPT**: set operator used to return all the records in the first SELECT statement that are not found in the second SELECT statement ### **EXCEPT**: set operator used to return all the records in the first SELECT statement that are not found in the second SELECT statement
* Generally used the same way as **UNION** above * Generally used the same way as **UNION** above
* `SELECT` columns_names `FROM` table1 `EXCEPT SELECT` column_name `FROM` table2; * `SELECT` columns_names `FROM` table1 `EXCEPT SELECT` column_name `FROM` table2;
### **ANY|ALL**: operator used to check subquery conditions used within a WHERE or HAVING clauses ### **ANY|ALL**: operator used to check subquery conditions used within a WHERE or HAVING clauses
* The `ANY` operator returns true if any subquery values meet the condition * The `ANY` operator returns true if any subquery values meet the condition
* The `ALL` operator returns true if all subquery values meet the condition * The `ALL` operator returns true if all subquery values meet the condition
* `SELECT` columns_names `FROM` table1 `WHERE` column_name operator (`ANY`|`ALL`) (`SELECT` column_name `FROM` table_name `WHERE` condition); * `SELECT` columns_names `FROM` table1 `WHERE` column_name operator (`ANY`|`ALL`) (`SELECT` column_name `FROM` table_name `WHERE` condition);
### **GROUP BY**: statement often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns ### **GROUP BY**: statement often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns
* `SELECT` column_name1, COUNT(column_name2) `FROM` table_name `WHERE` condition `GROUP BY` column_name1 `ORDER BY` COUNT(column_name2) DESC; * `SELECT` column_name1, COUNT(column_name2) `FROM` table_name `WHERE` condition `GROUP BY` column_name1 `ORDER BY` COUNT(column_name2) DESC;
### **HAVING**: this clause was added to SQL because the WHERE keyword could not be used with aggregate functions ### **HAVING**: this clause was added to SQL because the WHERE keyword could not be used with aggregate functions
* `SELECT` `COUNT`(column_name1), column_name2 `FROM` table `GROUP BY` column_name2 `HAVING` `COUNT(`column_name1`)` > 5; * `SELECT` `COUNT`(column_name1), column_name2 `FROM` table `GROUP BY` column_name2 `HAVING` `COUNT(`column_name1`)` > 5;
### **WITH**: often used for retrieving hierarchical data or re-using temp result set several times in a query. Also referred to as "Common Table Expression" ### **WITH**: often used for retrieving hierarchical data or re-using temp result set several times in a query. Also referred to as "Common Table Expression"
* `WITH RECURSIVE` cte `AS` (<br/> * `WITH RECURSIVE` cte `AS` (<br/>
&nbsp;&nbsp;`SELECT` c0.\* `FROM` categories `AS` c0 `WHERE` id = 1 `# Starting point`<br/> &nbsp;&nbsp;`SELECT` c0.* `FROM` categories `AS` c0 `WHERE` id = 1 `# Starting point`<br/>
&nbsp;&nbsp;`UNION ALL`<br/> &nbsp;&nbsp;`UNION ALL`<br/>
&nbsp;&nbsp;`SELECT` c1.\* `FROM` categories `AS` c1 `JOIN` cte `ON` c1.parent_category_id = cte.id<br/> &nbsp;&nbsp;`SELECT` c1.* `FROM` categories `AS` c1 `JOIN` cte `ON` c1.parent_category_id = cte.id<br/>
)<br/> )<br/>
`SELECT` *<br/> `SELECT` *<br/>
`FROM` cte `FROM` cte
<a name="modify"></a>
## 2. Data Modification Queries <a name="modify"></a>
# 2. Data Modification Queries
### **INSERT INTO**: used to insert new records/rows in a table ### **INSERT INTO**: used to insert new records/rows in a table
* `INSERT INTO` table_name (column1, column2) `VALUES` (value1, value2); * `INSERT INTO` table_name (column1, column2) `VALUES` (value1, value2);
* `INSERT INTO` table_name `VALUES` (value1, value2 …); * `INSERT INTO` table_name `VALUES` (value1, value2 …);
### **UPDATE**: used to modify the existing records in a table ### **UPDATE**: used to modify the existing records in a table
* `UPDATE` table_name `SET` column1 = value1, column2 = value2 `WHERE` condition; * `UPDATE` table_name `SET` column1 = value1, column2 = value2 `WHERE` condition;
* `UPDATE` table_name `SET` column_name = value; * `UPDATE` table_name `SET` column_name = value;
### **DELETE**: used to delete existing records/rows in a table ### **DELETE**: used to delete existing records/rows in a table
* `DELETE FROM` table_name `WHERE` condition; * `DELETE FROM` table_name `WHERE` condition;
* `DELETE` * `FROM` table_name; * `DELETE` * `FROM` table_name;
<a name="report"></a> <a name="report"></a>
# 3. Reporting Queries
## 3. Reporting Queries
### **COUNT**: returns the # of occurrences ### **COUNT**: returns the # of occurrences
* `SELECT COUNT (DISTINCT` column_name`)`; * `SELECT COUNT (DISTINCT` column_name`)`;
### **MIN() and MAX()**: returns the smallest/largest value of the selected column ### **MIN() and MAX()**: returns the smallest/largest value of the selected column
* `SELECT MIN (`column_names`) FROM` table_name `WHERE` condition; * `SELECT MIN (`column_names`) FROM` table_name `WHERE` condition;
* `SELECT MAX (`column_names`) FROM` table_name `WHERE` condition; * `SELECT MAX (`column_names`) FROM` table_name `WHERE` condition;
### **AVG()**: returns the average value of a numeric column ### **AVG()**: returns the average value of a numeric column
* `SELECT AVG (`column_name`) FROM` table_name `WHERE` condition; * `SELECT AVG (`column_name`) FROM` table_name `WHERE` condition;
### **SUM()**: returns the total sum of a numeric column ### **SUM()**: returns the total sum of a numeric column
* `SELECT SUM (`column_name`) FROM` table_name `WHERE` condition; * `SELECT SUM (`column_name`) FROM` table_name `WHERE` condition;
<a name="joins"></a> <a name="joins"></a>
# 4. Join Queries
## 4. Join Queries ### **INNER JOIN**: returns records that have matching value in both tables
### **INNER JOIN**: returns records that have matching value in both tables
* `SELECT` column_names `FROM` table1 `INNER JOIN` table2 `ON` table1.column_name=table2.column_name; * `SELECT` column_names `FROM` table1 `INNER JOIN` table2 `ON` table1.column_name=table2.column_name;
* `SELECT` table1.column_name1, table2.column_name2, table3.column_name3 `FROM` ((table1 `INNER JOIN` table2 `ON` relationship) `INNER JOIN` table3 `ON` relationship); * `SELECT` table1.column_name1, table2.column_name2, table3.column_name3 `FROM` ((table1 `INNER JOIN` table2 `ON` relationship) `INNER JOIN` table3 `ON` relationship);
### **LEFT (OUTER) JOIN**: returns all records from the left table (table1), and the matched records from the right table (table2) ### **LEFT (OUTER) JOIN**: returns all records from the left table (table1), and the matched records from the right table (table2)
* `SELECT` column_names `FROM` table1 `LEFT JOIN` table2 `ON` table1.column_name=table2.column_name; * `SELECT` column_names `FROM` table1 `LEFT JOIN` table2 `ON` table1.column_name=table2.column_name;
### **RIGHT (OUTER) JOIN**: returns all records from the right table (table2), and the matched records from the left table (table1) ### **RIGHT (OUTER) JOIN**: returns all records from the right table (table2), and the matched records from the left table (table1)
* `SELECT` column_names `FROM` table1 `RIGHT JOIN` table2 `ON` table1.column_name=table2.column_name; * `SELECT` column_names `FROM` table1 `RIGHT JOIN` table2 `ON` table1.column_name=table2.column_name;
### **FULL (OUTER) JOIN**: returns all records when there is a match in either left or right table ### **FULL (OUTER) JOIN**: returns all records when there is a match in either left or right table
* `SELECT` column_names `FROM` table1 ``FULL OUTER JOIN`` table2 `ON` table1.column_name=table2.column_name; * `SELECT` column_names `FROM` table1 ``FULL OUTER JOIN`` table2 `ON` table1.column_name=table2.column_name;
### **Self JOIN**: a regular join, but the table is joined with itself ### **Self JOIN**: a regular join, but the table is joined with itself
* `SELECT` column_names `FROM` table1 T1, table1 T2 `WHERE` condition; * `SELECT` column_names `FROM` table1 T1, table1 T2 `WHERE` condition;
<a name="view"></a> <a name="view"></a>
# 5. View Queries
## 5. View Queries
### **CREATE**: create a view ### **CREATE**: create a view
* `CREATE VIEW` view_name `AS SELECT` column1, column2 `FROM` table_name `WHERE` condition; * `CREATE VIEW` view_name `AS SELECT` column1, column2 `FROM` table_name `WHERE` condition;
### **SELECT**: retrieve a view ### **SELECT**: retrieve a view
* `SELECT` * `FROM` view_name; * `SELECT` * `FROM` view_name;
### **DROP**: drop a view ### **DROP**: drop a view
* `DROP VIEW` view_name; * `DROP VIEW` view_name;
<a name="alter"></a> <a name="alter"></a>
# 6. Altering Table Queries
## 6. Altering Table Queries
### **ADD**: add a column ### **ADD**: add a column
* `ALTER TABLE` table_name `ADD` column_name column_definition; * `ALTER TABLE` table_name `ADD` column_name column_definition;
### **MODIFY**: change data type of column ### **MODIFY**: change data type of column
* `ALTER TABLE` table_name `MODIFY` column_name column_type; * `ALTER TABLE` table_name `MODIFY` column_name column_type;
### **DROP**: delete a column ### **DROP**: delete a column
* `ALTER TABLE` table_name `DROP COLUMN` column_name; * `ALTER TABLE` table_name `DROP COLUMN` column_name;
<a name="create"></a> <a name="create"></a>
# 7. Creating Table Query
## 7. Creating Table Query
### **CREATE**: create a table ### **CREATE**: create a table
* `CREATE TABLE` table_name `(` <br /> * `CREATE TABLE` table_name `(` <br />
`column1` `datatype`, <br /> `column1` `datatype`, <br />
`column2` `datatype`, <br /> `column2` `datatype`, <br />
`column3` `datatype`, <br /> `column3` `datatype`, <br />
`column4` `datatype`, <br /> `column4` `datatype`, <br />
`);` `);`
:q
:q

View File

@ -5,25 +5,23 @@ voir version:
`select @@version` `select @@version`
passer une base en mode single user passer une base en mode single user
` ALTER DATABASE [toto] SET SINGLE_USER WITH ROLLBACK IMMEDIATE`
`ALTER DATABASE [toto] SET SINGLE_USER WITH ROLLBACK IMMEDIATE`
passer en mode multi user passer en mode multi user
`alter database [toto] set MULTI_USER` `alter database [toto] set MULTI_USER`
voir la configuration voir la configuration
`exec sp_configure` `exec sp_configure`
activé affichage des option avancé activé affichage des option avancé
```SQL ```SQL
exec sp_configure 'show advanced options', 1; exec sp_configure 'show advanced options', 1;
REconfigure; REconfigure;
``` ```
autorisé la mise en autonomie partielle des bases autorisé la mise en autonomie partielle des bases
```SQL ```SQL
exec sp_configure 'contained database authentication',1; exec sp_configure 'contained database authentication',1;
reconfigure reconfigure
@ -41,13 +39,11 @@ reconfigure
``` ```
Backup Backup
```sql ```sql
BACKUP DATABASE [toto] TO DISK = 'c:\toto.bak' with Compression BACKUP DATABASE [toto] TO DISK = 'c:\toto.bak' with Compression
``` ```
ajouter filegroup ajouter filegroup
```SQL ```SQL
USE [master] USE [master]
GO GO
@ -60,7 +56,6 @@ GO
``` ```
setter filegroup par default setter filegroup par default
```SQL ```SQL
USE [DB_GRAND_HOTEL] USE [DB_GRAND_HOTEL]
GO GO
@ -69,7 +64,6 @@ GO
``` ```
modifier taille de fichier modifier taille de fichier
```SQL ```SQL
USE [DB_GRAND_HOTEL] USE [DB_GRAND_HOTEL]
GO GO

View File

@ -1,17 +1,17 @@
# Soft util # Soft util
![IT](img/IT.jpg) ![IT](img/IT.jpg)
## tunelling ## tunelling
[chisel](https://github.com/jpillora/chisel) permet de mettre en place un tunel TCP sur du http [chisel](https://github.com/jpillora/chisel) permet de mettre en place un tunel TCP sur du http
## site ## site
[devhind (cheatsheet)](https://devhints.io/) [devhind (cheatsheet)](https://devhints.io/)
[Lean X in Y minutes](https://learnxinyminutes.com/) [Lean X in Y minutes](https://learnxinyminutes.com/)
[online Json editor](https://jsoneditoronline.org/) [online Json editor](https://jsoneditoronline.org/)
[compression d'image](https://squoosh.app/) [compression d'image](https://squoosh.app/)

View File

@ -1,6 +1,5 @@
# CSS # CSS
## link ## link
[Bulma style sheet](https://devhints.io/bulma) [Bulma style sheet](https://devhints.io/bulma)
[Remove.bg](https://www.remove.bg/) [Remove.bg](https://www.remove.bg/)

View File

@ -6,19 +6,20 @@ Adapted from our book and video series, [Refactoring UI](moz-extension://3cbfa46
Ever used one of those fancy color palette generators? You know, the ones where you pick a starting color, tweak some options that probably include some musical jargon like "triad" or "major fourth", and are then bestowed the five perfect color swatches you should use to build your website? Ever used one of those fancy color palette generators? You know, the ones where you pick a starting color, tweak some options that probably include some musical jargon like "triad" or "major fourth", and are then bestowed the five perfect color swatches you should use to build your website?
![pallette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-01.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-01.png)
This calculated and scientific approach to picking the perfect color scheme is extremely seductive, but not very useful. This calculated and scientific approach to picking the perfect color scheme is extremely seductive, but not very useful.
Well, unless you want your site to look like this: Well, unless you want your site to look like this:
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-02.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-02.png)
## What you actually need What you actually need
----------------------
You can't build anything with five hex codes. To build something real, you need a much more comprehensive set of colors to choose from. You can't build anything with five hex codes. To build something real, you need a much more comprehensive set of colors to choose from.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-03.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-03.png)
You can break a good color palette down into three categories. You can break a good color palette down into three categories.
@ -26,13 +27,13 @@ You can break a good color palette down into three categories.
Text, backgrounds, panels, form controls — almost everything in an interface is grey. Text, backgrounds, panels, form controls — almost everything in an interface is grey.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-04.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-04.png)
You'll need more greys than you think, too — three or four shades might sound like plenty but it won't be long before you wish you had something a little darker than shade #2 but a little lighter than shade #3. You'll need more greys than you think, too — three or four shades might sound like plenty but it won't be long before you wish you had something a little darker than shade #2 but a little lighter than shade #3.
In practice, you want 8-10 shades to choose from (more on this later). Not so many that you waste time deciding between shade #77 and shade #78, but enough to make sure you don't have to compromise too much . In practice, you want 8-10 shades to choose from (more on this later). Not so many that you waste time deciding between shade #77 and shade #78, but enough to make sure you don't have to compromise too much .
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-05.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-05.png)
True black tends to look pretty unnatural, so start with a really dark grey and work your way up to white in steady increments. True black tends to look pretty unnatural, so start with a really dark grey and work your way up to white in steady increments.
@ -42,7 +43,7 @@ Most sites need one, _maybe_ two colors that are used for primary actions, empha
Just like with greys, you need a variety _(5-10)_ of lighter and darker shades to choose from. Just like with greys, you need a variety _(5-10)_ of lighter and darker shades to choose from.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-06.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-06.png)
Ultra-light shades can be useful as a tinted background for things like alerts, while darker shades work great for text. Ultra-light shades can be useful as a tinted background for things like alerts, while darker shades work great for text.
@ -52,19 +53,19 @@ On top of primary colors, every site needs a few _accent_ colors for communicati
For example, you might want to use an eye-grabbing color like yellow, pink, or teal to highlight a new feature: For example, you might want to use an eye-grabbing color like yellow, pink, or teal to highlight a new feature:
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-07.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-07.png)
You might also need colors to emphasize different semantic _states_, like red for confirming a destructive action: You might also need colors to emphasize different semantic _states_, like red for confirming a destructive action:
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-08.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-08.png)
...yellow for a warning message: ...yellow for a warning message:
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-09.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-09.png)
...or green to highlight a positive trend: ...or green to highlight a positive trend:
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-10.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-10.png)
You'll want multiple shades for these colors too, even though they should be used pretty sparingly throughout the UI. You'll want multiple shades for these colors too, even though they should be used pretty sparingly throughout the UI.
@ -72,27 +73,30 @@ If you're building something where you need to use color to distinguish or categ
All in, it's not uncommon to need as many as _ten_ different colors with _5-10 shades each_ for a complex UI. All in, it's not uncommon to need as many as _ten_ different colors with _5-10 shades each_ for a complex UI.
## Define your shades up front Define your shades up front
---------------------------
When you need to create a lighter or darker variation of a color in your palette, don't get clever using CSS preprocessor functions like "lighten" or "darken" to create shades on the fly. That's how you end up with 35 _slightly_ different blues that all look the same. When you need to create a lighter or darker variation of a color in your palette, don't get clever using CSS preprocessor functions like "lighten" or "darken" to create shades on the fly. That's how you end up with 35 _slightly_ different blues that all look the same.
Instead, define a fixed set of shades up front that you can choose from as you work. Instead, define a fixed set of shades up front that you can choose from as you work.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-01.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-01.png)
So how do you put together a palette like this anyways? So how do you put together a palette like this anyways?
## Choose the base color first Choose the base color first
---------------------------
Start by picking a _base_ color for the scale you want to create — the color in the middle that your lighter and darker shades are based on. Start by picking a _base_ color for the scale you want to create — the color in the middle that your lighter and darker shades are based on.
There's no real scientific way to do this, but for primary and accent colors, a good rule of thumb is to pick a shade that would work well as a button background. There's no real scientific way to do this, but for primary and accent colors, a good rule of thumb is to pick a shade that would work well as a button background.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-02.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-02.png)
It's important to note that there are no real rules here like "start at 50% lightness" or anything — every color behaves a bit differently, so you'll have to rely on your eyes for this one. It's important to note that there are no real rules here like "start at 50% lightness" or anything — every color behaves a bit differently, so you'll have to rely on your eyes for this one.
## Finding the edges Finding the edges
-----------------
Next, pick your darkest shade and your lightest shade. There's no real science to this either, but it helps to think about where they will be used and choose them using that context. Next, pick your darkest shade and your lightest shade. There's no real science to this either, but it helps to think about where they will be used and choose them using that context.
@ -100,11 +104,12 @@ The darkest shade of a color is usually reserved for text, while the lightest sh
A simple alert component is a good example that combines both of these use cases, so it can be a great place to pick these colors. A simple alert component is a good example that combines both of these use cases, so it can be a great place to pick these colors.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-03.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-03.png)
Start with a color that matches the hue of your base color, and adjust the saturation and lightness until you're satisfied. Start with a color that matches the hue of your base color, and adjust the saturation and lightness until you're satisfied.
## Filling in the gaps Filling in the gaps
-------------------
Once you've got your base, darkest, and lightest shades, you just need to fill in the gaps in between them. Once you've got your base, darkest, and lightest shades, you just need to fill in the gaps in between them.
@ -114,23 +119,25 @@ Nine is a great number because it's easy to divide and makes filling in the gaps
Start by picking shades _700_ and _300_, the ones right in the middle of the gaps. You want these shades to feel like the perfect compromise between the shades on either side. Start by picking shades _700_ and _300_, the ones right in the middle of the gaps. You want these shades to feel like the perfect compromise between the shades on either side.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-04.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-04.png)
This creates four more holes in the scale (_800_, _600_, _400_, and _200_), which you can fill using the same approach. This creates four more holes in the scale (_800_, _600_, _400_, and _200_), which you can fill using the same approach.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-05.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-05.png)
You should end up with a pretty balanced set of colors that provide just enough options to accommodate your design ideas without feeling limiting. You should end up with a pretty balanced set of colors that provide just enough options to accommodate your design ideas without feeling limiting.
## What about greys? What about greys?
-----------------
With greys the base color isn't as important, but otherwise the process is the same. Start at the edges and fill in the gaps until you have what you need. With greys the base color isn't as important, but otherwise the process is the same. Start at the edges and fill in the gaps until you have what you need.
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-06.png) ![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-06.png)
Pick your darkest grey by choosing a color for the darkest text in your project, and your lightest grey by choosing something that works well for a subtle off-white background. Pick your darkest grey by choosing a color for the darkest text in your project, and your lightest grey by choosing something that works well for a subtle off-white background.
## It's not a science It's not a science
------------------
As tempting as it is, you can't rely purely on math to craft the perfect color palette. As tempting as it is, you can't rely purely on math to craft the perfect color palette.
@ -140,4 +147,5 @@ Once you actually start using your colors in your designs, it's almost inevitabl
Just try to avoid adding _new_ shades too often if you can avoid it. If you're not dilligent about limiting your palette, you might as well have no color system at all. Just try to avoid adding _new_ shades too often if you can avoid it. If you're not dilligent about limiting your palette, you might as well have no color system at all.
[Source](https://refactoringui.com/previews/building-your-color-palette/) [Source](https://refactoringui.com/previews/building-your-color-palette/)

View File

@ -1,3 +1 @@
# email HTML
[Rock Solid HTML Emails ◆ 24 ways](https://24ways.org/2009/rock-solid-html-emails) [Rock Solid HTML Emails ◆ 24 ways](https://24ways.org/2009/rock-solid-html-emails)

View File

@ -1,4 +1,2 @@
# HTML
[HTMl Reference](https://htmlreference.io/) [HTMl Reference](https://htmlreference.io/)
[CSS References](https://cssreference.io/) [CSS References](https://cssreference.io/)

21
IT/ansible.md Normal file
View File

@ -0,0 +1,21 @@
# ansible
![ansible](img/ansible.png)
## commande ansible
***launch playbook on staging***
`ansible-playbook -i staging site.yml --vault-password-file=.vaultpassword`
***init new role architecture***
`ansible-galaxy user_config init `
***launch ansible bootstrap***
` ansible-playbook -i nas, bootstrap.yml -u root --ask-pass`
***encrypt string***
`ansible-vault encrypt_string`
## ignore know host file on ansible
```
export ANSIBLE_HOST_KEY_CHECKING=False
--ssh-extra-args='-o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'
```

View File

@ -1,3 +1,5 @@
# docker # docker
## concept ## concept
@ -7,18 +9,18 @@
## command ## command
- telecharger une image: `docker pull debian:$tag` - telecharger une image: ` docker pull debian:$tag`
- crer et lancer un container en tty `docker run -it bash` - crer et lancer un container en tty ` docker run -it bash `
- arreter container: `docker stop` - arreter container: `docker stop`
- démarrer containeur: `docker start` - démarrer containeur: `docker start`
- lister tous les conteneur `docker ps -a` - lister tous les conteneur `docker ps -a`
- delete conteneur: `docker rm 2cdc - delete conteneur: `docker rm 2cdc
- run a commad in container: `docker exec` - run a commad in container: `docker exec `
- voir stdout d'un container: `docker logs` - voir stdout d'un container: `docker logs`
- créer et lancer un conteneur `docker run -d --name node-app -p 3000:3000 -v $(pwd):/app node:0.12.4 node /app/server.js` - créer et lancer un conteneur `docker run -d --name node-app -p 3000:3000 -v $(pwd):/app node:0.12.4 node /app/server.js`
- -d lance en tant que daemon - -d lance en tant que daemon
- --name permet de nommer le conteneur - --name permet de nommer le conteneur
- -p associe le port au port de l'hote (1er port pour l'hote et second pour le conteneur) - -p associe le port au port de l'hote (1er port pour l'hote et second pour le conteneur)
- -v $(pwd):/app : cette option permet de partager un dossier avec votre conteneur, ici, nous partageons le dossier courant (où se trouve notre fichier server.js) avec le dossier /app dans le conteneur (attention si vous êtes sur Mac ou Windows uniquement votre 'home' est partagé). - -v $(pwd):/app : cette option permet de partager un dossier avec votre conteneur, ici, nous partageons le dossier courant (où se trouve notre fichier server.js) avec le dossier /app dans le conteneur (attention si vous êtes sur Mac ou Windows uniquement votre 'home' est partagé).
- node:0.12.4 : l'image Docker que vous voulez utiliser. - node:0.12.4 : l'image Docker que vous voulez utiliser.
- node /app/server.js : la commande à exécuter dans le conteneur. - node /app/server.js : la commande à exécuter dans le conteneur.
@ -64,7 +66,7 @@ le .dockerignore permet comme un .gitignore de ne pas inclure certain fichiers d
## créer image ## créer image
- lancer la build du fichier: `docker build -t nomducontainer:tag .` - lancer la build du fichier: `docker build -t nomducontainer:tag .`
- -t permet de nommer l'image docker - -t permet de nommer l'image docker
pour ajouter un tag il faut utiliser pour ajouter un tag il faut utiliser
`docker tag` `docker tag`
@ -114,6 +116,8 @@ services:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
``` ```
- `docker-compose up` démarre les services décrits dans docker-compose.yml et ne rend pas la main. - `docker-compose up` démarre les services décrits dans docker-compose.yml et ne rend pas la main.
- `docker-compose up -d` fait la même chose mais rend la main une fois que les services sont démarrés. - `docker-compose up -d` fait la même chose mais rend la main une fois que les services sont démarrés.
- `docker-compose up build` reconstruit les services avant de les lancer. - `docker-compose up build` reconstruit les services avant de les lancer.

View File

@ -6,6 +6,7 @@
- need mosquito broker for mqtt - need mosquito broker for mqtt
## Cheatsheet ## Cheatsheet
- [icon material](https://cdn.materialdesignicons.com/4.5.95/) - [icon material](https://cdn.materialdesignicons.com/4.5.95/)

View File

@ -3,9 +3,6 @@
[Hack Xiaomi gateway V2](https://easydomoticz.com/forum/viewtopic.php?t=8397) [Hack Xiaomi gateway V2](https://easydomoticz.com/forum/viewtopic.php?t=8397)
## jeedom ## jeedom
- install docker avec database sur host - install docker avec database sur host
``` docker run --net host --name jeedom-server --privileged -v /opt/jeedom:/var/www/html -e ROOT_PASSWORD=toto -e APACHE_PORT=9080 jeedom/jeedom:alpha ``` ``` docker run --net host --name jeedom-server --privileged -v /opt/jeedom:/var/www/html -e ROOT_PASSWORD=toto -e APACHE_PORT=9080 jeedom/jeedom:alpha ```
- pour le l'hote SQL mettre 127.0.0.1 - pour le l'hote SQL mettre 127.0.0.1

View File

@ -1,7 +1,8 @@
# Fail2Ban
1. [Les réglages](#Les-reglages)
2. [Fail2Ban cli](#Fail2Ban-cli) 1. [Les réglages](#Les-reglages)
2. [Fail2Ban cli](#Fail2Ban-cli)
## [](#Les-reglages "Les réglages")Les réglages ## [](#Les-reglages "Les réglages")Les réglages
@ -11,7 +12,7 @@ Le fichier de configuration global `/etc/fail2ban/fail2ban.conf` ne contient pas
Dans sa configuration la plus simple, on se contente dactiver les _jails_ proposées par défaut. Voici par exemple une configuration minimaliste mais fonctionnelle. Dans sa configuration la plus simple, on se contente dactiver les _jails_ proposées par défaut. Voici par exemple une configuration minimaliste mais fonctionnelle.
```ini ```
[DEFAULT] [DEFAULT]
destemail = mon-email@mail.fr destemail = mon-email@mail.fr
@ -30,7 +31,8 @@ enabled = true
On peut néanmoins y ajouer encore quelques détails. De plus sachez que pour chaque _jail_ ainsi que pour `[DEFAULT]`, vous pouvez préciser `ignoreip`, qui permet, comme son nom lindique, de ne pas considérer certaines ip ou blocs dip. Pratique pour ne pas se retrouver à la porte de son propre serveur. On peut néanmoins y ajouer encore quelques détails. De plus sachez que pour chaque _jail_ ainsi que pour `[DEFAULT]`, vous pouvez préciser `ignoreip`, qui permet, comme son nom lindique, de ne pas considérer certaines ip ou blocs dip. Pratique pour ne pas se retrouver à la porte de son propre serveur.
```ini ```
[DEFAULT] [DEFAULT]
destemail = mon-email@mail.fr destemail = mon-email@mail.fr
@ -50,13 +52,13 @@ Vous voyez par exemple que jai ici aussi ajouté `apache`. Si vous avez un se
Ce nest pas tout, dautres options courantes sont à connaître : Ce nest pas tout, dautres options courantes sont à connaître :
*`port` permet de préciser les ports à bloquer, * `port` permet de préciser les ports à bloquer,
*`logpath` indique le fichier de log à analyser, * `logpath` indique le fichier de log à analyser,
*`maxretry` le nombre doccurences dans le fichier de log avant que laction ne soit déclenchée, * `maxretry` le nombre doccurences dans le fichier de log avant que laction ne soit déclenchée,
*`findtime` permet de spécifier le laps de temps pendant lequel on considère les occurences (au dela de findtime, on repart à zéro), * `findtime` permet de spécifier le laps de temps pendant lequel on considère les occurences (au dela de findtime, on repart à zéro),
*`bantime` définit le temps que lip restera bloquée via Fail2Ban. * `bantime` définit le temps que lip restera bloquée via Fail2Ban.
```ini ```
[…] […]
@ -73,11 +75,11 @@ Si vous parcourez `/etc/fail2ban/jail.conf`, vous pourrez voir les autres option
Enfin, vous pouvez également définir `backend`. Il sagit de la méthode de _surveillance_ des logs. Quatre méthodes sont proposées : Enfin, vous pouvez également définir `backend`. Il sagit de la méthode de _surveillance_ des logs. Quatre méthodes sont proposées :
*`pyinotify` : un module Python permettant de monitorer les modifications sur un fichier. * `pyinotify` : un module Python permettant de monitorer les modifications sur un fichier.
*`gamin` : même usage que le précédent, mais il sagit dun module du projet Gnome. * `gamin` : même usage que le précédent, mais il sagit dun module du projet Gnome.
*`polling` : le fichier est simplement vérifier à intervales régulièrs afin de vérifier sil y a eu des écritures. * `polling` : le fichier est simplement vérifier à intervales régulièrs afin de vérifier sil y a eu des écritures.
*`systemd` : ici, Fail2Ban se greffe sur SystemD afin dêtre alerté de nouveaux logs. * `systemd` : ici, Fail2Ban se greffe sur SystemD afin dêtre alerté de nouveaux logs.
*`auto` : mode automatique, qui va tenter toutes les solutions sus-mentionnées, dans cet ordre. * `auto` : mode automatique, qui va tenter toutes les solutions sus-mentionnées, dans cet ordre.
On peut donc dans la plupart des cas laisser `auto`. Sachez quil est toutefois possible de définir le `backend` au cas par cas au niveau de chaque jail. On peut donc dans la plupart des cas laisser `auto`. Sachez quil est toutefois possible de définir le `backend` au cas par cas au niveau de chaque jail.
@ -87,14 +89,14 @@ Ce qui est génial avec Fail2Ban, cest quil est possible dajouter autan
Nous commençons par créer un filtre afin de détecter les tentatives de connexion infructueuses. Dans un tel cas, notre applicatif devrait renvoyer une erreur 401. Voici un exemple de log que nous allons matcher : Nous commençons par créer un filtre afin de détecter les tentatives de connexion infructueuses. Dans un tel cas, notre applicatif devrait renvoyer une erreur 401. Voici un exemple de log que nous allons matcher :
```log ```
80.214.431.42 - - [14/Oct/2018:21:27:32 +0200] "POST /users/login HTTP/2.0" 401 30 "https://app.buzeo.me/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0" "-" 80.214.431.42 - - [14/Oct/2018:21:27:32 +0200] "POST /users/login HTTP/2.0" 401 30 "https://app.buzeo.me/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0" "-"
``` ```
Voici à quoi ressemble notre filtre (`/etc/fail2ban/filter.d/nginx-unauthorized`). Voici à quoi ressemble notre filtre (`/etc/fail2ban/filter.d/nginx-unauthorized`).
```ini ```
@ -108,7 +110,7 @@ Cest aussi simple que ça ! `<HOST>`, vous laurez deviné, permet à Fail2
Modifions maintenant notre configuration dans `/etc/fail2ban/jail.d/defaults-debian.conf` pour activer notre nouveau filtre. Modifions maintenant notre configuration dans `/etc/fail2ban/jail.d/defaults-debian.conf` pour activer notre nouveau filtre.
```ini ```
[…] […]
@ -128,7 +130,7 @@ bantime = 300
Fail2Ban possède plusieurs clients fort pratiques. `fail2ban-regex` permet de valider vos filtres et `fail2ban-client` permet de gérer tous les autres aspects du logiciel, de la vérification du contenu dune jail au redémarrage de loutil. Commençons par un rapide aperçu de loutil regex. Fail2Ban possède plusieurs clients fort pratiques. `fail2ban-regex` permet de valider vos filtres et `fail2ban-client` permet de gérer tous les autres aspects du logiciel, de la vérification du contenu dune jail au redémarrage de loutil. Commençons par un rapide aperçu de loutil regex.
```bash ```
fail2ban-regex <fichier-de-log | string-représentant-une-ligne-de-log> <chemin-du-filtre | string-regex> [<chemin-du-filtre | string-ignoregex] fail2ban-regex <fichier-de-log | string-représentant-une-ligne-de-log> <chemin-du-filtre | string-regex> [<chemin-du-filtre | string-ignoregex]
fail2ban-regex /var/log/nginx/access.log /etc/fail2ban/filter.d/nginx-unauthorized.conf fail2ban-regex /var/log/nginx/access.log /etc/fail2ban/filter.d/nginx-unauthorized.conf
@ -175,7 +177,7 @@ Retourne l'ensemble des commandes possibles.
Voici par exemple le retour de la commande `status`, nous nutilisons pas ici le mode interactif. Voici par exemple le retour de la commande `status`, nous nutilisons pas ici le mode interactif.
```bash ```
fail2ban-client status fail2ban-client status
Status Status
@ -250,7 +252,7 @@ Retourne les détails d'une jail en particulier.
Voici par exemple le statut dune jail. Voici par exemple le statut dune jail.
```bash ```
fail2ban-client status ssh fail2ban-client status ssh
Status for the jail: ssh Status for the jail: ssh
|- filter |- filter
@ -316,7 +318,7 @@ Affiche l'ensemble des actions liées à cette jail.
Enfin, il est également possible daltérer les paramètres des jails directement via la ligne de commande. Bien quon utilise en général directement les fichiers de configuration pour cela, ces commandes peuvent savérer particulièrement utiles afin de bannir ou dé-bannir manuellement des adresses. Enfin, il est également possible daltérer les paramètres des jails directement via la ligne de commande. Bien quon utilise en général directement les fichiers de configuration pour cela, ces commandes peuvent savérer particulièrement utiles afin de bannir ou dé-bannir manuellement des adresses.
```bash ```
fail2ban-client set <JAIL> banip <IP> fail2ban-client set <JAIL> banip <IP>

View File

@ -1,10 +1,8 @@
# git # git
![git](../img/git.jpg) ![git](../img/git.jpg)
## Clone with submodule recurse ## Clone with submodule recurse
add _--recurse-submodules_ to clone command add *--recurse-submodules* to clone command
## Add in staging only a part of modification done in a file ## Add in staging only a part of modification done in a file
@ -12,11 +10,11 @@ add _--recurse-submodules_ to clone command
this will ask if you want to add each modification with this option: this will ask if you want to add each modification with this option:
- _y_ - Yes, add this hunk - *y* - Yes, add this hunk
- _n_ - No, dont add this hunk - *n* - No, dont add this hunk
- _d_ - No, dont add this hunk and all other remaining hunks. Useful if youve already added what you want to, and want to skip over the rest - *d* - No, dont add this hunk and all other remaining hunks. Useful if youve already added what you want to, and want to skip over the rest
- _s_ - Split the hunk into smaller hunks. This only works if theres unchanged lines between the changes in the displayed hunk, so this wouldnt have any effect in the example above - *s* - Split the hunk into smaller hunks. This only works if theres unchanged lines between the changes in the displayed hunk, so this wouldnt have any effect in the example above
- _e_ - Manually edit the hunk. This is probably the most powerful option. As promised, it will open the hunk in a text editor and you can edit it to your hearts content - *e* - Manually edit the hunk. This is probably the most powerful option. As promised, it will open the hunk in a text editor and you can edit it to your hearts content
## delete a file only from git repository ## delete a file only from git repository
@ -25,28 +23,12 @@ this will ask if you want to add each modification with this option:
## delete a file from complete history ## delete a file from complete history
be carefull can't push repo last time use be carefull can't push repo last time use
need to be in a repo with no modification
```bash `git filter-branch --tree-filter 'rm -f passwords.txt' HEAD`
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $file" HEAD
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune
```
## create a repo from other repo subfoler
- clone the first repo
- go in this directory
- launch
```bash
git filter-branch --prune-empty --subdirectory-filter "subdirectory/path" master
```
- push in your new git repo
## changing email adress ## changing email adress
```bash ```
$ git filter-branch --commit-filter ' $ git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "schacon@localhost" ]; if [ "$GIT_AUTHOR_EMAIL" = "schacon@localhost" ];
then then
@ -86,11 +68,3 @@ fi
exit exit
``` ```
### use git ssh over proxy socks
`export GIT_SSH_COMMAND='ssh -o ProxyCommand="nc -X 5 -x 127.0.0.1:1080 %h %p"'`
### use git http over proxy socks
`git config http.proxy 'socks5://127.0.0.1:1080`

View File

@ -5,7 +5,7 @@ Git submodule allows ro add externel repository in a repository
## Adding submodule ## Adding submodule
- ```git submodule add http://git/toto.git $path``` - ```git submodule add http://git/toto.git $path```
this command add *<http://git/toto.git>* in *path* directory (add -b $branchname to follow specific branch) this command add *http://git/toto.git* in *path* directory (add -b $branchname to follow specific branch)
- after that you need to add and commit submodule folder - after that you need to add and commit submodule folder
to populate a submodule nested in other submodule to populate a submodule nested in other submodule
@ -21,12 +21,15 @@ to populate a submodule nested in other submodule
## Updating submodule ## Updating submodule
you can update a submodule Manually going in submodule folder and perform a ```git fetch``` and ```git merge``` you can update a submodule Manually going in submodule folder and perform a ```git fetch``` and ```git merge```
### Fetch and merge ### Fetch and merge
automatic process automatic process
- perform a ```git submodule update --remote``` - perform a ```git submodule update --remote```
in each case you need to commit update in project in each case you need to commit update in project

View File

@ -1,6 +1,6 @@
# ampache nginx config
```nginx
```
if ( !-d $request_filename ) { if ( !-d $request_filename ) {
rewrite ^/ampache/rest/(.*)\.view$ /ampache/rest/index.php?action=$1 last; rewrite ^/ampache/rest/(.*)\.view$ /ampache/rest/index.php?action=$1 last;
rewrite ^/ampache/rest/play/(.+)$ /ampache/play/$1 last; rewrite ^/ampache/rest/play/(.+)$ /ampache/play/$1 last;

View File

@ -1,12 +1,8 @@
# HTTP
## 1×× Informational ## 1×× Informational
- 100 Continue - 100 Continue
This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished. This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.
## 2×× Success ## 2×× Success
- 200 OK - 200 OK
The request has succeeded. The meaning of a success varies depending on the HTTP method: The request has succeeded. The meaning of a success varies depending on the HTTP method:
GET: The resource has been fetched and is transmitted in the message body. GET: The resource has been fetched and is transmitted in the message body.
@ -23,7 +19,6 @@
The response body contains multiple status informations for different parts of a batch/bulk request The response body contains multiple status informations for different parts of a batch/bulk request
## 3×× Redirection ## 3×× Redirection
- 300 Multiple Choices - 300 Multiple Choices
The request has more than one possible responses. User-agent or user should choose one of them. There is no standardized way to choose one of the responses. The request has more than one possible responses. User-agent or user should choose one of them. There is no standardized way to choose one of the responses.
- 301 Moved Permanently - 301 Moved Permanently
@ -36,7 +31,6 @@
This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response. This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.
## 4×× Client Error ## 4×× Client Error
- 400 Bad Request - 400 Bad Request
This response means that server could not understand the request due to invalid syntax. This response means that server could not understand the request due to invalid syntax.
- 401 Unauthorized - 401 Unauthorized
@ -51,7 +45,6 @@
The client does not consider rate limiting and sent too many requests. The client does not consider rate limiting and sent too many requests.
## 5×× Server Error ## 5×× Server Error
- 500 Internal Server Error - 500 Internal Server Error
The server has encountered a situation it doesn't know how to handle. The server has encountered a situation it doesn't know how to handle.
- 501 Not Implemented - 501 Not Implemented
@ -61,4 +54,4 @@
- 503 Service Unavailable - 503 Service Unavailable
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached. The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
For more info: <https://httpstatuses.com/> For more info: https://httpstatuses.com/

View File

@ -1,8 +1,6 @@
# nginx # nginx
## reverse proxy ## reverse proxy
```
```nginx
location /chainetv { location /chainetv {
proxy_pass http://unix:/run/gunicorn/socket:/; proxy_pass http://unix:/run/gunicorn/socket:/;
#proxy_set_header Host $host; #proxy_set_header Host $host;
@ -12,7 +10,6 @@
} }
``` ```
- le :/ aprés le socket sert a envoyer le sous répertoire a la suite de l'adresse demander l'appli écoute donc la route /api - le :/ aprés le socket sert a envoyer le sous répertoire a la suite de l'adresse demander l'appli écoute donc la route /api
- la parie commenté a le même fonctionnement mais permet un réglage plus fin associer a flask et la classe ReverseProxied par exemple: - la parie commenté a le même fonctionnement mais permet un réglage plus fin associer a flask et la classe ReverseProxied par exemple:
la location peut rediriger /chaine/api en metant le X-Script-ame a /chainetv l'appli peut donc écouter la route /api la location peut rediriger /chaine/api en metant le X-Script-ame a /chainetv l'appli peut donc écouter la route /api

12
IT/hugo.md Normal file
View File

@ -0,0 +1,12 @@
## hugo
hugo is a static website generator
## Usefull command
- `hugo server -b localhost/starter` launch a test server on your local machine
- -b is for baseURL option depend to configuration
- you can add -t with theme name if you have few theme installed
- `hugo new site .` create a new site skeleton
- `hugo new test.md ` create a new file in content folder
- `hugo` compile site

View File

@ -1,10 +1,7 @@
# instalation NExt cloud # instalation NExt cloud
## hook pacman ## hook pacman
- /etc/pacman.d/hooks/nextcloud.hook - /etc/pacman.d/hooks/nextcloud.hook
```
```ini
[Trigger] [Trigger]
Operation = Install Operation = Install
Operation = Upgrade Operation = Upgrade
@ -19,27 +16,22 @@ Exec = /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/nextcloud/occ
``` ```
## php ## php
- owner http /usr/share/webapps/nextcloud - owner http /usr/share/webapps/nextcloud
- Install PHP#gd and php-intl as additional modules. Configure OPcache as recommended by the documentation. Some apps (News for example) require the iconv extension, if you wish to use these apps, uncomment the extension in /etc/php/php.ini. - Install PHP#gd and php-intl as additional modules. Configure OPcache as recommended by the documentation. Some apps (News for example) require the iconv extension, if you wish to use these apps, uncomment the extension in /etc/php/php.ini.
in php.ini in php.ini
```
```ini
change memory_limit = 256M change memory_limit = 256M
``` ```
- cree repertoire data - cree repertoire data
```
```ini
mkdir /var/nextcloud mkdir /var/nextcloud
chown http:http /var/nextcloud chown http:http /var/nextcloud
chmod 750 /var/nextcloud chmod 750 /var/nextcloud
``` ```
- overide php-fpm - overide php-fpm
```
```ini
[Service] [Service]
ReadWritePaths = /usr/share/webapps/nextcloud/apps ReadWritePaths = /usr/share/webapps/nextcloud/apps
ReadWritePaths = /etc/webapps/nextcloud/config ReadWritePaths = /etc/webapps/nextcloud/config
@ -47,9 +39,10 @@ ReadWritePaths = /var/nextcloud
ReadWritePaths = /mnt/diskstation ReadWritePaths = /mnt/diskstation
``` ```
## config NGINX dédier
```nginx
## config NGINX dédier:
```
upstream php-handler { upstream php-handler {
# server 127.0.0.1:9000; # server 127.0.0.1:9000;
server unix:/var/run/php-fpm/php-fpm.sock; server unix:/var/run/php-fpm/php-fpm.sock;
@ -176,25 +169,20 @@ server {
access_log off; access_log off;
} }
} }
``` ```
- pour ssl [voir](https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html - pour ssl [voir](https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html
) )
## gestion database ## gestion database
## share ## share
- reconfigurer les share serveur en NFS pour que http est accé en lecture (analize a faire pour l'inpact sur les autre service) - reconfigurer les share serveur en NFS pour que http est accé en lecture (analize a faire pour l'inpact sur les autre service)
## fichier de config # fichier de config
## other
# other
- mettre en place cron de scan de fichier: - mettre en place cron de scan de fichier:
```
```bash
php /usr/share/webapps/nextcloud/occ files:scan --all php /usr/share/webapps/nextcloud/occ files:scan --all
``` ```

View File

@ -1,19 +1,18 @@
# Arch
![arch](../img/Arch_Linux_logo.svg.png) ![arch](../img/Arch_Linux_logo.svg.png)
## [instalation](Arch_Install.md) ## [instalation](arch_install.md)
## arch tips ## arch tips
### clés GPG corrompue ou usagé #### clés GPG corrompue ou usagé
```bash ```
sudo pacman -S archlinux-keyring sudo pacman -S archlinux-keyring
sudo pacmam-key --init sudo pacmam-key --init
sudo pacman-key --populate archlinux sudo pacman-key --populate archlinux
``` ```
### Personaliser un iso arch
#### Personaliser un iso arch
[archiso](https://wiki.archlinux.org/index.php/Archiso) [archiso](https://wiki.archlinux.org/index.php/Archiso)

View File

@ -1,5 +1,6 @@
# arch install ---
title: arch_install
---
![arch](../img/Arch_Linux_logo.svg.png) ![arch](../img/Arch_Linux_logo.svg.png)
The following is a brief installation tutorial for [Arch Linux][1]. It assumes The following is a brief installation tutorial for [Arch Linux][1]. It assumes
familiarity with the Arch [Beginner's Guide][2] and [Installation Guide][3]. familiarity with the Arch [Beginner's Guide][2] and [Installation Guide][3].
@ -14,87 +15,89 @@ Boot into the Arch installer.
If your console font is tiny ([HiDPI][7] systems), set a new font. If your console font is tiny ([HiDPI][7] systems), set a new font.
setfont sun12x22 $ setfont sun12x22
Connect to the Internet. Connect to the Internet.
Verify that the [system clock is up to date][8]. Verify that the [system clock is up to date][8].
timedatectl set-ntp true $ timedatectl set-ntp true
(bios mode) (bios mode)
parted -s /dev/sda mklabel msdos $ parted -s /dev/sda mklabel msdos
parted -s /dev/sda mkpart primary 1MiB 513MiB $ parted -s /dev/sda mkpart primary 1MiB 513MiB
parted -s /dev/sda mkpart primary 1024MiB 100% $ parted -s /dev/sda mkpart primary 1024MiB 100%
mkfs.ext2 /dev/sda1 $ mkfs.ext2 /dev/sda1
mkfs.ext4 /dev/sda2 $ mkfs.ext4 /dev/sda2
(UEFI mode) Create partitions for EFI, boot, and root. (UEFI mode) Create partitions for EFI, boot, and root.
parted -s /dev/sda mklabel gpt $ parted -s /dev/sda mklabel gpt
parted -s /dev/sda mkpart primary fat32 1MiB 513MiB $ parted -s /dev/sda mkpart primary fat32 1MiB 513MiB
parted -s /dev/sda set 1 boot on $ parted -s /dev/sda set 1 boot on
parted -s /dev/sda set 1 esp on $ parted -s /dev/sda set 1 esp on
parted -s /dev/sda mkpart primary 513MiB 1024MiB $ parted -s /dev/sda mkpart primary 513MiB 1024MiB
parted -s /dev/sda mkpart primary 1024MiB 100% $ parted -s /dev/sda mkpart primary 1024MiB 100%
mkfs.ext4 /dev/sda2 $ mkfs.ext4 /dev/sda2
mkfs.fat -F32 /dev/sda1 $ mkfs.fat -F32 /dev/sda1
Create and mount the encrypted root filesystem. Note that for UEFI systems Create and mount the encrypted root filesystem. Note that for UEFI systems
this will be partition 3. this will be partition 3.
pvcreate /dev/sda3pc
vgcreate arch /dev/mapper/lvm $ pvcreate /dev/sda3pc
lvcreate -L 4G arch -n swap $ vgcreate arch /dev/mapper/lvm
lvcreate -L 30G arch -n root $ lvcreate -L 4G arch -n swap
lvcreate -l +100%FREE arch -n home $ lvcreate -L 30G arch -n root
lvdisplay $ lvcreate -l +100%FREE arch -n home
mkswap -L swap /dev/mapper/arch-swap $ lvdisplay
mkfs.ext4 /dev/mapper/arch-root $ mkswap -L swap /dev/mapper/arch-swap
mkfs.ext4 /dev/mapper/arch-home $ mkfs.ext4 /dev/mapper/arch-root
mount /dev/mapper/arch-root /mnt $ mkfs.ext4 /dev/mapper/arch-home
mkdir /mnt/home $ mount /dev/mapper/arch-root /mnt
mount /dev/mapper/arch-home /mnt/home $ mkdir /mnt/home
swapon /dev/mapper/arch-swap $ mount /dev/mapper/arch-home /mnt/home
$ swapon /dev/mapper/arch-swap
(UEFI mode) Encrypt the boot partition using a separate passphrase from (UEFI mode) Encrypt the boot partition using a separate passphrase from
the root partition, then mount the boot and EFI partitions. the root partition, then mount the boot and EFI partitions.
mkdir /mnt/boot $ mkdir /mnt/boot
mount /dev/sda2 /mnt/boot $ mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi $ mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi $ mount /dev/sda1 /mnt/boot/efi
Optionally [edit the mirror list][9]. Optionally [edit the mirror list][9].
vi /etc/pacman.d/mirrorlist $ vi /etc/pacman.d/mirrorlist
Install the [base system][10]. Install the [base system][10].
pacstrap -i /mnt base base-devel net-tools wireless_tools dialog wpa_supplicant openssh git grub ansible $ pacstrap -i /mnt base base-devel net-tools wireless_tools dialog wpa_supplicant openssh git grub ansible
(UEFI mode) $ pacstrap /mnt efibootmgr (UEFI mode) $ pacstrap /mnt efibootmgr
Generate and verify [fstab][11]. Generate and verify [fstab][11].
genfstab -U -p /mnt >> /mnt/etc/fstab $ genfstab -U -p /mnt >> /mnt/etc/fstab
less /mnt/etc/fstab $ less /mnt/etc/fstab
Change root into the base install and perform [base configuration tasks][12]. Change root into the base install and perform [base configuration tasks][12].
arch-chroot /mnt /bin/bash $ arch-chroot /mnt /bin/bash
systemctl enable dhcpcd.service $ systemctl enable dhcpcd.service
systemctl enable sshd.service $ systemctl enable sshd.service
passwd $ passwd
modifier /etc/ssh/sshd_config et mettre PermitRoorlogin yes modifier /etc/ssh/sshd_config et mettre PermitRoorlogin yes
Set your mkinitcpio. Set your mkinitcpio.
only for UEFI # only for UEFI
sed -i 's/^HOOKS=.*/HOOKS="base udev autodetect modconf block keyboard lvm2 resume filesystems fsck"/' /etc/mkinitcpio.conf $ sed -i 's/^HOOKS=.*/HOOKS="base udev autodetect modconf block keyboard lvm2 resume filesystems fsck"/' /etc/mkinitcpio.conf
for both # for both
mkinitcpio -p linux $ mkinitcpio -p linux
Configure GRUB. Configure GRUB.
@ -110,12 +113,13 @@ Configure GRUB.
Cleanup and reboot! Cleanup and reboot!
exit $ exit
umount -R /mnt $ umount -R /mnt
reboot $ reboot
Run ansible! Run ansible!
[1]: https://www.archlinux.org/ [1]: https://www.archlinux.org/
[2]: https://wiki.archlinux.org/index.php/Beginners'_guide [2]: https://wiki.archlinux.org/index.php/Beginners'_guide
[3]: https://wiki.archlinux.org/index.php/Installation_guide [3]: https://wiki.archlinux.org/index.php/Installation_guide

View File

@ -1,6 +1,6 @@
# cron # cron
```bash ```
# * * * * * command to execute # * * * * * command to execute
# │ │ │ │ │ # │ │ │ │ │
# │ │ │ │ │ # │ │ │ │ │
@ -10,18 +10,13 @@
# │ └──────────────────── hour (0 - 23) # │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59) # └───────────────────────── min (0 - 59)
``` ```
[test cron](https://crontab.guru/) [test cron](https://crontab.guru/)
See also See also
- [wikipedia/cron](http://en.wikipedia.org/wiki/Cron)
[wikipedia/cron](http://en.wikipedia.org/wiki/Cron)
## cron directories ## cron directories
You can create directories that run cron commands. Taken from the `Ubuntu` You can create directories that run cron commands. Taken from the `Ubuntu`
distro: distro:
```txt ```txt
# /etc/crontab: system-wide crontab # /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab' # Unlike any other crontab you don't have to run the `crontab'
@ -40,15 +35,13 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
``` ```
## run every weekday at midnight ## run every weekday at midnight
```sh ```sh
0 0 * * 0-5 0 0 * * 0-5
``` ```
## edit cronjobs ## edit cronjobs
```sh ```sh
sudo crontab -e $ sudo crontab -e
``` ```
## user crontab lcation ## user crontab lcation

View File

@ -1,22 +1,19 @@
# grub_shell ## grub_shell
## booter depuis le shell grub # booter depuis le shell grub
- les commande **cat** et **ls** fonctionne - les commande **cat** et **ls** fonctionne
- trouver partition de boot - trouver partition de boot
- mettre la partion en racine `set root=(hd0,1)` - mettre la partion en racine `set root=(hd0,1)`
- charger le kernel ce trouvant sur cette partition et setter la partition racine: `linux /vmlinuz root=/dev/sda3` - charger le kernel ce trouvant sur cette partition et setter la partition racine: `linux /vmlinuz root=/dev/sda3`
- charger le fichier image correspondant au kernel :`initrd /boot/initrd.img` - charger le fichier image correspondant au kernel :`initrd /boot/initrd.img`
- enter `boot` to boot - enter `boot` to boot
## regénérer config ## regénérer config
`grub-mkconfig -o /boot/grub/grub.cfg` `grub-mkconfig -o /boot/grub/grub.cfg`
## install sur MBR ## install sur MBR
`grub-install --target=i386-pc /dev/sdX` `grub-install --target=i386-pc /dev/sdX`
## meme chose depuis grub rescue ## meme chose depuis grub rescue
`grub rescue> set prefix=(hd0,1)/boot/grub `grub rescue> set prefix=(hd0,1)/boot/grub

View File

@ -1,12 +1,8 @@
# Linux
![linux](../img/linux.png) ![linux](../img/linux.png)
## retrouvé date t'instalation ## retrouvé date t'instalation
`ls -lct /etc | tail -1 | awk '{print $6, $7, $8}'` `ls -lct /etc | tail -1 | awk '{print $6, $7, $8}'`
## enable Wayland support ## enable Wayland support:
- execute `ln -s /dev/null /etc/udev/rules.d/61-gdm.rules` to avoid that gnome test your nvidia Driver - execute `ln -s /dev/null /etc/udev/rules.d/61-gdm.rules` to avoid that gnome test your nvidia Driver
@ -18,8 +14,7 @@
`MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)` `MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)`
- create pacman hook: - create pacman hook:
```
```ini
[Trigger] [Trigger]
Operation=Install Operation=Install
Operation=Upgrade Operation=Upgrade
@ -37,10 +32,12 @@ NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P' Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'
``` ```
## see if you run on wayland
## see if you run on wayland:
`loginctl show-session $(loginctl G $USERNAME|awk '{print $1}') -p Type` `loginctl show-session $(loginctl G $USERNAME|awk '{print $1}') -p Type`
## boot in emergency target ## boot in emergency target
1. (Re)boot the machine 1. (Re)boot the machine
@ -50,7 +47,3 @@ Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /
systemd.unit=emergency.target systemd.unit=emergency.target
5. press ctrl+x 5. press ctrl+x
6. put root writable with `mount -o rw,remount /` 6. put root writable with `mount -o rw,remount /`
## disable IPV6
`sysctl -b net.ipv6.conf.all.disable_ipv6=1`

View File

@ -1,34 +1,31 @@
# shell #shell
## tips ##tips
- setter IFS au retour chariot - setter IFS au retour chariot
``` IFS=$'\n'```
```IFS=$'\n'```
## boucle ## boucle
```
```bash
for var in $variable for var in $variable
do do
commande commande
done done
``` ```
## if ## if
```bash ```
if [ test ]; then if [ test ]; then
echo "C'est vrai" echo "C'est vrai"
else else
echo "c'est faux" echo "c'est faux"
fi fi
``` ```
### test ### test
#### string #### string
|test|def| |test|def|
|----|---| |----|---|
|$a = j$b|egale| |$a = j$b|egale|
@ -47,6 +44,7 @@ fi
|$a -gt $b| >| |$a -gt $b| >|
|$a -ge $b| >= | |$a -ge $b| >= |
#### file #### file
|test|def| |test|def|
@ -61,7 +59,7 @@ fi
## Supprimer les Dossiers contenant 1 élement ## Supprimer les Dossiers contenant 1 élement
```bash ```
IFS=$'\n';for i in $(ls) do  ✔  10022  18:29:32  IFS=$'\n';for i in $(ls) do  ✔  10022  18:29:32 
if [ $(ls $i|wc|awk '{print $1}') = 1 ] if [ $(ls $i|wc|awk '{print $1}') = 1 ]
then then

View File

@ -1,11 +1,13 @@
# ZSH
![zsh](../img/zsh.jpg) ![zsh](../img/zsh.jpg)
## functionality # functionality
## shortcut
# shortcut
key|comportment key|comportment
---|----------- ---|-----------
| |

View File

@ -1,5 +1,3 @@
# Migration server procédure
- modifier le nat de la box - modifier le nat de la box
- modifier le Cname www sur dns - modifier le Cname www sur dns
- ajouter le nouveau serveur au autorisation de réplication DNS si serveur DNS Slave - ajouter le nouveau serveur au autorisation de réplication DNS si serveur DNS Slave

View File

@ -1,11 +1,12 @@
# Motorola #Motorola
[tuto root](https://forum.xda-developers.com/motorola-one-pro/development/root-twrp-3-4-0-android-10-t4156037 [tuto root](https://forum.xda-developers.com/motorola-one-pro/development/root-twrp-3-4-0-android-10-t4156037
) )
## root without twrp ## root without twrp
firmware stock: [https://mirrors.lolinet.com/firmware/moto/parker/official/RETEU/] firmware stock:https://mirrors.lolinet.com/firmware/moto/parker/official/RETEU/
- recover boot.img in firmaware sotck image - recover boot.img in firmaware sotck image
- install magisk Manager on your smartphone [apk here]([https://link](https://github.com/topjohnwu/Magisk/releases/)) - install magisk Manager on your smartphone [apk here]([https://link](https://github.com/topjohnwu/Magisk/releases/))
@ -23,3 +24,5 @@ firmware stock: [https://mirrors.lolinet.com/firmware/moto/parker/official/RETEU
- launch your OTA update - launch your OTA update
- in magisk patch in inactive slot - in magisk patch in inactive slot
- reboot your phone - reboot your phone

View File

@ -1,3 +1 @@
# Patrons de conception
[patron de conception](https://fr.m.wikibooks.org/wiki/Patrons_de_conception/) [patron de conception](https://fr.m.wikibooks.org/wiki/Patrons_de_conception/)

View File

@ -1,10 +1,6 @@
# python # python
## référence ## référence
https://github.com/gto76/python-cheatsheet/blob/master/README.md
<https://github.com/gto76/python-cheatsheet/blob/master/README.md>
[python pateterns](https://github.com/faif/python-patterns)
Afficher les warning:```python -Wd``` Afficher les warning:```python -Wd```
Mode développement :`-X dev` Mode développement :`-X dev`
@ -14,7 +10,6 @@ Mode développement :`-X dev`
</details>` </details>`
## Virtual env ## Virtual env
- create virtual env: `python3 -m venv /path` - create virtual env: `python3 -m venv /path`
- enter in virtual env: `source env/bin/activate` - enter in virtual env: `source env/bin/activate`
- leave venv: `deactivate` - leave venv: `deactivate`
@ -22,12 +17,8 @@ Mode développement :`-X dev`
- install package list in file: `pip install -r requirement.txt` - install package list in file: `pip install -r requirement.txt`
## tips ## tips
- pprint permet d afficher vos structure de données - pprint permet d afficher vos structure de données
- la fonction dir() permet de lister les attribut d un - la fonction dir() permet de lister les attribut d un
## unitest ## unitest
### lancer une suite de tests ### lancer une suite de tests
```python -m unittest tests.suite``` ```python -m unittest tests.suite```

View File

@ -1,10 +1,9 @@
# raspberry.md #raspberry.md
## activer sortie audio jack ## activer sortie audio jack
/boot/config.txt /boot/config.txt
```
```ini
device_tree_param=audio=on device_tree_param=audio=on
audio_pwm_mode=2 audio_pwm_mode=2
``` ```

View File

@ -1,5 +1,3 @@
# Regex
[regex prefaite](https://ihateregex.io/?q=) [regex prefaite](https://ihateregex.io/?q=)
[regex101](https://regex101.com/) [regex101](https://regex101.com/)

View File

@ -1,27 +1,17 @@
# ssh # ssh
![ssh](img/ssh.png) ![ssh](img/ssh.png)
## port forwarding ## port forwarding
```
```bash
Ssh -L 2000:toto:80 Vincent@tata Ssh -L 2000:toto:80 Vincent@tata
``` ```
Redirigé le port local 2000 vers le port 80 de toto en passant par un tunnel via tata Redirigé le port local 2000 vers le port 80 de toto en passant par un tunnel via tata
-f pour laisser la commande en arrière plan -f pour laisser la commande en arrière plan
-R pour forwarder un port distant ici avec -R le port 2000 de tata sera rediriger vers le 80 de toto en passant par le client -R pour forwarder un port distant ici avec -R le port 2000 de tata sera rediriger vers le 80 de toto en passant par le client
## ingore know host file ## ingore know host file
```bash ```
ssh -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null ssh -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null
``` ```
## connection over Proxy socks
````bash
-o "ProxyCommand=nc -X 5 -x 127.0.0.1:1080 %h %p"
```
````

15
IT/syncthing.MD Normal file
View File

@ -0,0 +1,15 @@
# list syncthing share on main Server
- Pi2:
-name:beet_db
path:/mnt/diskstation/home/beet_db
type:sendreceive
-name:notes
path:/mnt/diskstation/home/notes2
type:sendreceive
-name:Caméra
path:/mnt/diskstation/photo/backup
type:receiveonly
-name:keepass
path:/mnt/diskstation/home/keepass
type:sendreceive

View File

@ -1,8 +1,8 @@
# Tips on synology NAS ## Tips on synology NAS
## debug the ssl certificate renew on synology
### debug the ssl certificate renew on synology
in case of error in the renewal of synology certificate with let's encrypt proceed like this: in case of error in the renewal of synology certificate with let's encrypt proceed like this:
- connect to synology with SSH - connect to synology with SSH
- enter command ```sudo /usr/syno/sbin/syno-letsencrypt renew-all -v``` - enter command ```sudo /usr/syno/sbin/syno-letsencrypt renew-all -v```

View File

@ -8,6 +8,7 @@ personal config [Here](https://git.ducamps.win/vincent/conf2/src/branch/master/t
shift+select to use remote selection clipboard shift+select to use remote selection clipboard
## command ## command
command | comportment command | comportment
@ -15,6 +16,7 @@ command | comportment
ls | print running session ls | print running session
attach -t 0 | connect to session pass in parameter attach -t 0 | connect to session pass in parameter
## keyboard shortcut ## keyboard shortcut
- master key: ctrl-b - master key: ctrl-b
@ -22,7 +24,7 @@ attach -t 0 | connect to session pass in parameter
key|comportment key|comportment
---|----------- ---|-----------
? | print all shortcut ? | print all shortcut
\- | split vertical panel - | split vertical panel
\| | split horizontal panel \| | split horizontal panel
z | full screen panel z | full screen panel
c | create window c | create window
@ -34,3 +36,5 @@ s | list session
## move into pane ## move into pane
Use atl with directional arrow or vim mode key jklm Use atl with directional arrow or vim mode key jklm

View File

@ -5,7 +5,6 @@
[tuto config](https://jdhao.github.io/2018/12/24/centos_nvim_install_use_guide_en/) [tuto config](https://jdhao.github.io/2018/12/24/centos_nvim_install_use_guide_en/)
## config ## config
I use NVIM instead vim I use NVIM instead vim
config [Here](https://git.ducamps.win/vincent/conf2/src/branch/master/nvim/.config/nvim/init.vim) config [Here](https://git.ducamps.win/vincent/conf2/src/branch/master/nvim/.config/nvim/init.vim)
@ -23,8 +22,8 @@ Utiliser en tant que manager de plugin
- update vim-plug: - update vim-plug:
```:PlugUpgrade``` ```:PlugUpgrade```
## Les raccourcis clavier de Vim (tous mode confondu)
## Les raccourcis clavier de Vim (tous mode confondu)
-------------------------------------------------- --------------------------------------------------
> Les raccourcis clavier de Vim (tous mode confondu) Vim est un éditeur de texte intégré hautement configurable permettant dédition des textes efficacement. Ce est une version améliorée de l&#… > Les raccourcis clavier de Vim (tous mode confondu) Vim est un éditeur de texte intégré hautement configurable permettant dédition des textes efficacement. Ce est une version améliorée de l&#…
@ -34,7 +33,6 @@ Vim est un éditeur de texte intégré hautement configurable permettant déd
Voici une liste des raccourcis clavier de Vim. Voici une liste des raccourcis clavier de Vim.
### custom config ### custom config
leader: space leader: space
|conb|action| |conb|action|
@ -135,3 +133,5 @@ Ces raccourcis permettent de faire dexécuter des commandes ou dexécuter
| Ctrl+o | Basculer en mode normal pour la prochaine commande | | Ctrl+o | Basculer en mode normal pour la prochaine commande |
| Ctrl+a | Incrémente le nombre | | Ctrl+a | Incrémente le nombre |
| Ctrl+x | Décrémente le nombre | | Ctrl+x | Décrémente le nombre |

View File

@ -1,7 +1,5 @@
# Virsh
## virsh usefull command ## virsh usefull command
### standart ### standart
- recover configuration xml from VM: `virsh dumpxml windows7> windows7.xml` - recover configuration xml from VM: `virsh dumpxml windows7> windows7.xml`
@ -12,10 +10,9 @@
- create with xml file:`create --file debian8.xml` - create with xml file:`create --file debian8.xml`
- force shutdown:`virsh destroy win7` - force shutdown:`virsh destroy win7`
### snapshot ### snapshot:
- list for domain `virsh snapshot-list --domain nas` - list for domain `virsh snapshot-list --domain nas`
- create snapshot `virsh snapshot-create-as --domain {VM-NAME} --name {SNAPSHOT-NAME} --live` - create snapshot `virsh snapshot-create-as --domain {VM-NAME} --name {SNAPSHOT-NAME} --live `
- info snapshot: ` virsh snapshot-info --domain nas --snapshotname "ansible ping OK" ` - info snapshot: ` virsh snapshot-info --domain nas --snapshotname "ansible ping OK" `
- appliquer une snapshot: `virsh snapshot-revert --domain --snapshotname "ansible ping OK" --running` - appliquer une snapshot: `virsh snapshot-revert --domain --snapshotname "ansible ping OK" --running`
- delete snapshot: `virsh snapshot-delete --domain freebsd --snapshotname 5Sep2016_S2` - delete snapshot: `virsh snapshot-delete --domain freebsd --snapshotname 5Sep2016_S2`
@ -23,18 +20,16 @@
## share folder with host ## share folder with host
- add a filesystem device to your host: - add a filesystem device to your host:
```
```xml
<filesystem type='mount' accessmode='squash'> <filesystem type='mount' accessmode='squash'>
<source dir='/home/vincent/Documents'/> <source dir='/home/vincent/Documents'/>
<target dir='/mnt/workplace'/> <target dir='/mnt/workplace'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</filesystem> </filesystem>
``` ```
- on guest mount the filesystem: - on guest mount the filesystem:
- with mount cmd :`mount -t 9p -o trans=virtio,version=9p2000.L mount_tag /path/to/mount_point/on/guest` - with mount cmd :`mount -t 9p -o trans=virtio,version=9p2000.L mount_tag /path/to/mount_point/on/guest`
- in your fstab:`mount_tag/path/to/mount_point/on/guest 9p trans=virtio,version=9p2000.L 0 0` - in your fstab:`mount_tag /path/to/mount_point/on/guest 9p trans=virtio,version=9p2000.L 0 0`
- add in **9pnet_virtio** to **/etc/modules-load.d/9pnet_virtio.conf** - add in **9pnet_virtio** to **/etc/modules-load.d/9pnet_virtio.conf**
## enabling guest function on arch ## enabling guest function on arch
@ -42,6 +37,6 @@
- install `spice-vdagent` - install `spice-vdagent`
- add in etc/mkinitcpio.conf - add in etc/mkinitcpio.conf
```ini ```
MODULES=(virtio virtio_blk virtio_pci virtio_net) MODULES=(virtio virtio_blk virtio_pci virtio_net)
``` ```

View File

@ -1,5 +1,3 @@
# YAML
[YAML](https://en.wikipedia.org/wiki/YAML) (a recursive acronym for "YAML Ain't [YAML](https://en.wikipedia.org/wiki/YAML) (a recursive acronym for "YAML Ain't
Markup Language") is a human-readable data-serialization language. It is Markup Language") is a human-readable data-serialization language. It is
commonly used for configuration files and in applications where data is being commonly used for configuration files and in applications where data is being

View File

@ -2,4 +2,5 @@
![&notebook](Divers/img/notebook.webp) ![&notebook](Divers/img/notebook.webp)
Ceci est mon wiki personnel où je partage mes notes sous la forme d'un livre MkDocs en ligne via mon instance [gitea](https://git.ducamps.win/). Ceci est mon wiki personnel où je partage mes notes sous la forme d'un livre MkDocs en ligne via mon instance [gitea](https://git.ducamps.win/).

View File

@ -1,26 +1,24 @@
---
site_name: Notebook site_name: Notebook
site_url: https://www.ducamps.win/notebook site_url: https://www.ducamps.win/notebook
site_author: Vincent Ducamps site_author: Vincent Ducamps
plugins: plugins:
- search - search
- minify: - minify:
minify_html: true minify_html: true
- section-index
theme: theme:
language: fr language: fr
name: material name: material
highlightjs: true highlightjs: true
palette: palette:
scheme: default scheme: default
primary: teal primary: teal
accent: red accent: red
hljs_languages: hljs_languages:
- yaml - yaml
features: features:
- navigation.indexes - navigation.instant
- navigation.instant - navigation.tabs
- navigation.tabs
- search.highlight
repo_url: https://git.ducamps.win/vincent/notebook repo_url: https://git.ducamps.win/vincent/notebook
repo_name: Vincent/notebook repo_name: Vincent/notebook
extra: extra:

View File

@ -2,4 +2,3 @@ mkdocs
mkdocs-material mkdocs-material
mkdocs-minify-plugin mkdocs-minify-plugin
mkdocs-section-index mkdocs-section-index
lunr