Provider | Singleton | Instantiable | Configurable |
---|---|---|---|
Constant | Yes | No | No |
Value | Yes | No | No |
Service | Yes | No | No |
Factory | Yes | Yes | No |
Decorator | Yes | No? | No |
Provider | Yes | Yes | Yes |
This file contains 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 arquivos de logs antigos | |
On Error Resume Next | |
Set aArgs = WScript.Arguments | |
Set oFileSys = WScript.CreateObject("Scripting.FileSystemObject") | |
today = Date | |
' Informe a extensão dos arquivos que deseja | |
' remover separados por virgula. |
This file contains 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
<template> | |
<div></div> | |
</template> | |
<script> | |
import {kebabCase} from 'lodash'; | |
export default { | |
bindings: {type: '<'}, | |
controller: class ComponentCtrl { |
This file contains 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
var teste_token = false; | |
if (responseCode.code === 200) { | |
var jsonData = JSON.parse(responseBody); | |
postman.setEnvironmentVariable("access_token", jsonData["access_token"]); | |
teste_token = true; | |
} |
This file contains 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
# Show git branch | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[\033[00m\]\[\033[01;34m\]\w\[\033[01;32m\]$(parse_git_branch)\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi |
This file contains 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 iterativefib from 'iterativefib'; | |
import memofib from 'memofib'; | |
import range from 'test/helpers/range'; | |
const nsTime = (hrtime) => hrtime[0] * 1e9 + hrtime[1]; | |
const profile = () => { | |
const numbers = 79; | |
const msg = `Profile with ${ numbers } numbers`; |
This file contains 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 iterativefib from 'iterativefib'; | |
import memofib from 'memofib'; | |
import range from 'test/helpers/range'; | |
const nsTime = (hrtime) => hrtime[0] * 1e9 + hrtime[1]; | |
const profile = () => { | |
const numbers = 79; | |
const msg = `Profile with ${ numbers } numbers`; |
This file contains 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
console.clear() | |
const {lstatSync, readdirSync, writeFileSync, unlinkSync} = require('fs') | |
const glob = require('glob') | |
const {join} = require('path') | |
const isDirectory = source => lstatSync(source).isDirectory | |
const getDirectories = source => | |
readdirSync(source).map(name => join(source, name)).filter(isDirectory) | |
const directories = getDirectories('./') |
This file contains 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
const equals = (a, b) => { | |
if (a === b) return true; | |
if (a instanceof Date && b instanceof Date) return a.getTime() === b.getTime(); | |
if (!a || !b || (typeof a !== 'object' && typeof b !== 'object')) return a === b; | |
if (a === null || a === undefined || b === null || b === undefined) return false; | |
if (a.prototype !== b.prototype) return false; | |
let keys = Object.keys(a); | |
if (keys.length !== Object.keys(b).length) return false; | |
return keys.every(k => equals(a[k], b[k])); | |
}; |
This file contains 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
{ | |
"data": [ | |
{ | |
"id": "1", | |
"first_name": "John", | |
"last_name": "Doe", | |
"avatar_url": "https://i.pravatar.cc/400?u=johondoe", | |
"handle": "jhon_doe", | |
"metrics": { | |
"overall_score": 0, |