• Stars
    star
    306
  • Rank 136,456 (Top 3 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 6 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐒 πŸ’¨ Speedup your MacOS setup with this fine tuning settings

πŸš€ CodelyTV dotfiles

🐒 πŸ’¨ Speedup your MacOS setup with this fine tuning settings

CodelyTV License

Repository containing all the automation required to setup your MacOS in just a few seconds after a fresh install.

Feel free to explore the repository and get anything you need 😬

πŸ“œ Table of Contents

πŸš€ Installation

Execute the installer from your terminal in order to avoid even having to manually install git!

bash <(curl -s https://raw.githubusercontent.com/codelytv/dotfiles/master/installer)

If you want to check out all the details involved in a migration from a legacy to a new PC, you can checkout the installation-guide.md

✍️ Repository Contents (⚠️ Outdated documentation ⚠️)

You'll find some self-explanatory files in this repo containing comments on what they do, however, here you have a brief explanation of each on of them.

πŸ’» Shell dotfiles

  • .aliases: Common command aliases in order to save some characters 😬
  • .bashrc: Main config for Bash shell (loads common .profile)
  • .functions: Common shell functions (key difference from .aliases: functions will receive an argument)
  • .profile: Common profile between the different shells in order to have all the functionalities in both of them. This file loads .aliases and .functions
  • .zshrc: Main config for ZSH shell (loads common .profile)

πŸ™ Git dotfiles

  • .gitconfig: Different settings for the Git CSV system such as including the following file
  • .gitignore_global: Ignore rules to apply to every single repository (usefull to do not mess up the project .gitignore file with particularities of your development environment such as the .DS_Store files or your IDE settings)

⚑ Custom commands

These are custom commands defined in binary files with little scripts to boost your productivity in your daily basis tasks:

These binaries are installed thanks to adding the binary files directory to the PATH environment variable in the .profile file.

  • bin/docker_connect: Lists your running containers and let you select and open an interactive terminal in one of them

πŸ€– Shell scripts

🍎 install_macos_apps.sh

This script will install Homebrew. It's a package manager for MacOS, used to install some tools like htop, ffmpeg, git, php… you get the idea, Command Line Tools, programming languages, and so on.

Homebrew also includes Homebrew Cask. It's a package manager useful to install fully functional OS X applications such as google-chrome, spotify, slack…

With these 2 command line tools, we'll be able to install and upgrade our apps without having to leave the terminal. This allow us to automate the whole setup process while starting clean on a new mac, and also to do not have to open all the different apps we've installed in order to update them.

You can check out the install_macos_apps.sh script in order to see the detailed list of the apps it will install, and modify it based on your needs, and the available packages in Homebrew and Homebrew Cask apps.

πŸ“± adjust_apps_settings.sh

This script is intended to create the symbolic links to each application settings in order to avoid having to copy and paste the different files on each case.

The script is self documented so you can check out which apps we're dealing with.

There're some apps pending to automate (Work In Progress):

  • JetBrains family IDEs (IntelliJ IDEA, PhpStorm, PyCharm, etc.):
    • Custom VM Options
      1. Open the IDE
      2. Go to Help -> Edit Custom VM Options… menu option
      3. Paste the desired JVM properties modifying them based on your environment resources
  • [iStat Menus](iStat Menus Settings.ismp)
    1. Modify the license XML key dictionary values specifying your email and serial
    2. Open iStats
    3. Go to File -> Import settings… menu option

πŸŽ›οΈ adjust_macos_settings.sh

This script will modify system preferences. We would recommend you to take a look at the adjust_macos_settings.sh script in order to know the actual list of aspects it will modify. Here you have a brief list of them:

  • Dock: Automatically hide the dock with a fewer delay and animation times
  • Mission Control: Add Hot corners behaviour and reduce the animation time
  • Keyboard: Reduce the delay for repeating a key while pressed, and the time between repetitions of that key
  • Mouse: Increase its speed
  • Trackpad: Enable tap to click for the current user and for the login screen. (Don't have to press down on the trackpad -- just tap it.)
  • Finder: Disable animations + show extensions + set columns as default view + show pathbar + enable spring-loading directories…
  • Safari & WebKit: Allow hitting the Backspace key to go to the previous page + show full URL + disable automatic spelling corrections…
  • Others: Disable the sound effects on boot + always show scrollbars + disable automatic capitalization + Avoid creating .DS_Store files on network or USB volumes + Maximize windows with Ctrl+alt+Cmd+f…
πŸ€” How to discover new domains and settings

You can explore your current settings on all the different applications just with a few commands:

  • List all config domains you have: defaults domains | tr ',' '\n'
  • List the current settings for a specific domain: defaults read com.apple.finder
  • Read the type of the setting you want to modify: defaults read-type com.apple.finder NewWindowTargetPath
  • Write your new value for the setting: write com.apple.finder NewWindowTargetPath "file:///Users/your-username/"
πŸƒβ€β™‚οΈ How to automate settings changes

The problem with the previous approach is that it could be a little verbose while showing you aaaaall the different settings an application has. So here's a quick tip on how to optimize the process for these settings which can be adjusted using the UI:

  • Save the output of your current settings into a file: defaults read > defaults_before_ui_changes.json
    • Pro tip: If you already know the domain of the settings you're going to modify, optimize the size of the output specifying so: defaults read com.apple.finder > finder_defaults_before_ui_changes.json
  • Modify the settings through the UI
  • Save the output of the modified settings: defaults read > defaults_after_ui_changes.json
    • Alternatively: defaults read com.apple.finder > finder_defaults_after_ui_changes.json
  • Compare the before and after files to see what settings has been modified: diff defaults_before_ui_changes.json defaults_after_ui_changes.json
    • Alternatively: diff finder_defaults_before_ui_changes.json finder_defaults_after_ui_changes.json
    • Pro tip: If the diff doesn't provide you enough context, you can run it with diff -C 10 option to show 10 lines before and after each difference
    • Pro tip 2: If the diff output is a mess for you, you can open it with VS Code with code --diff finder_defaults_before_ui_changes.json finder_defaults_after_ui_changes.json
  • Save the modified keys and construct your write commands in order to automate it the next time. For instance: write com.apple.finder NewWindowTargetPath "file:///Users/your-username/"

ℹ️ About

This hopefully helpful repository has been developed by CodelyTV and contributors.

We've used a lot of different sources to get some inspirations on the things to do, here you have a list of them:

🀝 Contributing

It would be awesome to learn from your experience automating the setup of your environment.

So please, feel free to send us your tips and tricks via Twitter (@CodelyTV), or consider opening an issue before starting to work on a Pull Request πŸ™‚

β˜‘οΈ ToDo

  • Move the things already specified in the installation-guide.md to automations. How to procedure:
    • Search for the application plist files. In this repo there're a lot of supported applications which specify the config paths.
    • Move the plist files to this repo in case of not containing sensitive data
    • Create the symlink between the application plist file and this repo
    • Specify the symlink in the conf.macos.yaml file mapping

βš–οΈ License

The MIT License (MIT). Please see License for more information.

More Repositories

1

php-ddd-example

🐘🎯 Hexagonal Architecture + DDD + CQRS in PHP using Symfony 7
PHP
2,954
star
2

typescript-ddd-example

πŸ”·πŸŽ― TypeScript DDD Example: Complete project applying Hexagonal Architecture and Domain-Driven Design patterns
TypeScript
1,300
star
3

dotly

🌚 Modular and easy to customize dotfiles framework
Shell
1,190
star
4

refactoring-code_smells-design_patterns

♻️ Example projects illustrating Code Smells in order to apply Refactoring techniques
PHP
564
star
5

typescript-ddd-skeleton

πŸ”·βœ¨ TypeScript DDD Skeleton: Bootstrap your new TypeScript project applying Hexagonal Architecture and Domain-Driven Design patterns
TypeScript
439
star
6

java-ddd-example

♨️ DDD in Java skeleton & examples. Course:
Java
423
star
7

cra-template-codely

<πŸŒ±βš›οΈ> Create React App Codely template
SCSS
337
star
8

pr-size-labeler

🏷 Visualize and optionally limit the size of your Pull Requests
Shell
334
star
9

eslint-plugin-hexagonal-architecture

A plugin that helps you to enforce hexagonal architecture best practises
TypeScript
290
star
10

java-ddd-example-deprecated

β˜•πŸŽ― Hexagonal Architecture + DDD + CQRS in a Java project using SpringBoot
Java
290
star
11

php-ddd-skeleton-deprecated

πŸ˜πŸš€ PHP DDD Skeleton: Bootstrap your new projects or be inspired by this example project
PHP
251
star
12

javascript-basic-skeleton

JavaScript
209
star
13

typescript-api-skeleton

πŸ”·πŸŒ TypeScript API Skeleton: Bootstrap your new HTTP API backend with TypeScript
TypeScript
196
star
14

awesome-typescript-examples

✨ Awesome TypeScript Examples with complete show cases of how to take advantage of the language potential.
TypeScript
179
star
15

typescript-react_best_practices-vite_template

<βš‘βš›οΈ> Start your React project with Vite following code best practices (TypeScript, Linting, testing, CI/CD…)
SCSS
167
star
16

csharp-ddd-skeleton

🦈✨ C# DDD Skeleton: Bootstrap your new C# projects applying Hexagonal Architecture and Domain-Driven Design patterns
C#
162
star
17

go-hexagonal_http_api-course

Ejemplos del curso de API HTTP en Go aplicando Arquitectura Hexagonal
Go
138
star
18

jetbrains-theme

🎨 A modern, productivity-increaser theme for all JetBrains IDEs
Shell
134
star
19

scala-ddd-example

λ🎯 Hexagonal Architecture + DDD + CQRS applied in Scala using Akka HTTP
Scala
133
star
20

typescript-basic-skeleton

πŸ”·πŸŒ± TypeScript Basic Skeleton: Template for bootstrapping your new TypeScript project following idiomatic best practices.
TypeScript
133
star
21

job-offers

😊 Do you wanna work with us?
132
star
22

typescript-ddd-course

πŸ”·πŸ”– TypeScript DDD Course: Learn Domain-Driven Design in TS lesson by lesson
TypeScript
126
star
23

golang-examples

Introductory examples to Go programming language used in the CodelyTV Pro course
Go
113
star
24

typescript-primitives-type

🧩 TypeScript utility type in order to ensure to return only properties (not methods) containing values in primitive types such as number or boolean (not Value Objects)
TypeScript
111
star
25

php-basic-skeleton

πŸ˜πŸš€ PHP Basic Skeleton: Bootstrap your new projects using this Composer Project
PHP
107
star
26

eslint-config-codely

Opinionated linting configuration considering modern TypeScript best practices and providing consistency to your import statements. Valid for your JavaScript or TypeScript projects 🀟
JavaScript
84
star
27

frontend-hexagonal_architecture-course

Hexagonal Architecture in frontend
TypeScript
79
star
28

java-solid-examples

Learn SOLID principles by examples in Java
Java
78
star
29

javascript-testing-frontend-course

JavaScript
75
star
30

kotlin-api-skeleton

πŸ’Ž Kotlin Hexagonal HTTP API template to create your new projects
Kotlin
63
star
31

vscode-theme

A modern, good-looking, productivity-increaser theme for Visual Studio Code
61
star
32

p2p-editor

Online code editor based on P2P and JavaScript. Demo:
JavaScript
57
star
33

kotlin-basic-skeleton

A basic Skeleton to create your Kotlin apps easily
Kotlin
53
star
34

java-basic-skeleton

β˜•πŸš€ Java Bootstrap: Skeleton for your new projects
Java
51
star
35

php-coding_style-codely

PHP Coding Style rules we use in Codely
PHP
49
star
36

react-from_zero_to_best_practices-course

Developer dashboard made in the "React from 0 with good practices" course
TypeScript
48
star
37

css-architecture-course

HTML
39
star
38

figma-plugin-skeleton

πŸͺ† Template intended to serve as a starting point if you want to bootstrap a Figma Plugin in TypeScript.
TypeScript
35
star
39

awesome-vscode-settings

Awesome Settings for VSCode
TypeScript
33
star
40

typescript-web-skeleton

πŸ”·πŸ•ΈοΈ TypeScript Web Skeleton: Bootstrap your new TypeScript web frontend project
JavaScript
33
star
41

elastic-stack-example

Simple app using Elastic Stack (Elasticsearch+Logstash+Kibana) & Beats with Docker for the CodelyTV Pro course
PHP
32
star
42

developing_codely_website-course

Developing Codely's website course code examples https://pro.codely.tv/library/maquetando-la-web-de-codely-desde-0-181753
TypeScript
32
star
43

java-gildedrose-kata

Java
31
star
44

css-layouts-best-practises-course

Vue
31
star
45

n8n-nodes-twitch

n8n trigger node for Twitch: Execute workflows on stream start, stream end, and new follows
TypeScript
31
star
46

frontend-hexagonal_architecture-example

TypeScript
31
star
47

prometheus-course

πŸŽ“
Go
31
star
48

awesome-p2p

A curated list of awesome P2P learning tutorials and resources
30
star
49

youtube-code-examples

πŸŽ₯ Collection of code examples used in our screencasts about programming best practices
PHP
30
star
50

java-oop-examples

Object-Oriented Programming recap with Java examples
Java
29
star
51

css-grid-course

HTML
28
star
52

bash-github_actions-skeleton

😬 Speedup your GitHub Actions creation!
Shell
27
star
53

value_objects-course

Value Objects course examples
TypeScript
26
star
54

css-flex-course

CSS Flex course examples
HTML
26
star
55

kotlin-hexagonal_http_api-course

πŸ’Ž Kotlin Hexagonal HTTP API Course: Learn to do scalable Kotlin web apps
Kotlin
26
star
56

loki-grafana-course

26
star
57

php-finder_refactoring-kata

πŸ˜πŸ”Incomprehensible Finder Refactoring Kata port for PHP
PHP
25
star
58

awesome-bash-challenges

Awesome Bash Challenges
Shell
25
star
59

terraform-course

Terraform Codely course examples
HCL
25
star
60

design_patterns-criteria-course

Criteria Codely course examples
TypeScript
25
star
61

symfony-maintainable-scalable-course

Examples of "Symfony mantanible y escable" course
PHP
24
star
62

csharp-basic-skeleton

πŸ¦ˆπŸš€ C# Basic Skeleton: Bootstrap your new projects.
C#
24
star
63

design-patterns

Java
23
star
64

refactor-from-js-to-ts-course

TypeScript
23
star
65

add_ai_follwing_best_practices-course

Add Artificial Intelligence following best practices course examples
TypeScript
23
star
66

infrastructure_design-eventbus-aws-course

Infrastructure Design: AWS SQS as a Message Queue course examples
TypeScript
23
star
67

makefiles-course

Makefile
22
star
68

react-carousel

A React Carousel supporting different slides sizes, responsive, custom styling, accesible by default, SSR compatible, and tested
TypeScript
22
star
69

figma-plugin-structurer

πŸ—οΈ Figma Plugin for speeding up and ensure consistency in the structure of your Figma projects
TypeScript
22
star
70

react-devdash

Developer dashboard made in the "React from 0 with good practices" course
TypeScript
22
star
71

vue-progressive-migration-course

HTML
21
star
72

ci_with_github_actions-course

PHP
20
star
73

web-performance-course

Web performance course examples
CSS
20
star
74

check-critical-files

πŸ‘ Check for critical files in your commits
Shell
20
star
75

vue-3-course

Vue
19
star
76

javascript-modern-course

JavaScript
19
star
77

ban-words

Shell
19
star
78

eslint-plugin-no-default-parameters

A plugin that forbids the use of default parameters in functions, methods and constructors.
TypeScript
18
star
79

scala-basic-skeleton.g8

🧬🌱 Scala Basic Skeleton: Template for bootstrapping your new Scala project following idiomatic best practices powered by Giter 8.
Scala
18
star
80

css-light-dark-mode-course

HTML
18
star
81

react-state-management-course

React State Management course examples
JavaScript
18
star
82

domain_modeling-domain_events-course

Domain Modeling: Domain Events course examples
TypeScript
18
star
83

reactjs-video-favourites-app

Introductory examples to ReactJS used in the CodelyTV Pro course
JavaScript
17
star
84

php-coupled_code-example

πŸ˜πŸ€·β€β™‚οΈ Simple demo of a coupled code to ilustrate how to refactor to CQRS & DDD
PHP
16
star
85

aggregates-course

Aggregates course examples
TypeScript
16
star
86

no-pull-requests

πŸ™… GitHub Action to autoclose all Pull Requests
Shell
15
star
87

scala-basic-skeleton

🧬🌱 Scala Basic Skeleton: Template for bootstrapping your new Scala project following idiomatic best practices.
Scala
15
star
88

scala-examples

Ζ›πŸ€” Introduction to Scala CodelyTV Pro course examples
Scala
14
star
89

from-monolith-to-microservices-using-api-gateway

CodelyTV Course
PHP
13
star
90

phpstorm-settings

Code and File Templates for PhpStorm following the PHP ecosystem conventions
PHP
12
star
91

php-password_refactoring-kata

Ejercicio para practicar refactoring
PHP
11
star
92

no-branches

πŸ•Š GitHub Action to autoremove all branches
Shell
11
star
93

linting-js-ts-course

Linting js and ts course examples
HTML
11
star
94

kotlin-introduction-course

Intro a Kotlin course examples
Kotlin
10
star
95

csharp-finder_refactoring-kata

πŸ¦ˆπŸ”Incomprehensible Finder Refactoring Kata port for C#
C#
10
star
96

infrastructure_design-cache-course

Infrastructure design: Cache course examples
TypeScript
9
star
97

ddd_problems-domain_events_errors_handling-course

Examples of how to handle errors when publishing and consuming domain events
Java
9
star
98

typescript-react_library-vite_template

Template for creating React libraries with TypeScript following best practices: Storybook for documentation, testing, Continuous Integration, and linting
TypeScript
9
star
99

infrastructure_design-eventbus-rabbitmq-course

Infrastructure Design: RabbitMQ as a Message Queue course examples
TypeScript
9
star
100

scala-finder_refactoring-kata

Incomprehensible Finder Refactoring Kata Scala
Scala
8
star