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
Vscode como editor padrão do git : | |
git config --global core.editor "code -w" | |
comando para verficar se a instalação foi feita correto : | |
git config --global -e | |
Se der algum erro como: | |
"hint: Waiting for your editor to close the file... code -w: code: command not found error: There was a problem with the editor 'code -w'". | |
Vá no VS Code > command(control) + shift + p > procure por code > escolha Shell Command: Install ‘code' command in PATH |
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
In console: | |
git config credential.helper | |
You will see: osxkeychain | |
git config --global credential.helper sourcetree | |
Then if you perform git config credential.helper again | |
You will see: sourcetree |
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
#!/bin/bash | |
youtube-dl --rm-cache-dir --cookies ./youtube.com_cookies.txt --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist 'https://youtube.com/playlist?list=PL14877460D389BBFA' |
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
#!/bin/bash | |
set -e | |
file=$(cat pubspec.yaml) | |
BUILD_NAME=$(echo $file | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p') | |
BUILD_NUMBER=$(git rev-list HEAD --count) |
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
{ | |
// Domain | |
// Repository | |
"Dart Clean Arch - Repository Interface Type: Set": { | |
"prefix": ["repository-interface-set"], | |
"body": [ | |
"abstract class I${1:RuleName}Repository {\t$0", | |
" Future<Either<${1:RuleName}RepositoryError, ${2:T}>> call(${3:T} param);", | |
"}\t$0" | |
], |
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
class Validators { | |
static bool validateEmail(String value) { | |
if (value.isEmpty) return false; | |
final String pattern = | |
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'; | |
final regex = RegExp(pattern); | |
final result = regex.hasMatch(value); | |
return result; | |
} |
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
abstract class IGlobalFailure implements Exception { | |
final String? message; | |
IGlobalFailure({this.message}); | |
} | |
abstract class EitherFailure implements Exception { | |
final String? message; | |
EitherFailure({this.message}); | |
} |
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 {Injectable} from '@angular/core'; | |
import {Cache} from '../utils/storage.provider'; // Decorator to access local storage | |
let OneSignal; | |
const url = ''; | |
@Injectable() | |
export class OneSignalService { | |
@Cache({pool: 'OneSignal'}) oneSignalInit; // to check if OneSignal is already initialized. |
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
// USAGE: | |
// | |
// When you attach the infiniteScroll directive to an element, it will emit the infiniteScrollAction | |
// @Output() event every time the user has scrolled to the bottom of the element. Your loadMoreArticles | |
// function can make an HTTP call and append the results to the articles list, for example. In doing this, | |
// you effectively increase the height of the element and thus begin the process of the infiniteScroll directive | |
// again, over and over until the element height stops increasing. | |
// | |
// <div class="container" infiniteScroll (infiniteScrollAction)="loadMoreArticles()"> | |
// <div class="article" *ngFor="let article of articles"> |
NewerOlder