- Internet connexion established
- FileVault is set up
- Réglages Système > Confidentialité et sécurité > FileVault
- Latest stable macOs version installed
- Réglages Système > Mise à jour de logiciels
- Password setup
- Réglages Système > Utilisateurs et groupes > Modifier le mot de passe...
2. XCode
- Create Apple ID. Be careful if you should use ESN email or client company email.
- Dans l'App Store, créer/se connecter à son identifiant Apple
- Lancer le téléchargement Xcode via App Store (très long)
- Lancer Xcode pour lancer l'install
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
- Consider install previous Xcode version, but rename it to not replace up-to-date Xcode
- To select the default Xcode for flutter :
sudo xcode-select -s <path/to/>Xcode.app
- To select the default Xcode for flutter :
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
- Simulator > Settings... > coché Show single touches et coché Show pinch gestures
- (Dans le simulateur) Réglages/Settings > Clavier > Claviers > Français (France) en premier
- (Dans le simulateur) Réglages/Settings > Langue et région > Langue Français
- Réglages Système > Clavier > Méthodes de saisie > Français - Numérique
- Réglages Système > TrackPad > Pointer et cliquer > Toucher pour clicker activé
- Ouvrir Finder > Réglages > Disques durs activé
- Ouvrir Terminal > Réglages > Profils > Police > Modifier -> 14, SF Mono Regular 14pt
- Right clic Dock > Préférences du Dock > Masquer/afficher automatiquement le Dock coché
- If Mac with Apple chipset, create an Intel Terminal
- Finder > Applications > Utilitaires > Clic droit Terminal > Duplicate
- Remane Terminal Intel, Clic droit Terminal Intel > Lire les informations > Ouvrir avec Rosetta
- Launch Terminal Intel >
arch
=>i386
- Réglages Système > Son > Sortie > Émettre un son au démarrage désactivé
- Réglages Système > Son > Sortie > Émettre un son lorsque le volume est modifié activé
- Centre de contrôle > Son > Toujours affcher dans la barre de menu
- Centre de contrôle > Bluetooth > Toujours affcher dans la barre de menu
- Centre de contrôle > Batterie > Afficher le pourcentage activé
- QuickTime > Nouvel enregistrement de l'écran > Options > Afficher les clics de la souris
- Réglages Système > Réseau > Wifi + Câble > Avancé > DNS > Add DNS https://yggland.fr/FAQ-Tutos/ (could be 1.1.1.1 & 1.0.0.1 & 2606:4700:4700::1111 & 2606:4700:4700::1001)
- Préférences Sytème > Confidentialité et sécurité > Accès complet au disque > Terminal
- Pour accéder à ls depuis ~/.Trash
4. Install Firefox
- Do the sync with your account
- Réglages Système > Bureau et Dock > Navigateur par défaut > Firefix
- Set Firefox default browser
- Réglages Système > Confidentialité et sécurité >
- Enregistrement de l'écran > clic Cadenas > + > Application > Firefox
- Installer extension uBlock Origin (devrais être automatique)
5. Install Chrome
- Do the sync with your account
- Réglages Système > Confidentialité et sécurité >
- Enregistrement de l'écran > clic Cadenas > + > Application > Chrome
6. On Terminal, install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/dleurs/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
7. On Terminal, install zsh
brew install zsh
chsh -s /usr/local/bin/zsh
8. On Terminal install Oh My Zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cd ;
cd Documents;
mkdir Flutter;
mkdir Android;
mkdir iOS;
mkdir Readmes;
mkdir AI;
brew tap leoafarias/fvm
brew install fvm
fvm install stable
export PATH="$PATH:/Users/dleurs/fvm/versions/stable/bin"
# Inside zshrc after
brew install cocoapods
- Optionnals
brew install trash
Les dossiers ne seront pas visibles dans la poubelle mac, il faudra cd ~/.Trash; ls; mv
brew install python
brew install java #or java11
export JAVA_HOME="/opt/homebrew/opt/openjdk@20" # Next inside .zshrc
11. Install VSCode
- Code > Preferences > Turn on Settings Sync... > GitHub
- Launch VSCode > Preferences > Settings
dart.devToolsBrowser > chrome
dart.devToolsLocation > external
dart.lineLength > 80
# Dans la plupart des projets flutter on mettra 120
12. Install Android Studio
- Launch Android Studio, install it with default settings
- Android Studio > Preferences > Language & Framework > Android SDK > SDK Tools
- Android SDK Build-Tools coché
- Android SDK Command-line Tools coché
- Android SDK Plateform-Tools coché
- Press Apply
- Launch Android Studio > More Actions > Virtual Device Manager > Create Device
- Pixel 5 > R download API 30
- Next > Show Advanced Settings > Internal Storage > 6 GB
- Studio-managed > 6 GB > Finish
- Mettre langue et clavier du simulateur à français
brew install android-platform-tools
git config --global user.name "Firstname LASTNAME"
git config --global user.email firstname.lastname@company.com
git config --global init.defaultBranch main
ssh-keygen -t ed25519 -C "firstname.lastname@company.com"
- OR
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@company.com"
cat ~/.ssh/id_ed25519.pub | pbcopy
- Paste the content inside Github/Gitlab/Hetzner > Security > Add an SSH Key, with tile Macbook Pro 14" M1 2021 SERIAL_NUMBER_COMPUTER
- Add your key to agent without need to enter passphrase every time:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
# Then inside ~/.zshrc
brew install gnupg pinentry-mac
gpg --full-gen-key
- 9 ```ECC (sign and encrypt)```
- 1 ```Curve 25519```
- 0 ```La clef n'expire pas```
- ```Firstname LASTNAME```
- ```firstname.lastname@company.com```
- ```Macbook Pro 14" M1 2021 SERIAL_NUMBER_COMPUTER```
echo "pinentry-program $(brew --prefix)/bin/pinentry-mac" > ~/.gnupg/gpg-agent.conf && chmod 0600 ~/.gnupg/gpg-agent.conf
$ gpg --list-keys --keyid-format LONG
$ [...]pub ed25519/2B6*********9F4 2021-09-27 [SC][...]
git config --global user.signingkey 2B6*********9F4
git config --global commit.gpgsign true
gpgconf --kill gpg-agent
git log --show-signature
gpg --armor --export 2B6*********9F4 | pbcopy
Paste to github/gitlab
Verify email address inside
15. Setup ~.zshrc
like below, copy elements of ZSHRC chapter
flutter doctor --android-licenses
flutter doctor -v
- Go to where you save your Flutter projects,
gof
flutter create first_helloworld --org uniqueidhelloworld.leurs.dev
cd first_helloworld
fvm use stable
code first_helloworld
mkdir .vscode; cd .vscode;
touch launch.json
{
"version": "0.2.0",
"configurations": [
{
"program": "lib/main.dart",
"name": "First Helloworld",
"request": "launch",
"type": "dart"
}
]
}
touch settings.json
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"search.exclude": {
".fvm/**": true
},
// Remove from file watching
"files.watcherExclude": {
".fvm/**": true
}
}
-
Below blue bar > macOS > launch iOS simulator > wait for simulator to be launched
- Inside vscode >
fn + F5
> Check it is running > close running task clicking red square inside VSCode
- Inside vscode >
-
Below blue bar > iPhone 14 > Pixel 4 API 30 > wait for simulator to be launched
- Inside vscode >
fn + F5
> Check it is running > close running task clicking red square inside VSCode
- Inside vscode >
-
Below blue bar > iPhone 14 > Chrome
- Inside vscode >
fn + F5
> Check it is running > close running task clicking red square inside VSCode
- Inside vscode >
-
Create a new Github/Gitlab project Test Upload Helloworld to see if you can
git push
, and commit user info is correct -
Also run on real device, check https://support.apple.com/fr-fr/HT204460 for iOS
- VLC
- Pour modifier l'appli par défault pour mp3, mp4 et mkv, clic droit fichier > Lire les informations > Ouvrir avec > VLC > Tout modifier
- Vysor
- Sublime Text
- Postman or Insomnia
- Giphy, inside App Store
- Réglages Systèmes > Confidentialité et sécurité > Enregistrement de l'écran > + Giphy
- Table Plus
- Flashlight
curl https://get.flashlight.dev | bash
- Logitech G Hub
- NextCloud
- gcloud command
- Very Good Cli
dart pub global activate very_good_cli
- Zoom
- Réglages Systèmes > Confidentialité et sécurité > Enregistrement de l'écran > + Zoom
- Microsoft Teams
- Réglages Systèmes > Confidentialité et sécurité > Enregistrement de l'écran > + Microsoft Teams
- Sourcetree
- Docker
- Launch and connect
- Kubernetes
- Android File Transfer
- LibreOffice
- qBitTorrent
- Changer Settings > Download folder default : /Users/dleurs/Movies/videos_personnel_privee
- Extraire piste sous titre : https://subler.org/
- Instruction extraction srt : https://www.journaldulapin.com/2023/05/25/recuperer-les-sous-titres-dans-un-fichier-mkv/
20. Download Developer Tools Additional Tools for Xcode, to simulate low connexion
- Hardware > double clic Network Link Conditioner
- Réglages Système > Network Link Conditioner
- Download profile picture in this repo inside dleurs > Images
- Use dart devtools
- Download a PDF, open it with default Preview, then Presentation > tick 'Vignettes' so it will always open with vignettes
- Cmd + Space > Preview > Ajouter sa signature
- Add SSH key to console.hetzner.cloud
cat ~/.ssh/id_ed25519.pub | pbcopy
- Bien récupérer les local.properties et keystore de TOUS les projets Android ou Flutter avec android
- Toutes ses collections Insomnia / Postman (fichier)
- ? Ses configs Android studio (fichier)
- Check sync VSCode Github OK
- L'export des certificats du Keychain Access
- Déplacer les fichiers .gitignored, comme
~/.gradle/gradle.properties
avecjfrogUser="" jfrogApiKey=""
- Avec la suppression clé ssh et gpg, retirer de github
- Récupérer
~/Library/MobileDevice/Provisioning\ Profiles
- Certains bouts de code à conserver ?
brew install fzf
subl ~/.gitconfig
[alias]
# Amend into a past commit using fzf
# Stage your changes `git add -p`, then run `git autofixup` and choose the target commit
autofixup = "!f() { \
COMMIT_HASH=$(git log --pretty=oneline | fzf | awk '{print $1}'); \
git commit --fixup $COMMIT_HASH; \
GIT_SEQUENCE_EDITOR=: git rebase --autostash --autosquash -i $COMMIT_HASH^; \
}; f"
############### ALIASES ###############
alias sshcloud="ssh root@XXX"
alias gof="cd ~/Documents/Flutter"
alias goa="cd ~/Documents/Android"
alias goi="cd ~/Documents/iOS"
alias gor="cd ~/Documents/Readmes"
alias simulateur="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
alias pip="pip3"
alias pyton="python3"
alias sublzsh="subl ~/.zshrc"
alias sublgit="subl ~/.gitconfig"
alias k="kubectl"
alias d="docker"
alias gitskip="git update-index --skip-worktree"
alias gitunskip="git update-index --no-skip-worktree"
# git autofixup inside ~/.gitconfig
alias rm="echo 'FAILURE : better user trash, or /bin/rm'"
############# END ALIASES #############
################ KEYS #################
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
############## END KEYS ###############
############## FUNCTIONS ##############
pull() {
branch=$1
initialBranch=$(git branch --show-current)
if [ "$branch" = "" ];
then
branch=$(git branch --show-current);
else
git checkout $branch
fi
git fetch;
git pull origin $branch;
git status;
if [ "$branch" = "" ];
then
else
git checkout $initialBranch
fi
}
cleanIos() {
cd ios
trash Pods
trash .symlinks
trash Flutter/Flutter.framework
trash Flutter/Flutter.podspec
trash Podfile.lock
arch -x86_64 pod repo update
arch -x86_64 pod install
cd ..
}
changeAuthor() {
git config --global user.email firstname.lastname@company.com
git commit --amend --reset-author --no-edit
}
generate() {
fvm dart run build_runner build --delete-conflicting-outputs
fvm flutter gen-l10n
}
deleteDsStore() {
find . -name '.DS_Store' -type f -delete;
}
############ END FUNCTIONS ############
############# PATH EXPORTS ############
export PATH="$PATH:/Users/dleurs/fvm/versions/3.22.2/bin"
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
export PATH="$PATH:/Applications/Sublime Text.app/Contents/SharedSupport/bin"
export PATH="$PATH":"$HOME/.pub-cache/bin"
export PATH="$PATH":"/opt/homebrew/opt/openjdk/bin"
export JAVA_HOME="/opt/homebrew/opt/openjdk"
########### END PATH EXPORTS ##########
################# INFO ################
infoGitlavCleanComments='
Gitlab clear code comments
<details><summary>Mon code</summary>
<pre>
1+1=2
</pre>
</details>
'
infoGitTag='
git tag -a 1.4.0 -m "my version 1.4"
'
############### END INFO ##############