This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # ====================================================== | |
| # 🧠 ErikOS — macOS Developer Workstation Setup | |
| # Author: Erik Henrique Alves Cunha | |
| # ====================================================== | |
| # Builds a full modern environment: | |
| # - CLI tools, Fish shell, Starship prompt | |
| # - Node (fnm), Python, Go, Rust (with fallback) | |
| # - Dev & productivity apps (DevToys, Paw, Obsidian, Raycast, etc.) | |
| # - Comfort tools (Maccy, KeepingYouAwake, Shottr, Stats, Shotcut, DBeaver, Fig, Warp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .loading-spin { | |
| height: 5rem; | |
| width: 5rem; | |
| border: 0.6rem solid green; | |
| border-radius: 50%; | |
| border-top-color: transparent; | |
| animation: spin 0.6s linear infinite; | |
| } | |
| @keyframes spin { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| FormControl, | |
| FormGroup, | |
| NonNullableFormBuilder | |
| } from '@angular/forms'; | |
| // 👇 This is a helper to bind any interface with the FormGroup generating a type safe form matching existing keys and FormControl type 🙂 | |
| export type WithControlsFrom<T> = { | |
| [P in keyof T]?: FormControl<T[P]>; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| HttpEvent, | |
| HttpHandler, | |
| HttpHeaders, | |
| HttpRequest, | |
| } from '@angular/common/http'; | |
| import { | |
| HttpClientTestingModule, | |
| HttpTestingController, | |
| } from '@angular/common/http/testing'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| Directive, | |
| ElementRef, | |
| EventEmitter, | |
| Input, | |
| OnDestroy, | |
| OnInit, | |
| Output, | |
| } from '@angular/core'; | |
| import { Observable, Subscription, debounceTime } from 'rxjs'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| display: grid; | |
| grid-template-areas: | |
| 'header' | |
| 'main' | |
| 'footer'; | |
| grid-template-columns: auto; | |
| grid-template-rows: auto 1fr auto; | |
| min-height: 100vh; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $separator: '\\:' !default; | |
| @mixin theme-colors-props-shades($name, $prop, $colors, $shades) { | |
| @each $color in $colors { | |
| @each $shade in $shades { | |
| .#{$name}-#{$color}-#{$shade} { | |
| #{$prop}: var(--#{$color}-#{$shade}); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| /* CSS */ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Remove duplicates by property | |
| * @param {string} property - List property identifier. | |
| * @param {T[]} oldList - Old list | |
| * @param {T[]} newList - New list | |
| * @returns {T[]} Returns a new list without duplicates by property passed | |
| */ | |
| export const removeDuplicatesByProperty = <T>( | |
| property: keyof T, | |
| oldList: T[] = [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Create an object composed without ommited object properties | |
| * @param {Object} object | |
| * @param {string} keys | |
| * @returns {Object} | |
| */ | |
| const omit = (obj, ...keys) => Object.fromEntries( | |
| Object.entries(obj) | |
| .filter(([key]) => !keys.includes(key)) | |
| ); |
NewerOlder