forked from vincent/notebook
Compare commits
106 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f69019c647 | ||
|
0eee50db54 | ||
|
62c0951eea | ||
|
afd445c4e0 | ||
|
25778c83d6 | ||
|
5cbd91e686 | ||
|
3ee8fa6553 | ||
|
e586bfaee9 | ||
|
1783ac4390 | ||
|
64cb5492dd | ||
|
a2ed02ddfb | ||
|
d57a3f6893 | ||
|
a651496660 | ||
|
a9aa229836 | ||
|
9f9bf9ddeb | ||
|
b4aa9b23a6 | ||
|
6bd6fe5780 | ||
|
bf47088cd3 | ||
|
55314752d8 | ||
|
70747a9f17 | ||
|
d390bbb889 | ||
|
5c2da92d71 | ||
|
a065caf8cc | ||
|
5aeaa1be8d | ||
|
0cdabfdced | ||
|
3b332499f3 | ||
|
5b620cd77f | ||
|
945b046d0c | ||
|
c2cf8812bb | ||
|
2ec6daa289 | ||
|
9ccfe5c075 | ||
|
62f0764e4b | ||
|
d4bd5acbc2 | ||
|
21b129de71 | ||
|
727f4aedab | ||
|
ff284841c2 | ||
|
d19dde4d9a | ||
|
7170457247 | ||
|
94ac02ad8d | ||
|
1aa278c9df | ||
|
5ccfec56fc | ||
|
a4ecd15f41 | ||
|
c35c8af5b5 | ||
|
1bf05ba40b | ||
|
b052a017d8 | ||
|
3967cb6caa | ||
|
41ffb827ae | ||
|
f0fecdeae2 | ||
|
0621f25f8f | ||
|
eb06c9c60c | ||
|
5e867887f2 | ||
|
1f21e0fd74 | ||
|
5a8dab4e61 | ||
|
d37bbb53ba | ||
|
bc0e4d30c3 | ||
|
e8602dd808 | ||
|
1de3e9c8b3 | ||
|
38bd57bf6a | ||
|
5031d0646e | ||
|
be35668650 | ||
|
c95d21028b | ||
|
a22d91797a | ||
|
ec3f260bf6 | ||
|
64af0eeb68 | ||
|
e97065ee8d | ||
|
b0d1642e63 | ||
|
bb3f071588 | ||
|
b833ab3f2a | ||
|
b86a65b7c2 | ||
|
a2d9e6b2c0 | ||
|
ccbde8f456 | ||
|
8e7eac97c2 | ||
|
150861fbf4 | ||
|
ea69636eb1 | ||
|
b1ac1c9d42 | ||
|
6c62f78aba | ||
|
79acab27e3 | ||
|
0720889e21 | ||
|
68b2b6fc13 | ||
|
24fd05573f | ||
|
e1a28cedfe | ||
|
07df67d2b4 | ||
|
c8249b1fdc | ||
|
0397664ae4 | ||
|
f82cdaf736 | ||
|
3f70024521 | ||
|
e09edfaf10 | ||
|
efbd8ba596 | ||
|
e39d6dcee3 | ||
|
f7db49b554 | ||
|
29e312aea8 | ||
|
565bf8a0b2 | ||
|
d0ebe3bc3a | ||
|
dad975bee2 | ||
|
147fd491a1 | ||
|
da2dd6b8c0 | ||
|
8d96a7f872 | ||
|
d59ceb5aae | ||
|
0add0b01d3 | ||
|
26bc9e333f | ||
|
3253837e6a | ||
|
5ae312fdad | ||
|
ade1932487 | ||
|
4e0182a9f8 | ||
|
0679ac8497 | ||
|
fe40b9fffe |
65
.drone.yml
Normal file
65
.drone.yml
Normal file
@ -0,0 +1,65 @@
|
||||
---
|
||||
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
|
9
.markdownlint.yaml
Normal file
9
.markdownlint.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
# Default state for all rules
|
||||
default: true
|
||||
MD009:
|
||||
strict: false
|
||||
|
||||
MD013: false
|
||||
MD033: false
|
||||
MD024: false
|
7
.yamllint
Normal file
7
.yamllint
Normal file
@ -0,0 +1,7 @@
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
# 80 chars should be enough, but don't fail if a line is longer
|
||||
line-length:
|
||||
max: 80
|
||||
level: warning
|
143
Checklist/Bikepacking.md
Normal file
143
Checklist/Bikepacking.md
Normal file
@ -0,0 +1,143 @@
|
||||
# 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
|
@ -1,4 +1,6 @@
|
||||
# checklist rando
|
||||
# rando
|
||||
|
||||
## general
|
||||
|
||||
- Tente
|
||||
- Sac de couchage
|
||||
@ -6,16 +8,17 @@
|
||||
- Tapis de sol/matelas gonflable
|
||||
- gamelle
|
||||
- Rechaud
|
||||
- couvert
|
||||
- tasse cafe
|
||||
- fourchette spock
|
||||
- couteau
|
||||
- tasse a café
|
||||
- trousse a pharmacie/dolipranne/immodium..
|
||||
- imper
|
||||
- pantalon de pluie au besoin
|
||||
- Chaussure rando
|
||||
- Tong
|
||||
- polaire
|
||||
- chausette
|
||||
- slip
|
||||
- gant
|
||||
- tour de coup\*2
|
||||
- lingette bb/paquet mouchoir/PQ
|
||||
- savon
|
||||
- créme solaire
|
||||
@ -25,14 +28,21 @@
|
||||
- brosse a dent
|
||||
- Gourde/bouteille d'eau ~min 2L
|
||||
- ficelle
|
||||
- couteau
|
||||
- batterie
|
||||
- chargeur
|
||||
- pince a linge
|
||||
- petzel
|
||||
- sac poubelle
|
||||
- Sac congation
|
||||
- Sac congelation
|
||||
- briquet
|
||||
- carte d'identité
|
||||
- liquide
|
||||
- short
|
||||
- pantalon leggins pour le soir
|
||||
|
||||
## rando
|
||||
|
||||
- Chaussure rando
|
||||
- polaire
|
||||
- baton
|
||||
- cart d'identité
|
||||
- liquide
|
||||
- casquette
|
@ -1,9 +1,13 @@
|
||||
# velo travail
|
||||
|
||||
## voiture
|
||||
|
||||
- vélo dans la voiture
|
||||
- huile
|
||||
- casque velo
|
||||
|
||||
## affaire travail
|
||||
|
||||
- haut
|
||||
- pantalon
|
||||
- callecon
|
||||
@ -17,6 +21,7 @@
|
||||
- ceinture
|
||||
|
||||
## affaire velo
|
||||
|
||||
- sous vetement haut
|
||||
- deuxiéme couche
|
||||
- kway
|
||||
@ -28,7 +33,3 @@
|
||||
- chaussure
|
||||
- chausette
|
||||
- écouteur
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Américano
|
||||
|
||||
* Cointreau 2cl
|
||||
* Martini Blanc 3cl
|
||||
* Campari 4cl
|
||||
* Martini Rouge 5cl
|
||||
* Martini Rouge 5cl
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Cosmopolitan (version modifié Noël 2020)
|
||||
|
||||
- Vodka 3cl
|
||||
- Cointreau 1cl
|
||||
- Limoncello 0.5cl
|
||||
- Chambord 0.5cl
|
||||
- Jus de citron 1cl
|
||||
- Jus de cranberry 3cl
|
||||
- Jus de cranberry 3cl
|
||||
|
@ -1,8 +1,10 @@
|
||||
# Gin Fizz
|
||||
|
||||
- Gin 6cl
|
||||
- Sirop de sucre de canne 2cl
|
||||
- Jus de citron vert 4cl
|
||||
- Eau gazeuse 12 cl
|
||||
|
||||
## Indication
|
||||
- Mélange à réaliser au shaker avant d'ajouter l'eau gazeuse.
|
||||
## Indication
|
||||
|
||||
- Mélange à réaliser au shaker avant d'ajouter l'eau gazeuse.
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Sex on the beach
|
||||
# Sex on the beach
|
||||
|
||||
- Vodka 3cl
|
||||
- Chambord 2cl
|
||||
- Liqueur de pêche 2cl
|
||||
- Jus d'annanas 5cl
|
||||
- Jus de cranberry 6cl
|
||||
- Jus de cranberry 6cl
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Singapore Sling
|
||||
|
||||
- Gin 4cl
|
||||
- Liqueur de cerise 2cl
|
||||
- Sirop de grenadine 1cl
|
||||
@ -6,4 +7,4 @@
|
||||
- Benedictine 0.5cl
|
||||
- Jus d'ananas 8cl
|
||||
- Jus de citron 3cl
|
||||
- (Angustura bitters 1 trait)
|
||||
- (Angustura bitters 1 trait)
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Soupe de cidre ( 7 personnes)
|
||||
|
||||
- Cognac 3 cl
|
||||
- Sirop de sucre de canne 15cl
|
||||
- Jus d'orange 30cl
|
||||
- Cidre 1 bouteille
|
||||
- Cidre 1 bouteille
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Apérol Spritz
|
||||
|
||||
- Apérol 2cl
|
||||
- Proseco 3cl
|
||||
- Eau gazeuse 1 trait
|
||||
- Eau gazeuse 1 trait
|
||||
|
81
Cuisine/Idee cuisine.md
Normal file
81
Cuisine/Idee cuisine.md
Normal file
@ -0,0 +1,81 @@
|
||||
# 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
|
@ -1,64 +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
|
||||
- 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é
|
@ -1,4 +1,5 @@
|
||||
# Mental Model
|
||||
|
||||
## Links
|
||||
|
||||
- [Ask HN: Which books teach mental models?](https://news.ycombinator.com/item?id=19895407)
|
@ -1,3 +1,5 @@
|
||||
# lien
|
||||
|
||||
[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)
|
@ -1,3 +1,5 @@
|
||||
# hey hey my my
|
||||
|
||||
Hey hey, my my
|
||||
Rock and roll can never die
|
||||
There's more to the picture
|
||||
@ -21,4 +23,4 @@ My my, hey hey
|
||||
Rock and roll is here to stay
|
||||
It's better to burn out
|
||||
Than to fade away
|
||||
My my, hey hey
|
||||
My my, hey hey
|
29
Divers/Replique Citation/citation.md
Normal file
29
Divers/Replique Citation/citation.md
Normal file
@ -0,0 +1,29 @@
|
||||
# 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 s’acquiert pas en naissant. Elle se mérite par les actes.
|
||||
|
||||
Robin des bois prince des voleur
|
||||
|
||||
> Gagner, ce n’est pas finir en première position. Ce n’est pas battre les autres. Gagner c’est se vaincre soi-même. Vaincre notre corps, nos limites et nos peurs. Gagner, c’est se dépasser soi-même et transformer les rêves en réalité.
|
||||
|
||||
Kilian Jornet, ultra traileur, vainqueur de l’UTM
|
||||
|
||||
> 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
|
@ -1,26 +1,27 @@
|
||||
# eldorado
|
||||
|
||||
Un chevalier
|
||||
sur son coursier,
|
||||
jour et nuit au grand galop
|
||||
, courut longtemps
|
||||
tout en chantant.
|
||||
Il cherchait l'El Dorado,
|
||||
au-delà des monts
|
||||
tout en chantant.
|
||||
Il cherchait l'El Dorado,
|
||||
au-delà des monts
|
||||
les plus hauts,
|
||||
dans les profondeurs de la terre,
|
||||
dans les profondeurs de la terre,
|
||||
poursuivant sa chimère !
|
||||
|
||||
A moitié mort,
|
||||
marchant encore,
|
||||
|
||||
A moitié mort,
|
||||
marchant encore,
|
||||
il vit une ombre au grand galop.
|
||||
Il lui cria, "
|
||||
Ombre dis-moi, suis-je encore loin d'El Dorado ?
|
||||
"
|
||||
"
|
||||
|
||||
"
|
||||
|
||||
Au-delà des monts
|
||||
les plus hauts,
|
||||
les plus hauts,
|
||||
dans les profondeurs de la terre,
|
||||
chevauche sans repos,
|
||||
dit l'ombre solitaire,
|
||||
dit l'ombre solitaire,
|
||||
si tu cherches El Dorado !
|
||||
"
|
@ -1,4 +1,5 @@
|
||||
# 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.
|
||||
|
||||
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.
|
||||
|
19
Divers/Replique Citation/replique.md
Normal file
19
Divers/Replique Citation/replique.md
Normal file
@ -0,0 +1,19 @@
|
||||
# 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 l’intention évidente de la violer, je le descends avant, c’est ma politique.
|
||||
> L’intention ? Elle restait à établir.
|
||||
> Quand un gars à poil court derrière une fille la queue en l’air avec un couteau de boucher à la main, c’est drôle, j’ai peine à croire qu’il 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
|
@ -1 +1,3 @@
|
||||
# République Alamo
|
||||
|
||||
République. J’aime le son de ce mot. Il signifie que les gens peuvent vivre libres, parler comme bon leur semble, aller et venir, acheter ou vendre, s’enivrer ou rester sobres, selon leurs désirs. Certains mots vous font vibrer. République est l’un de ces mots qui me nouent la gorge – la même sensation qui s’empare 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 l’un de ces mots.
|
@ -1,4 +1,6 @@
|
||||
# Voyez Cela (13 éme guerrier)
|
||||
|
||||
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 tous mes ancêtres qui sont assis et me regardent.
|
||||
Et voilà, voilà qu’ils m’appellent et me demandent de prendre place à leurs côtés dans le palais de Valhalla là ou les braves vivent à jamais.
|
||||
Et voilà, voilà qu’ils m’appellent et me demandent de prendre place à leurs côtés dans le palais de Valhalla là ou les braves vivent à jamais.
|
@ -1,3 +1,5 @@
|
||||
# Divers
|
||||
|
||||
[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)
|
||||
|
@ -1,7 +0,0 @@
|
||||
>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
|
@ -1,18 +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 l’intention évidente de la violer, je le descends avant, c’est ma politique.
|
||||
> - L’intention ? Elle restait à établir.
|
||||
> - Quand un gars à poil court derrière une fille la queue en l’air avec un couteau de boucher à la main, c’est drôle, j’ai peine à croire qu’il 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
|
@ -1,22 +1,22 @@
|
||||
# Soft util
|
||||
|
||||
![IT](img/IT.jpg)
|
||||
|
||||
## tunelling
|
||||
|
||||
[chisel](https://github.com/jpillora/chisel) permet de mettre en place un tunel TCP sur du http
|
||||
|
||||
|
||||
## site
|
||||
|
||||
[devhind (cheatsheet)](https://devhints.io/)
|
||||
|
||||
[Lean X in Y minutes](https://learnxinyminutes.com/)
|
||||
|
||||
|
||||
[online Json editor](https://jsoneditoronline.org/)
|
||||
|
||||
[compression d'image](https://squoosh.app/)
|
||||
|
||||
## goaccess
|
||||
## goaccess
|
||||
|
||||
permet d'analyser les log d'accés d'un server web
|
||||
|
75
IT/Ansible/Molecule.md
Normal file
75
IT/Ansible/Molecule.md
Normal file
@ -0,0 +1,75 @@
|
||||
# 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
|
||||
```
|
37
IT/Ansible/index.md
Normal file
37
IT/Ansible/index.md
Normal file
@ -0,0 +1,37 @@
|
||||
# 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
|
||||
```
|
496
IT/DevOps.md
Normal file
496
IT/DevOps.md
Normal file
@ -0,0 +1,496 @@
|
||||
# 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 n’a plus besoin de s’aligner ou de s’inté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 d’informations, 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
|
@ -1,26 +1,24 @@
|
||||
|
||||
|
||||
# docker
|
||||
|
||||
## concept
|
||||
|
||||
- image: template en lecture seul pouvant créer un container
|
||||
- image: template en lecture seul pouvant créer un container
|
||||
- conteneur: instance d'une image
|
||||
|
||||
## command
|
||||
|
||||
- telecharger une image: ` docker pull debian:$tag`
|
||||
- crer et lancer un container en tty ` docker run -it bash `
|
||||
- telecharger une image: `docker pull debian:$tag`
|
||||
- crer et lancer un container en tty `docker run -it bash`
|
||||
- arreter container: `docker stop`
|
||||
- démarrer containeur: `docker start`
|
||||
- lister tous les conteneur `docker ps -a`
|
||||
- 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`
|
||||
- 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
|
||||
- --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)
|
||||
- -d lance en tant que daemon
|
||||
- --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)
|
||||
- -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 /app/server.js : la commande à exécuter dans le conteneur.
|
||||
@ -66,10 +64,10 @@ le .dockerignore permet comme un .gitignore de ne pas inclure certain fichiers d
|
||||
## créer image
|
||||
|
||||
- lancer la build du fichier: `docker build -t nomducontainer:tag .`
|
||||
- -t permet de nommer l'image docker
|
||||
pour ajouter un tag il faut utiliser
|
||||
- -t permet de nommer l'image docker
|
||||
pour ajouter un tag il faut utiliser
|
||||
`docker tag`
|
||||
|
||||
|
||||
## docker compose
|
||||
|
||||
permet de gérer plusieur container ensemble (IaS)
|
||||
@ -116,8 +114,6 @@ services:
|
||||
- ./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` 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.
|
3
IT/Documentation.md
Normal file
3
IT/Documentation.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Documentation
|
||||
|
||||
[diataxis documentation Framework](https://diataxis.fr)
|
@ -1,4 +1,4 @@
|
||||
# Home ASSistant
|
||||
# Home ASSistant
|
||||
|
||||
## instalation
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
- need mosquito broker for mqtt
|
||||
|
||||
|
||||
## Cheatsheet
|
||||
|
||||
- [icon material](https://cdn.materialdesignicons.com/4.5.95/)
|
||||
@ -18,4 +17,4 @@
|
||||
## SQL request
|
||||
|
||||
- get most use entity:
|
||||
```SELECT entity_id, COUNT(*) as count FROM hass.states GROUP BY entity_id ORDER BY count DESC LIMIT 20```
|
||||
```SELECT entity_id, COUNT(*) as count FROM hass.states GROUP BY entity_id ORDER BY count DESC LIMIT 20```
|
@ -3,6 +3,9 @@
|
||||
[Hack Xiaomi gateway V2](https://easydomoticz.com/forum/viewtopic.php?t=8397)
|
||||
|
||||
## jeedom
|
||||
|
||||
- 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 ```
|
||||
- pour le l'hote SQL mettre 127.0.0.1
|
||||
|
||||
- pour le l'hote SQL mettre 127.0.0.1
|
@ -1,8 +1,7 @@
|
||||
# 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
|
||||
|
||||
@ -12,7 +11,7 @@ Le fichier de configuration global `/etc/fail2ban/fail2ban.conf` ne contient pas
|
||||
|
||||
Dans sa configuration la plus simple, on se contente d’activer les _jails_ proposées par défaut. Voici par exemple une configuration minimaliste mais fonctionnelle.
|
||||
|
||||
```
|
||||
```ini
|
||||
|
||||
[DEFAULT]
|
||||
destemail = mon-email@mail.fr
|
||||
@ -31,8 +30,7 @@ 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 l’indique, de ne pas considérer certaines ip ou blocs d’ip. Pratique pour ne pas se retrouver à la porte de son propre serveur.
|
||||
|
||||
```
|
||||
|
||||
```ini
|
||||
|
||||
[DEFAULT]
|
||||
destemail = mon-email@mail.fr
|
||||
@ -52,13 +50,13 @@ Vous voyez par exemple que j’ai ici aussi ajouté `apache`. Si vous avez un se
|
||||
|
||||
Ce n’est pas tout, d’autres options courantes sont à connaître :
|
||||
|
||||
* `port` permet de préciser les ports à bloquer,
|
||||
* `logpath` indique le fichier de log à analyser,
|
||||
* `maxretry` le nombre d’occurences dans le fichier de log avant que l’action 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),
|
||||
* `bantime` définit le temps que l’ip restera bloquée via Fail2Ban.
|
||||
*`port` permet de préciser les ports à bloquer,
|
||||
*`logpath` indique le fichier de log à analyser,
|
||||
*`maxretry` le nombre d’occurences dans le fichier de log avant que l’action 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),
|
||||
*`bantime` définit le temps que l’ip restera bloquée via Fail2Ban.
|
||||
|
||||
```
|
||||
```ini
|
||||
|
||||
[…]
|
||||
|
||||
@ -75,11 +73,11 @@ Si vous parcourez `/etc/fail2ban/jail.conf`, vous pourrez voir les autres option
|
||||
|
||||
Enfin, vous pouvez également définir `backend`. Il s’agit 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.
|
||||
* `gamin` : même usage que le précédent, mais il s’agit d’un module du projet Gnome.
|
||||
* `polling` : le fichier est simplement vérifier à intervales régulièrs afin de vérifier s’il y a eu des écritures.
|
||||
* `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.
|
||||
*`pyinotify` : un module Python permettant de monitorer les modifications sur un fichier.
|
||||
*`gamin` : même usage que le précédent, mais il s’agit d’un module du projet Gnome.
|
||||
*`polling` : le fichier est simplement vérifier à intervales régulièrs afin de vérifier s’il y a eu des écritures.
|
||||
*`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.
|
||||
|
||||
On peut donc dans la plupart des cas laisser `auto`. Sachez qu’il est toutefois possible de définir le `backend` au cas par cas au niveau de chaque jail.
|
||||
|
||||
@ -89,14 +87,14 @@ Ce qui est génial avec Fail2Ban, c’est qu’il est possible d’ajouter 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 :
|
||||
|
||||
```
|
||||
```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" "-"
|
||||
|
||||
```
|
||||
|
||||
Voici à quoi ressemble notre filtre (`/etc/fail2ban/filter.d/nginx-unauthorized`).
|
||||
|
||||
```
|
||||
```ini
|
||||
|
||||
|
||||
|
||||
@ -110,7 +108,7 @@ C’est aussi simple que ça ! `<HOST>`, vous l’aurez deviné, permet à Fail2
|
||||
|
||||
Modifions maintenant notre configuration dans `/etc/fail2ban/jail.d/defaults-debian.conf` pour activer notre nouveau filtre.
|
||||
|
||||
```
|
||||
```ini
|
||||
[…]
|
||||
|
||||
|
||||
@ -130,7 +128,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 d’une jail au redémarrage de l’outil. Commençons par un rapide aperçu de l’outil 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 /var/log/nginx/access.log /etc/fail2ban/filter.d/nginx-unauthorized.conf
|
||||
@ -177,7 +175,7 @@ Retourne l'ensemble des commandes possibles.
|
||||
|
||||
Voici par exemple le retour de la commande `status`, nous n’utilisons pas ici le mode interactif.
|
||||
|
||||
```
|
||||
```bash
|
||||
|
||||
fail2ban-client status
|
||||
Status
|
||||
@ -252,7 +250,7 @@ Retourne les détails d'une jail en particulier.
|
||||
|
||||
Voici par exemple le statut d’une jail.
|
||||
|
||||
```
|
||||
```bash
|
||||
fail2ban-client status ssh
|
||||
Status for the jail: ssh
|
||||
|- filter
|
||||
@ -318,7 +316,7 @@ Affiche l'ensemble des actions liées à cette jail.
|
||||
|
||||
Enfin, il est également possible d’altérer les paramètres des jails directement via la ligne de commande. Bien qu’on utilise en général directement les fichiers de configuration pour cela, ces commandes peuvent s’avérer particulièrement utiles afin de bannir ou dé-bannir manuellement des adresses.
|
||||
|
||||
```
|
||||
```bash
|
||||
|
||||
fail2ban-client set <JAIL> banip <IP>
|
||||
|
||||
@ -329,4 +327,4 @@ fail2ban-client set <JAIL> unbanip <IP>
|
||||
|
||||
Il ne s’agit pas d’une liste exhaustive des possibilités offertes pas la ligne de commande Fail2Ban. De nombreux paramètres habituellement configurés via les fichiers de configuration sont également paramétrables via la CLI. Pour connaître toutes les possibilités, il suffit d’utiliser la commande `help`.
|
||||
|
||||
Sachez cependant que Fail2Ban a encore d’autres tours dans son sac. En cas de match, il peut accomplir n’importe quel comportement (envoyer un email, rediriger vers une autre ip…). Pour en savoir plus je vous invite à lire la partie concernant les [actions de cet article](https://www.it-connect.fr/filtres-et-actions-personnalises-dans-fail2ban/#IV_Creation_dune_action_personnalisee) et [celui-ci en anglais](https://www.digitalocean.com/community/tutorials/how-fail2ban-works-to-protect-services-on-a-linux-server#examining-the-action-file).
|
||||
Sachez cependant que Fail2Ban a encore d’autres tours dans son sac. En cas de match, il peut accomplir n’importe quel comportement (envoyer un email, rediriger vers une autre ip…). Pour en savoir plus je vous invite à lire la partie concernant les [actions de cet article](https://www.it-connect.fr/filtres-et-actions-personnalises-dans-fail2ban/#IV_Creation_dune_action_personnalisee) et [celui-ci en anglais](https://www.digitalocean.com/community/tutorials/how-fail2ban-works-to-protect-services-on-a-linux-server#examining-the-action-file).
|
224
IT/Ffmpeg.md
Normal file
224
IT/Ffmpeg.md
Normal file
@ -0,0 +1,224 @@
|
||||
# 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
|
||||
```
|
40
IT/Git/Commit.md
Normal file
40
IT/Git/Commit.md
Normal file
@ -0,0 +1,40 @@
|
||||
# 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
|
@ -1,8 +1,10 @@
|
||||
# git
|
||||
|
||||
![git](../img/git.jpg)
|
||||
|
||||
## 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
|
||||
|
||||
@ -10,11 +12,11 @@ add *--recurse-submodules* to clone command
|
||||
|
||||
this will ask if you want to add each modification with this option:
|
||||
|
||||
- *y* - Yes, add this hunk
|
||||
- *n* - No, don’t add this hunk
|
||||
- *d* - No, don’t add this hunk and all other remaining hunks. Useful if you’ve already added what you want to, and want to skip over the rest
|
||||
- *s* - Split the hunk into smaller hunks. This only works if there’s unchanged lines between the changes in the displayed hunk, so this wouldn’t 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
|
||||
- _y_ - Yes, add this hunk
|
||||
- _n_ - No, don’t add this hunk
|
||||
- _d_ - No, don’t add this hunk and all other remaining hunks. Useful if you’ve already added what you want to, and want to skip over the rest
|
||||
- _s_ - Split the hunk into smaller hunks. This only works if there’s unchanged lines between the changes in the displayed hunk, so this wouldn’t 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
|
||||
|
||||
## delete a file only from git repository
|
||||
|
||||
@ -23,12 +25,28 @@ this will ask if you want to add each modification with this option:
|
||||
## delete a file from complete history
|
||||
|
||||
be carefull can't push repo last time use
|
||||
need to be in a repo with no modification
|
||||
|
||||
`git filter-branch --tree-filter 'rm -f passwords.txt' HEAD`
|
||||
```bash
|
||||
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
|
||||
|
||||
```
|
||||
```bash
|
||||
$ git filter-branch --commit-filter '
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "schacon@localhost" ];
|
||||
then
|
||||
@ -68,3 +86,11 @@ fi
|
||||
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`
|
@ -44,4 +44,4 @@ git rebase --continue
|
||||
### delete
|
||||
|
||||
**drop** will delete comite rebase will not apply modification during processing
|
||||
to use by example if you have done a modifcation and a revert
|
||||
to use by example if you have done a modifcation and a revert
|
@ -5,7 +5,7 @@ Git submodule allows ro add externel repository in a repository
|
||||
## Adding submodule
|
||||
|
||||
- ```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
|
||||
|
||||
to populate a submodule nested in other submodule
|
||||
@ -21,15 +21,12 @@ to populate a submodule nested in other submodule
|
||||
|
||||
## Updating submodule
|
||||
|
||||
|
||||
you can update a submodule Manually going in submodule folder and perform a ```git fetch``` and ```git merge```
|
||||
|
||||
|
||||
### Fetch and merge
|
||||
|
||||
automatic process
|
||||
|
||||
- perform a ```git submodule update --remote```
|
||||
|
||||
|
||||
in each case you need to commit update in project
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# ampache nginx config
|
||||
|
||||
|
||||
```
|
||||
```nginx
|
||||
if ( !-d $request_filename ) {
|
||||
rewrite ^/ampache/rest/(.*)\.view$ /ampache/rest/index.php?action=$1 last;
|
||||
rewrite ^/ampache/rest/play/(.+)$ /ampache/play/$1 last;
|
@ -1,6 +1,8 @@
|
||||
# nginx
|
||||
|
||||
## reverse proxy
|
||||
```
|
||||
|
||||
```nginx
|
||||
location /chainetv {
|
||||
proxy_pass http://unix:/run/gunicorn/socket:/;
|
||||
#proxy_set_header Host $host;
|
||||
@ -10,6 +12,7 @@
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
- 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 location peut rediriger /chaine/api en metant le X-Script-ame a /chainetv l'appli peut donc écouter la route /api
|
@ -1,8 +1,12 @@
|
||||
# HTTP
|
||||
|
||||
## 1×× Informational
|
||||
|
||||
- 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.
|
||||
|
||||
## 2×× Success
|
||||
|
||||
- 200 OK
|
||||
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.
|
||||
@ -19,6 +23,7 @@
|
||||
The response body contains multiple status informations for different parts of a batch/bulk request
|
||||
|
||||
## 3×× Redirection
|
||||
|
||||
- 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.
|
||||
- 301 Moved Permanently
|
||||
@ -31,6 +36,7 @@
|
||||
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
|
||||
|
||||
- 400 Bad Request
|
||||
This response means that server could not understand the request due to invalid syntax.
|
||||
- 401 Unauthorized
|
||||
@ -45,6 +51,7 @@
|
||||
The client does not consider rate limiting and sent too many requests.
|
||||
|
||||
## 5×× Server Error
|
||||
|
||||
- 500 Internal Server Error
|
||||
The server has encountered a situation it doesn't know how to handle.
|
||||
- 501 Not Implemented
|
||||
@ -54,4 +61,4 @@
|
||||
- 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.
|
||||
|
||||
For more info: https://httpstatuses.com/
|
||||
For more info: <https://httpstatuses.com/>
|
12
IT/Hugo.md
Normal file
12
IT/Hugo.md
Normal 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
|
@ -1,7 +1,10 @@
|
||||
# instalation NExt cloud
|
||||
|
||||
## hook pacman
|
||||
|
||||
- /etc/pacman.d/hooks/nextcloud.hook
|
||||
```
|
||||
|
||||
```ini
|
||||
[Trigger]
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
@ -16,22 +19,27 @@ Exec = /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/nextcloud/occ
|
||||
```
|
||||
|
||||
## php
|
||||
|
||||
- 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
|
||||
```
|
||||
|
||||
```ini
|
||||
change memory_limit = 256M
|
||||
```
|
||||
|
||||
- cree repertoire data
|
||||
```
|
||||
- cree repertoire data
|
||||
|
||||
```ini
|
||||
mkdir /var/nextcloud
|
||||
chown http:http /var/nextcloud
|
||||
chmod 750 /var/nextcloud
|
||||
```
|
||||
- overide php-fpm
|
||||
```
|
||||
|
||||
- overide php-fpm
|
||||
|
||||
```ini
|
||||
[Service]
|
||||
ReadWritePaths = /usr/share/webapps/nextcloud/apps
|
||||
ReadWritePaths = /etc/webapps/nextcloud/config
|
||||
@ -39,10 +47,9 @@ ReadWritePaths = /var/nextcloud
|
||||
ReadWritePaths = /mnt/diskstation
|
||||
```
|
||||
|
||||
## config NGINX dédier
|
||||
|
||||
|
||||
## config NGINX dédier:
|
||||
```
|
||||
```nginx
|
||||
upstream php-handler {
|
||||
# server 127.0.0.1:9000;
|
||||
server unix:/var/run/php-fpm/php-fpm.sock;
|
||||
@ -169,21 +176,26 @@ server {
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
- pour ssl [voir](https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html
|
||||
)
|
||||
|
||||
## gestion database
|
||||
|
||||
## share
|
||||
|
||||
- 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:
|
||||
```
|
||||
|
||||
```bash
|
||||
php /usr/share/webapps/nextcloud/occ files:scan --all
|
||||
```
|
||||
|
||||
- Configurer fail2ban
|
||||
- Configurer fail2ban
|
@ -1 +1,3 @@
|
||||
# JS
|
||||
|
||||
[Javascript without JQuery](https://github.com/nefe/You-Dont-Need-jQuery)
|
||||
|
19
IT/Kubernetes/Helm.md
Normal file
19
IT/Kubernetes/Helm.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
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
|
||||
```
|
37
IT/Kubernetes/Kubernetes.md
Normal file
37
IT/Kubernetes/Kubernetes.md
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
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
|
@ -4,9 +4,9 @@
|
||||
|
||||
makepkg -sf
|
||||
|
||||
le f permet de forcer la compimation meme si des dossier existe déja
|
||||
le f permet de forcer la compimation meme si des dossier existe déja
|
||||
on peut rajouter l'option *i* afin de lancer l'instalation du package a la fin de la build
|
||||
|
||||
## update .SRCINFO
|
||||
|
||||
`makepkg --printsrcinfo > .SRCINFO`
|
||||
`makepkg --printsrcinfo > .SRCINFO`
|
@ -1,18 +1,19 @@
|
||||
# Arch
|
||||
|
||||
![arch](../img/Arch_Linux_logo.svg.png)
|
||||
|
||||
## [instalation](arch_install.md)
|
||||
|
||||
## [instalation](Arch_Install.md)
|
||||
|
||||
## arch tips
|
||||
|
||||
#### clés GPG corrompue ou usagé
|
||||
### clés GPG corrompue ou usagé
|
||||
|
||||
```
|
||||
```bash
|
||||
sudo pacman -S archlinux-keyring
|
||||
sudo pacmam-key --init
|
||||
sudo pacman-key --populate archlinux
|
||||
```
|
||||
|
||||
### Personaliser un iso arch
|
||||
|
||||
#### Personaliser un iso arch
|
||||
[archiso](https://wiki.archlinux.org/index.php/Archiso)
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
title: arch_install
|
||||
---
|
||||
# arch install
|
||||
|
||||
![arch](../img/Arch_Linux_logo.svg.png)
|
||||
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].
|
||||
@ -15,89 +14,87 @@ Boot into the Arch installer.
|
||||
|
||||
If your console font is tiny ([HiDPI][7] systems), set a new font.
|
||||
|
||||
$ setfont sun12x22
|
||||
setfont sun12x22
|
||||
|
||||
Connect to the Internet.
|
||||
|
||||
Verify that the [system clock is up to date][8].
|
||||
|
||||
$ timedatectl set-ntp true
|
||||
timedatectl set-ntp true
|
||||
|
||||
(bios mode)
|
||||
|
||||
$ parted -s /dev/sda mklabel msdos
|
||||
$ parted -s /dev/sda mkpart primary 1MiB 513MiB
|
||||
$ parted -s /dev/sda mkpart primary 1024MiB 100%
|
||||
$ mkfs.ext2 /dev/sda1
|
||||
$ mkfs.ext4 /dev/sda2
|
||||
parted -s /dev/sda mklabel msdos
|
||||
parted -s /dev/sda mkpart primary 1MiB 513MiB
|
||||
parted -s /dev/sda mkpart primary 1024MiB 100%
|
||||
mkfs.ext2 /dev/sda1
|
||||
mkfs.ext4 /dev/sda2
|
||||
|
||||
(UEFI mode) Create partitions for EFI, boot, and root.
|
||||
|
||||
$ parted -s /dev/sda mklabel gpt
|
||||
$ parted -s /dev/sda mkpart primary fat32 1MiB 513MiB
|
||||
$ parted -s /dev/sda set 1 boot on
|
||||
$ parted -s /dev/sda set 1 esp on
|
||||
$ parted -s /dev/sda mkpart primary 513MiB 1024MiB
|
||||
$ parted -s /dev/sda mkpart primary 1024MiB 100%
|
||||
$ mkfs.ext4 /dev/sda2
|
||||
$ mkfs.fat -F32 /dev/sda1
|
||||
|
||||
parted -s /dev/sda mklabel gpt
|
||||
parted -s /dev/sda mkpart primary fat32 1MiB 513MiB
|
||||
parted -s /dev/sda set 1 boot on
|
||||
parted -s /dev/sda set 1 esp on
|
||||
parted -s /dev/sda mkpart primary 513MiB 1024MiB
|
||||
parted -s /dev/sda mkpart primary 1024MiB 100%
|
||||
mkfs.ext4 /dev/sda2
|
||||
mkfs.fat -F32 /dev/sda1
|
||||
|
||||
Create and mount the encrypted root filesystem. Note that for UEFI systems
|
||||
this will be partition 3.
|
||||
|
||||
|
||||
$ pvcreate /dev/sda3pc
|
||||
$ vgcreate arch /dev/mapper/lvm
|
||||
$ lvcreate -L 4G arch -n swap
|
||||
$ lvcreate -L 30G arch -n root
|
||||
$ lvcreate -l +100%FREE arch -n home
|
||||
$ lvdisplay
|
||||
$ mkswap -L swap /dev/mapper/arch-swap
|
||||
$ mkfs.ext4 /dev/mapper/arch-root
|
||||
$ mkfs.ext4 /dev/mapper/arch-home
|
||||
$ mount /dev/mapper/arch-root /mnt
|
||||
$ mkdir /mnt/home
|
||||
$ mount /dev/mapper/arch-home /mnt/home
|
||||
$ swapon /dev/mapper/arch-swap
|
||||
pvcreate /dev/sda3pc
|
||||
vgcreate arch /dev/mapper/lvm
|
||||
lvcreate -L 4G arch -n swap
|
||||
lvcreate -L 30G arch -n root
|
||||
lvcreate -l +100%FREE arch -n home
|
||||
lvdisplay
|
||||
mkswap -L swap /dev/mapper/arch-swap
|
||||
mkfs.ext4 /dev/mapper/arch-root
|
||||
mkfs.ext4 /dev/mapper/arch-home
|
||||
mount /dev/mapper/arch-root /mnt
|
||||
mkdir /mnt/home
|
||||
mount /dev/mapper/arch-home /mnt/home
|
||||
swapon /dev/mapper/arch-swap
|
||||
|
||||
(UEFI mode) Encrypt the boot partition using a separate passphrase from
|
||||
the root partition, then mount the boot and EFI partitions.
|
||||
|
||||
$ mkdir /mnt/boot
|
||||
$ mount /dev/sda2 /mnt/boot
|
||||
$ mkdir /mnt/boot/efi
|
||||
$ mount /dev/sda1 /mnt/boot/efi
|
||||
mkdir /mnt/boot
|
||||
mount /dev/sda2 /mnt/boot
|
||||
mkdir /mnt/boot/efi
|
||||
mount /dev/sda1 /mnt/boot/efi
|
||||
|
||||
Optionally [edit the mirror list][9].
|
||||
|
||||
$ vi /etc/pacman.d/mirrorlist
|
||||
vi /etc/pacman.d/mirrorlist
|
||||
|
||||
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
|
||||
|
||||
Generate and verify [fstab][11].
|
||||
|
||||
$ genfstab -U -p /mnt >> /mnt/etc/fstab
|
||||
$ less /mnt/etc/fstab
|
||||
genfstab -U -p /mnt >> /mnt/etc/fstab
|
||||
less /mnt/etc/fstab
|
||||
|
||||
Change root into the base install and perform [base configuration tasks][12].
|
||||
|
||||
$ arch-chroot /mnt /bin/bash
|
||||
$ systemctl enable dhcpcd.service
|
||||
$ systemctl enable sshd.service
|
||||
$ passwd
|
||||
arch-chroot /mnt /bin/bash
|
||||
systemctl enable dhcpcd.service
|
||||
systemctl enable sshd.service
|
||||
passwd
|
||||
|
||||
modifier /etc/ssh/sshd_config et mettre PermitRoorlogin yes
|
||||
|
||||
Set your mkinitcpio.
|
||||
|
||||
# only for UEFI
|
||||
$ sed -i 's/^HOOKS=.*/HOOKS="base udev autodetect modconf block keyboard lvm2 resume filesystems fsck"/' /etc/mkinitcpio.conf
|
||||
# for both
|
||||
$ mkinitcpio -p linux
|
||||
only for UEFI
|
||||
sed -i 's/^HOOKS=.*/HOOKS="base udev autodetect modconf block keyboard lvm2 resume filesystems fsck"/' /etc/mkinitcpio.conf
|
||||
for both
|
||||
mkinitcpio -p linux
|
||||
|
||||
Configure GRUB.
|
||||
|
||||
@ -113,13 +110,12 @@ Configure GRUB.
|
||||
|
||||
Cleanup and reboot!
|
||||
|
||||
$ exit
|
||||
$ umount -R /mnt
|
||||
$ reboot
|
||||
exit
|
||||
umount -R /mnt
|
||||
reboot
|
||||
|
||||
Run ansible!
|
||||
|
||||
|
||||
[1]: https://www.archlinux.org/
|
||||
[2]: https://wiki.archlinux.org/index.php/Beginners'_guide
|
||||
[3]: https://wiki.archlinux.org/index.php/Installation_guide
|
@ -1,6 +1,6 @@
|
||||
# cron
|
||||
|
||||
```
|
||||
```bash
|
||||
# * * * * * command to execute
|
||||
# │ │ │ │ │
|
||||
# │ │ │ │ │
|
||||
@ -10,13 +10,18 @@
|
||||
# │ └──────────────────── hour (0 - 23)
|
||||
# └───────────────────────── min (0 - 59)
|
||||
```
|
||||
|
||||
[test cron](https://crontab.guru/)
|
||||
|
||||
See also
|
||||
- [wikipedia/cron](http://en.wikipedia.org/wiki/Cron)
|
||||
|
||||
[wikipedia/cron](http://en.wikipedia.org/wiki/Cron)
|
||||
|
||||
## cron directories
|
||||
|
||||
You can create directories that run cron commands. Taken from the `Ubuntu`
|
||||
distro:
|
||||
|
||||
```txt
|
||||
# /etc/crontab: system-wide crontab
|
||||
# Unlike any other crontab you don't have to run the `crontab'
|
||||
@ -35,15 +40,17 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
```
|
||||
|
||||
## run every weekday at midnight
|
||||
|
||||
```sh
|
||||
0 0 * * 0-5
|
||||
```
|
||||
|
||||
## edit cronjobs
|
||||
|
||||
```sh
|
||||
$ sudo crontab -e
|
||||
sudo crontab -e
|
||||
```
|
||||
|
||||
## user crontab lcation
|
||||
## user crontab lcation
|
||||
|
||||
`/var/spool/cron/crontabs`
|
@ -1,19 +1,22 @@
|
||||
## grub_shell
|
||||
# grub_shell
|
||||
|
||||
# booter depuis le shell grub
|
||||
## booter depuis le shell grub
|
||||
|
||||
- les commande **cat** et **ls** fonctionne
|
||||
- trouver partition de boot
|
||||
- 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 fichier image correspondant au kernel :`initrd /boot/initrd.img`
|
||||
- enter `boot` to boot
|
||||
- trouver partition de boot
|
||||
- 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 fichier image correspondant au kernel :`initrd /boot/initrd.img`
|
||||
- enter `boot` to boot
|
||||
|
||||
## regénérer config
|
||||
|
||||
`grub-mkconfig -o /boot/grub/grub.cfg`
|
||||
|
||||
## install sur MBR
|
||||
|
||||
`grub-install --target=i386-pc /dev/sdX`
|
||||
|
||||
## meme chose depuis grub rescue
|
||||
|
||||
`grub rescue> set prefix=(hd0,1)/boot/grub
|
10
IT/Linux/IPTables.md
Normal file
10
IT/Linux/IPTables.md
Normal file
@ -0,0 +1,10 @@
|
||||
# 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
|
||||
```
|
@ -23,4 +23,4 @@ reduce logical volume
|
||||
|
||||
`lvextend -L +44G /dev/mapper/arch-root`
|
||||
|
||||
`resize2fs /dev/mapper/arch-root`
|
||||
`resize2fs /dev/mapper/arch-root`
|
@ -1,31 +1,34 @@
|
||||
#shell
|
||||
# shell
|
||||
|
||||
##tips
|
||||
## tips
|
||||
|
||||
- setter IFS au retour chariot
|
||||
``` IFS=$'\n'```
|
||||
|
||||
```IFS=$'\n'```
|
||||
|
||||
## boucle
|
||||
```
|
||||
|
||||
```bash
|
||||
for var in $variable
|
||||
do
|
||||
commande
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
## if
|
||||
|
||||
```
|
||||
```bash
|
||||
if [ test ]; then
|
||||
echo "C'est vrai"
|
||||
else
|
||||
echo "c'est faux"
|
||||
echo "c'est faux"
|
||||
fi
|
||||
```
|
||||
|
||||
### test
|
||||
|
||||
#### string
|
||||
|
||||
|test|def|
|
||||
|----|---|
|
||||
|$a = j$b|egale|
|
||||
@ -44,8 +47,7 @@ fi
|
||||
|$a -gt $b| >|
|
||||
|$a -ge $b| >= |
|
||||
|
||||
|
||||
#### file
|
||||
#### file
|
||||
|
||||
|test|def|
|
||||
|----|---|
|
||||
@ -59,7 +61,7 @@ fi
|
||||
|
||||
## Supprimer les Dossiers contenant 1 élement
|
||||
|
||||
```
|
||||
```bash
|
||||
IFS=$'\n';for i in $(ls) do ✔ 10022 18:29:32
|
||||
if [ $(ls $i|wc|awk '{print $1}') = 1 ]
|
||||
then
|
@ -1,13 +1,11 @@
|
||||
# ZSH
|
||||
|
||||
![zsh](../img/zsh.jpg)
|
||||
|
||||
# functionality
|
||||
## functionality
|
||||
|
||||
|
||||
# shortcut
|
||||
## shortcut
|
||||
|
||||
key|comportment
|
||||
---|-----------
|
||||
|
|
||||
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
# Linux
|
||||
|
||||
![linux](../img/linux.png)
|
||||
|
||||
## retrouvé date t'instalation
|
||||
|
||||
`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
|
||||
|
||||
@ -14,7 +18,8 @@
|
||||
`MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)`
|
||||
|
||||
- create pacman hook:
|
||||
```
|
||||
|
||||
```ini
|
||||
[Trigger]
|
||||
Operation=Install
|
||||
Operation=Upgrade
|
||||
@ -32,12 +37,10 @@ NeedsTargets
|
||||
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`
|
||||
|
||||
|
||||
## boot in emergency target
|
||||
|
||||
1. (Re)boot the machine
|
||||
@ -47,3 +50,7 @@ Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /
|
||||
systemd.unit=emergency.target
|
||||
5. press ctrl+x
|
||||
6. put root writable with `mount -o rw,remount /`
|
||||
|
||||
## disable IPV6
|
||||
|
||||
`sysctl -b net.ipv6.conf.all.disable_ipv6=1`
|
@ -1,3 +1,5 @@
|
||||
# Migration server procédure
|
||||
|
||||
- modifier le nat de la box
|
||||
- modifier le Cname www sur dns
|
||||
- ajouter le nouveau serveur au autorisation de réplication DNS si serveur DNS Slave
|
||||
@ -5,4 +7,4 @@
|
||||
- recréer partage syncthing
|
||||
- changer dns secondaire
|
||||
- rediriger backup
|
||||
- remettre le cron check server && dump SQL
|
||||
- remettre le cron check server && dump SQL
|
@ -1,28 +1,25 @@
|
||||
#Motorola
|
||||
# Motorola
|
||||
|
||||
[tuto root](https://forum.xda-developers.com/motorola-one-pro/development/root-twrp-3-4-0-android-10-t4156037
|
||||
)
|
||||
|
||||
|
||||
## 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
|
||||
- install magisk Manager on your smartphone [apk here]([https://link](https://github.com/topjohnwu/Magisk/releases/))
|
||||
- put boot.img on your smartphone
|
||||
- in magisk click pn install and select your boot.img
|
||||
- magisk_patched.img will be store in your DATA folder recopy this file on your desktop
|
||||
- enter in fastboot by holding power button
|
||||
- enter in fastboot by holding power button
|
||||
- on your computer enter `fastboot devices` to check if you see your device
|
||||
- following enter `fastboot flash boot magisk_patched.img` to flash
|
||||
- and `fastboot reboot` to reboot
|
||||
|
||||
|
||||
## OTA update with root
|
||||
|
||||
- in magisk restore old image **don't reboot**
|
||||
- launch your OTA update
|
||||
- in magisk patch in inactive slot
|
||||
- reboot your phone
|
||||
|
||||
|
@ -1 +1,3 @@
|
||||
# Patrons de conception
|
||||
|
||||
[patron de conception](https://fr.m.wikibooks.org/wiki/Patrons_de_conception/)
|
3
IT/Python/Flask.md
Normal file
3
IT/Python/Flask.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Flask
|
||||
|
||||
[tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world)
|
@ -1,6 +1,10 @@
|
||||
# python
|
||||
|
||||
## 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```
|
||||
Mode développement :`-X dev`
|
||||
@ -10,6 +14,7 @@ Mode développement :`-X dev`
|
||||
</details>`
|
||||
|
||||
## Virtual env
|
||||
|
||||
- create virtual env: `python3 -m venv /path`
|
||||
- enter in virtual env: `source env/bin/activate`
|
||||
- leave venv: `deactivate`
|
||||
@ -17,8 +22,12 @@ Mode développement :`-X dev`
|
||||
- install package list in file: `pip install -r requirement.txt`
|
||||
|
||||
## tips
|
||||
|
||||
- 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
|
||||
### lancer une suite de tests
|
||||
|
||||
### lancer une suite de tests
|
||||
|
||||
```python -m unittest tests.suite```
|
@ -1,9 +1,10 @@
|
||||
#raspberry.md
|
||||
# raspberry.md
|
||||
|
||||
## activer sortie audio jack
|
||||
|
||||
/boot/config.txt
|
||||
```
|
||||
|
||||
```ini
|
||||
device_tree_param=audio=on
|
||||
audio_pwm_mode=2
|
||||
```
|
@ -1,3 +1,5 @@
|
||||
# Regex
|
||||
|
||||
[regex prefaite](https://ihateregex.io/?q=)
|
||||
|
||||
[regex101](https://regex101.com/)
|
||||
[regex101](https://regex101.com/)
|
BIN
IT/SQL/@eaDir/(protegé)Memento SQL_2018 par3.pdf@SynoEAStream
Normal file
BIN
IT/SQL/@eaDir/(protegé)Memento SQL_2018 par3.pdf@SynoEAStream
Normal file
Binary file not shown.
@ -1,29 +1,36 @@
|
||||
# Quick SQL Cheatsheet
|
||||
# SQL Cheatsheet
|
||||
|
||||
A quick reminder of all relevant SQL queries and examples on how to use them.
|
||||
## Quick SQL Cheatsheet
|
||||
|
||||
This repository is constantly being updated and added to by the community.
|
||||
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.
|
||||
Pull requests are welcome. Enjoy!
|
||||
|
||||
# Table of Contents
|
||||
1. [ Finding Data Queries. ](#find)
|
||||
2. [ Data Modification Queries. ](#modify)
|
||||
3. [ Reporting Queries. ](#report)
|
||||
4. [ Join Queries. ](#joins)
|
||||
5. [ View Queries. ](#view)
|
||||
6. [ Altering Table Queries.](#alter)
|
||||
7. [ Creating Table Query.](#create)
|
||||
## Table of Contents
|
||||
|
||||
1. [Finding Data Queries.](#find)
|
||||
2. [Data Modification Queries.](#modify)
|
||||
3. [Reporting Queries.](#report)
|
||||
4. [Join Queries.](#joins)
|
||||
5. [View Queries.](#view)
|
||||
6. [Altering Table Queries.](#alter)
|
||||
7. [Creating Table Query.](#create)
|
||||
|
||||
<a name="find"></a>
|
||||
# 1. Finding Data Queries
|
||||
|
||||
## 1. Finding Data Queries
|
||||
|
||||
### **SELECT**: used to select data from a database
|
||||
|
||||
* `SELECT` * `FROM` table_name;
|
||||
|
||||
### **DISTINCT**: filters away duplicate values and returns rows of specified column
|
||||
|
||||
* `SELECT DISTINCT` column_name;
|
||||
|
||||
### **WHERE**: used to filter records/rows
|
||||
|
||||
* `SELECT` column1, column2 `FROM` table_name `WHERE` condition;
|
||||
* `SELECT` * `FROM` table_name `WHERE` condition1 `AND` condition2;
|
||||
* `SELECT` * `FROM` table_name `WHERE` condition1 `OR` condition2;
|
||||
@ -32,17 +39,20 @@ Pull requests are welcome. Enjoy!
|
||||
* `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
|
||||
|
||||
* `SELECT` * `FROM` table_name `ORDER BY` column;
|
||||
* `SELECT` * `FROM` table_name `ORDER BY` column `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` number 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
|
||||
* `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
|
||||
|
||||
* % (percent sign) is a wildcard character that represents zero, one, or multiple characters
|
||||
* _ (underscore) is a wildcard character that represents a single character
|
||||
* `SELECT` column_names `FROM` table_name `WHERE` column_name `LIKE` pattern;
|
||||
@ -54,26 +64,31 @@ Pull requests are welcome. Enjoy!
|
||||
* `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
|
||||
|
||||
* 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` (`SELECT STATEMENT`);
|
||||
|
||||
### **BETWEEN**: operator selects values within a given range inclusive
|
||||
|
||||
* `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` #01/07/1999# AND #03/12/1999#;
|
||||
|
||||
### **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 NOT NULL`;
|
||||
|
||||
### **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 `FROM` table_name `AS` alias_name;
|
||||
* `SELECT` column_name `AS` alias_name1, column_name2 `AS` alias_name2;
|
||||
* `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
|
||||
|
||||
* Each SELECT statement within UNION must have the same number of columns
|
||||
* The columns must have similar data types
|
||||
* The columns in each SELECT statement must also be in the same order
|
||||
@ -81,115 +96,147 @@ Pull requests are welcome. Enjoy!
|
||||
* `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
|
||||
|
||||
* Generally used the same way as **UNION** above
|
||||
* `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
|
||||
|
||||
* Generally used the same way as **UNION** above
|
||||
* `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
|
||||
|
||||
* The `ANY` operator returns true if any 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);
|
||||
|
||||
### **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;
|
||||
|
||||
### **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;
|
||||
|
||||
### **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/>
|
||||
`SELECT` c0.* `FROM` categories `AS` c0 `WHERE` id = 1 `# Starting point`<br/>
|
||||
`SELECT` c0.\* `FROM` categories `AS` c0 `WHERE` id = 1 `# Starting point`<br/>
|
||||
`UNION ALL`<br/>
|
||||
`SELECT` c1.* `FROM` categories `AS` c1 `JOIN` cte `ON` c1.parent_category_id = cte.id<br/>
|
||||
`SELECT` c1.\* `FROM` categories `AS` c1 `JOIN` cte `ON` c1.parent_category_id = cte.id<br/>
|
||||
)<br/>
|
||||
`SELECT` *<br/>
|
||||
`FROM` cte
|
||||
|
||||
|
||||
<a name="modify"></a>
|
||||
# 2. Data Modification Queries
|
||||
|
||||
## 2. Data Modification Queries
|
||||
|
||||
### **INSERT INTO**: used to insert new records/rows in a table
|
||||
|
||||
* `INSERT INTO` table_name (column1, column2) `VALUES` (value1, value2);
|
||||
* `INSERT INTO` table_name `VALUES` (value1, value2 …);
|
||||
|
||||
### **UPDATE**: used to modify the existing records in a table
|
||||
|
||||
* `UPDATE` table_name `SET` column1 = value1, column2 = value2 `WHERE` condition;
|
||||
* `UPDATE` table_name `SET` column_name = value;
|
||||
|
||||
### **DELETE**: used to delete existing records/rows in a table
|
||||
|
||||
* `DELETE FROM` table_name `WHERE` condition;
|
||||
* `DELETE` * `FROM` table_name;
|
||||
|
||||
<a name="report"></a>
|
||||
# 3. Reporting Queries
|
||||
|
||||
## 3. Reporting Queries
|
||||
|
||||
### **COUNT**: returns the # of occurrences
|
||||
|
||||
* `SELECT COUNT (DISTINCT` column_name`)`;
|
||||
|
||||
### **MIN() and MAX()**: returns the smallest/largest value of the selected column
|
||||
|
||||
* `SELECT MIN (`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
|
||||
|
||||
* `SELECT AVG (`column_name`) FROM` table_name `WHERE` condition;
|
||||
|
||||
### **SUM()**: returns the total sum of a numeric column
|
||||
|
||||
* `SELECT SUM (`column_name`) FROM` table_name `WHERE` condition;
|
||||
|
||||
<a name="joins"></a>
|
||||
# 4. Join Queries
|
||||
|
||||
### **INNER JOIN**: returns records that have matching value in both tables
|
||||
## 4. Join Queries
|
||||
|
||||
### **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` 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)
|
||||
|
||||
* `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)
|
||||
|
||||
* `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
|
||||
|
||||
* `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
|
||||
|
||||
* `SELECT` column_names `FROM` table1 T1, table1 T2 `WHERE` condition;
|
||||
|
||||
<a name="view"></a>
|
||||
# 5. View Queries
|
||||
|
||||
## 5. View Queries
|
||||
|
||||
### **CREATE**: create a view
|
||||
|
||||
* `CREATE VIEW` view_name `AS SELECT` column1, column2 `FROM` table_name `WHERE` condition;
|
||||
|
||||
### **SELECT**: retrieve a view
|
||||
|
||||
* `SELECT` * `FROM` view_name;
|
||||
|
||||
### **DROP**: drop a view
|
||||
|
||||
* `DROP VIEW` view_name;
|
||||
|
||||
<a name="alter"></a>
|
||||
# 6. Altering Table Queries
|
||||
|
||||
## 6. Altering Table Queries
|
||||
|
||||
### **ADD**: add a column
|
||||
|
||||
* `ALTER TABLE` table_name `ADD` column_name column_definition;
|
||||
|
||||
### **MODIFY**: change data type of column
|
||||
|
||||
* `ALTER TABLE` table_name `MODIFY` column_name column_type;
|
||||
|
||||
### **DROP**: delete a column
|
||||
|
||||
* `ALTER TABLE` table_name `DROP COLUMN` column_name;
|
||||
|
||||
<a name="create"></a>
|
||||
# 7. Creating Table Query
|
||||
|
||||
## 7. Creating Table Query
|
||||
|
||||
### **CREATE**: create a table
|
||||
|
||||
* `CREATE TABLE` table_name `(` <br />
|
||||
`column1` `datatype`, <br />
|
||||
`column2` `datatype`, <br />
|
||||
`column3` `datatype`, <br />
|
||||
`column4` `datatype`, <br />
|
||||
`);`
|
||||
:q
|
||||
:q
|
@ -5,23 +5,25 @@ voir version:
|
||||
`select @@version`
|
||||
|
||||
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
|
||||
|
||||
`alter database [toto] set MULTI_USER`
|
||||
|
||||
|
||||
voir la configuration
|
||||
`exec sp_configure`
|
||||
|
||||
activé affichage des option avancé
|
||||
|
||||
```SQL
|
||||
exec sp_configure 'show advanced options', 1;
|
||||
REconfigure;
|
||||
```
|
||||
|
||||
autorisé la mise en autonomie partielle des bases
|
||||
|
||||
```SQL
|
||||
exec sp_configure 'contained database authentication',1;
|
||||
reconfigure
|
||||
@ -39,11 +41,13 @@ reconfigure
|
||||
```
|
||||
|
||||
Backup
|
||||
|
||||
```sql
|
||||
BACKUP DATABASE [toto] TO DISK = 'c:\toto.bak' with Compression
|
||||
```
|
||||
|
||||
ajouter filegroup
|
||||
|
||||
```SQL
|
||||
USE [master]
|
||||
GO
|
||||
@ -56,6 +60,7 @@ GO
|
||||
```
|
||||
|
||||
setter filegroup par default
|
||||
|
||||
```SQL
|
||||
USE [DB_GRAND_HOTEL]
|
||||
GO
|
||||
@ -63,7 +68,8 @@ IF NOT EXISTS (SELECT name FROM sys.filegroups WHERE is_default=1 AND name = N'F
|
||||
GO
|
||||
```
|
||||
|
||||
modifier taille de fichier
|
||||
modifier taille de fichier
|
||||
|
||||
```SQL
|
||||
USE [DB_GRAND_HOTEL]
|
||||
GO
|
||||
@ -80,4 +86,4 @@ voir nombre de page utilisé et temps
|
||||
```SQL
|
||||
SET STATISTCS IO ON
|
||||
SET STATISTCS TIME ON
|
||||
```
|
||||
```
|
@ -704,8 +704,7 @@ deux conception:
|
||||
|
||||
- diferentille: enregistre les pages modifiées depuis la derniére sauvegarde compléte et les transactions qui ont eu lieu pendant la sauvegarde
|
||||
|
||||
- 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
|
||||
|
||||
@ -713,9 +712,9 @@ deux conception:
|
||||
- bulk logged
|
||||
- simple
|
||||
|
||||
### syntaxe de commande
|
||||
### syntaxe de commande
|
||||
|
||||
complete
|
||||
complete
|
||||
|
||||
BAckup DATABASE
|
||||
|
||||
@ -723,7 +722,7 @@ differentiel
|
||||
|
||||
Backup DATABASE WITH DIFFERENTIAL
|
||||
|
||||
transactionelle
|
||||
transactionelle
|
||||
|
||||
BAckup LOG
|
||||
|
||||
@ -737,11 +736,11 @@ il est possible d'envoyer la sauvegarde sur plusieur fichier en paralléle chaqu
|
||||
|
||||
il est aussi possible d'envoyer la sauvegarde sur diferent device
|
||||
|
||||
### compresioon
|
||||
### compresioon
|
||||
|
||||
WITH COMPRESSION
|
||||
|
||||
gain sur le temps de sauvegarde
|
||||
gain sur le temps de sauvegarde
|
||||
gain important sur le temps de restauration
|
||||
gain importants sur le volume
|
||||
|
||||
@ -755,7 +754,6 @@ RESTORE FILELISTONLY list les fichier restaurable pour l'in des sauvegarde conte
|
||||
|
||||
RESTORE VERIFYONLY: controle la sauvegarde
|
||||
|
||||
|
||||
## surveillance et performance
|
||||
|
||||
### Historisation des données
|
||||
@ -768,17 +766,16 @@ Tables temporelles:
|
||||
l'intervalle de temps est ouvert a droite fermée a gauche
|
||||
|
||||
interrogation temporelle
|
||||
|
||||
- as-of
|
||||
- from
|
||||
- between
|
||||
- contained in
|
||||
- contained in
|
||||
- all
|
||||
|
||||
### 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
|
||||
- le verrouillafe peut entrainner des: wait,Blocage,deadlock
|
||||
|
||||
|
||||
|
||||
|
@ -5,24 +5,54 @@ if not done you can meet issue during request
|
||||
|
||||
## action
|
||||
|
||||
**need to have postgresqk-old-upgrade installed on arch**
|
||||
need to have **postgresqk-old-upgrade** installed on arch
|
||||
|
||||
- stop service
|
||||
|
||||
```systemctl stop postgresql.service```
|
||||
|
||||
- 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
|
||||
chown postgres:postgres /var/lib/postgres/data /var/lib/postgres/tmp
|
||||
```
|
||||
|
||||
- log in postgres account
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo -iu postgres
|
||||
cd /var/lib/postgres/tmp
|
||||
```
|
||||
|
||||
```
|
||||
- launch upgrade
|
||||
```
|
||||
|
||||
```bash
|
||||
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
|
||||
- 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);
|
||||
```
|
||||
|
@ -1,17 +1,27 @@
|
||||
# ssh
|
||||
|
||||
![ssh](img/ssh.png)
|
||||
|
||||
## port forwarding
|
||||
```
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
-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
|
||||
|
||||
|
||||
## ingore know host file
|
||||
|
||||
```
|
||||
```bash
|
||||
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"
|
||||
```
|
||||
````
|
@ -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:
|
||||
|
||||
- connect to synology with SSH
|
||||
- enter command ```sudo /usr/syno/sbin/syno-letsencrypt renew-all -v```
|
||||
|
@ -8,7 +8,6 @@ personal config [Here](https://git.ducamps.win/vincent/conf2/src/branch/master/t
|
||||
|
||||
shift+select to use remote selection clipboard
|
||||
|
||||
|
||||
## command
|
||||
|
||||
command | comportment
|
||||
@ -16,7 +15,6 @@ command | comportment
|
||||
ls | print running session
|
||||
attach -t 0 | connect to session pass in parameter
|
||||
|
||||
|
||||
## keyboard shortcut
|
||||
|
||||
- master key: ctrl-b
|
||||
@ -24,7 +22,7 @@ attach -t 0 | connect to session pass in parameter
|
||||
key|comportment
|
||||
---|-----------
|
||||
? | print all shortcut
|
||||
- | split vertical panel
|
||||
\- | split vertical panel
|
||||
\| | split horizontal panel
|
||||
z | full screen panel
|
||||
c | create window
|
||||
@ -36,5 +34,3 @@ s | list session
|
||||
## move into pane
|
||||
|
||||
Use atl with directional arrow or vim mode key jklm
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
# Vim
|
||||
# Vim
|
||||
|
||||
![neovim](img/neovim.png)
|
||||
|
||||
[tuto config](https://jdhao.github.io/2018/12/24/centos_nvim_install_use_guide_en/)
|
||||
|
||||
## config
|
||||
|
||||
I use NVIM instead vim
|
||||
config [Here](https://git.ducamps.win/vincent/conf2/src/branch/master/nvim/.config/nvim/init.vim)
|
||||
|
||||
@ -22,8 +23,8 @@ Utiliser en tant que manager de plugin
|
||||
- update vim-plug:
|
||||
```:PlugUpgrade```
|
||||
|
||||
|
||||
## 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&#…
|
||||
@ -33,7 +34,8 @@ Vim est un éditeur de texte intégré hautement configurable permettant d’éd
|
||||
Voici une liste des raccourcis clavier de Vim.
|
||||
|
||||
### custom config
|
||||
leader: space
|
||||
|
||||
leader: space
|
||||
|
||||
|conb|action|
|
||||
|----|------|
|
||||
@ -133,5 +135,3 @@ Ces raccourcis permettent de faire d’exécuter des commandes ou d’exécuter
|
||||
| Ctrl+o | Basculer en mode normal pour la prochaine commande |
|
||||
| Ctrl+a | Incrémente le nombre |
|
||||
| Ctrl+x | Décrémente le nombre |
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Virsh
|
||||
|
||||
## virsh usefull command
|
||||
|
||||
### standart
|
||||
|
||||
- recover configuration xml from VM: `virsh dumpxml windows7> windows7.xml`
|
||||
@ -10,9 +12,10 @@
|
||||
- create with xml file:`create --file debian8.xml`
|
||||
- force shutdown:`virsh destroy win7`
|
||||
|
||||
### snapshot:
|
||||
### snapshot
|
||||
|
||||
- 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" `
|
||||
- appliquer une snapshot: `virsh snapshot-revert --domain --snapshotname "ansible ping OK" --running`
|
||||
- delete snapshot: `virsh snapshot-delete --domain freebsd --snapshotname 5Sep2016_S2`
|
||||
@ -20,16 +23,18 @@
|
||||
## share folder with host
|
||||
|
||||
- add a filesystem device to your host:
|
||||
```
|
||||
|
||||
```xml
|
||||
<filesystem type='mount' accessmode='squash'>
|
||||
<source dir='/home/vincent/Documents'/>
|
||||
<target dir='/mnt/workplace'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
|
||||
</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`
|
||||
- in your fstab:`mount_tag /path/to/mount_point/on/guest 9p trans=virtio,version=9p2000.L 0 0`
|
||||
- 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`
|
||||
- add in **9pnet_virtio** to **/etc/modules-load.d/9pnet_virtio.conf**
|
||||
|
||||
## enabling guest function on arch
|
||||
@ -37,6 +42,6 @@
|
||||
- install `spice-vdagent`
|
||||
- add in etc/mkinitcpio.conf
|
||||
|
||||
```
|
||||
```ini
|
||||
MODULES=(virtio virtio_blk virtio_pci virtio_net)
|
||||
```
|
@ -6,20 +6,19 @@ 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?
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-01.png)
|
||||
![pallette](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.
|
||||
|
||||
Well, unless you want your site to look like this:
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-02.png)
|
||||
![palette](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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-03.png)
|
||||
![palette](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.
|
||||
|
||||
@ -27,13 +26,13 @@ You can break a good color palette down into three categories.
|
||||
|
||||
Text, backgrounds, panels, form controls — almost everything in an interface is grey.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-04.png)
|
||||
![palette](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.
|
||||
|
||||
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 .
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-05.png)
|
||||
![palette](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.
|
||||
|
||||
@ -43,7 +42,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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-06.png)
|
||||
![palette](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.
|
||||
|
||||
@ -53,19 +52,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:
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-07.png)
|
||||
![palette](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:
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-08.png)
|
||||
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-08.png)
|
||||
|
||||
...yellow for a warning message:
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-09.png)
|
||||
![palette](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-09.png)
|
||||
|
||||
...or green to highlight a positive trend:
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/whats-in-a-color-palette-10.png)
|
||||
![palette](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.
|
||||
|
||||
@ -73,30 +72,27 @@ 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.
|
||||
|
||||
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.
|
||||
|
||||
Instead, define a fixed set of shades up front that you can choose from as you work.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-01.png)
|
||||
![palette](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?
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-02.png)
|
||||
![palette](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.
|
||||
|
||||
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.
|
||||
|
||||
@ -104,12 +100,11 @@ 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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-03.png)
|
||||
![palette](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.
|
||||
|
||||
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.
|
||||
|
||||
@ -119,25 +114,23 @@ 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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-04.png)
|
||||
![palette](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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-05.png)
|
||||
![palette](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.
|
||||
|
||||
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.
|
||||
|
||||
![](https://refactoring-ui.nyc3.cdn.digitaloceanspaces.com/previews/define-your-shades-up-front-06.png)
|
||||
![palette](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.
|
||||
|
||||
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.
|
||||
|
||||
@ -147,5 +140,4 @@ 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.
|
||||
|
||||
|
||||
[Source](https://refactoringui.com/previews/building-your-color-palette/)
|
||||
[Source](https://refactoringui.com/previews/building-your-color-palette/)
|
@ -1,5 +1,6 @@
|
||||
# CSS
|
||||
|
||||
## link
|
||||
|
||||
[Bulma style sheet](https://devhints.io/bulma)
|
||||
[Remove.bg](https://www.remove.bg/)
|
||||
|
@ -1 +1,3 @@
|
||||
# email HTML
|
||||
|
||||
[Rock Solid HTML Emails ◆ 24 ways](https://24ways.org/2009/rock-solid-html-emails)
|
@ -1,2 +1,4 @@
|
||||
# HTML
|
||||
|
||||
[HTMl Reference](https://htmlreference.io/)
|
||||
[CSS References](https://cssreference.io/)
|
@ -1,3 +1,5 @@
|
||||
# YAML
|
||||
|
||||
[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
|
||||
commonly used for configuration files and in applications where data is being
|
@ -1,21 +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
|
||||
```
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
--ssh-extra-args='-o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'
|
||||
```
|
12
IT/hugo.md
12
IT/hugo.md
@ -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
|
@ -1,15 +0,0 @@
|
||||
# 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
|
||||
|
@ -2,5 +2,4 @@
|
||||
|
||||
![¬ebook](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/).
|
||||
|
34
mkdocs.yml
34
mkdocs.yml
@ -1,24 +1,26 @@
|
||||
---
|
||||
site_name: Notebook
|
||||
site_url: https://www.ducamps.win/notebook
|
||||
site_author: Vincent Ducamps
|
||||
plugins:
|
||||
- search
|
||||
- minify:
|
||||
minify_html: true
|
||||
- section-index
|
||||
- search
|
||||
- minify:
|
||||
minify_html: true
|
||||
theme:
|
||||
language: fr
|
||||
name: material
|
||||
highlightjs: true
|
||||
palette:
|
||||
scheme: default
|
||||
primary: teal
|
||||
accent: red
|
||||
hljs_languages:
|
||||
- yaml
|
||||
features:
|
||||
- navigation.instant
|
||||
- navigation.tabs
|
||||
language: fr
|
||||
name: material
|
||||
highlightjs: true
|
||||
palette:
|
||||
scheme: default
|
||||
primary: teal
|
||||
accent: red
|
||||
hljs_languages:
|
||||
- yaml
|
||||
features:
|
||||
- navigation.indexes
|
||||
- navigation.instant
|
||||
- navigation.tabs
|
||||
- search.highlight
|
||||
repo_url: https://git.ducamps.win/vincent/notebook
|
||||
repo_name: Vincent/notebook
|
||||
extra:
|
||||
|
@ -2,3 +2,4 @@ mkdocs
|
||||
mkdocs-material
|
||||
mkdocs-minify-plugin
|
||||
mkdocs-section-index
|
||||
lunr
|
Loading…
Reference in New Issue
Block a user