This commit is contained in:
2018-10-07 07:19:40 +02:00
parent e82296ba06
commit 53d2ce1c0d
8 changed files with 354 additions and 15 deletions

View File

@@ -40,7 +40,11 @@ $ nvm install 10
### Version de npm:
### npm
npm est un gestionnaire de paquets pour JavaScript automatiquement installé avec Node.
#### Version de npm:
```bash
# version:
@@ -52,11 +56,11 @@ $ npm -v
### Update:
#### Update:
```bash
npm install npm@latest -g
$ npm install npm@latest -g
$ brew install node
@@ -67,7 +71,7 @@ https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-np
### Local:
#### Local:
Installer npm packages localement => `/Users/bruno/Sites/node_modules`
@@ -91,7 +95,7 @@ $ npm outdated | awk '{print $1}' | xargs npm update
### Global:
#### Global:
Installer npm packages globalement => `/usr/local/lib/node_modules/`
@@ -102,7 +106,7 @@ Installer npm packages globalement => `/usr/local/lib/node_modules/`
### Aller dans node_modules:
#### Aller dans node_modules:
```bash
bruno@SilverBook:~$ cd Sites/node_modules/
@@ -118,7 +122,7 @@ puis
### Supprimer tous les modules:
#### Supprimer tous les modules:
```bash
$ for package in `ls node_modules`; do npm uninstall $package; done;
@@ -126,7 +130,7 @@ $ for package in `ls node_modules`; do npm uninstall $package; done;
### Maintenance:
#### Maintenance:
```bash
$ npm doctor
@@ -146,7 +150,7 @@ Verify cache contents verified 2159 tarballs
### Packages:
#### Packages:
[Rechercher un package](https://npms.io)

View File

@@ -2,6 +2,14 @@
nvm est un gestionnaire de version pour Node.
### Installation
#### Avec Homebrew:
Installer nvm:
```bash
@@ -36,6 +44,25 @@ $ echo $NVM_DIR
$ nvm --version
```
#### Avec git (méthode officielle):
```bash
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
```
Le script d'installation ajoute les lignes suivantes à votre profil (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
```bash
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
```
### Utilisation
Installer NodeJS.
```bash

View File

@@ -46,6 +46,47 @@ $ python3 -m site --user-base
### idle:
**idle** est l'éditeur par défaut de Python
Pour le lancer depuis le shell:
```bash
$ idle
```
[Python et tcl/tk versions](https://discussions.apple.com/thread/8066794)
Python 3 utilise la bibliothèque Tcl/Tk fournie par macOS (8.5.9).
Pour utiliser une version plus récente (8.6.8) de la bibliothèque :
```bash
$ brew install tcl-tk
$ brew reinstall python3 --with-tcl-tk
```
#### jupyter:
[jupyter](https://jupyter.org/) est une web application qui permet de créer et partager des documents contenant du live-code...
Installer:
```bash
$ pip3 install jupyter
```
Démarrer:
```bash
$ jupyter notebook
```
### Modules:
#### Mkdocs

View File

@@ -55,6 +55,8 @@ $ bbedit /usr/local/etc/httpd/extra/httpd-vhosts.conf
### Virtual Hosts:
#### Redirection:
Editer le fichier *hosts*:
```bash
@@ -78,6 +80,29 @@ Editer le fichier *httpd-vhosts.conf*:
</VirtualHost>
```
#### Redirection de port:
wiki.js tourne sur localhost:3000 Pour le rendre disponible sur wiki.silverbook.local:
Editer le fichier *hosts*:
```bash
$ sudo nano /etc/hosts
127.0.0.1 silverbook.local
127.0.0.1 wiki.silverbook.local
```
Editer le fichier *httpd-vhosts.conf*:
```http
<VirtualHost *:80>
ServerName wiki.silverbook.local
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyPreserveHost On
</VirtualHost>
```
### SSL:
@@ -103,9 +128,6 @@ Listen 443
\# General setup for the virtual host
\# DocumentRoot "/usr/local/var/www"
\# ServerName www.example.com:443
\# ServerAdmin you@example.com
```
<u>Ouvrir le fichier *httpd-vhosts.conf*:</u>
@@ -214,7 +236,7 @@ Ajouter le bloc qui suit dans le **httpd.conf**
### \# macOS - homebrew:
### Différence installation macOS - homebrew:
***MacOS:***