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
| git_current_branch () { | |
| local ref | |
| ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null) | |
| local ret=$? | |
| if [[ $ret != 0 ]] | |
| then | |
| [[ $ret == 128 ]] && return | |
| ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
| fi | |
| echo ${ref#refs/heads/} |
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
Show hidden characters
| { | |
| "root": true, | |
| "parser": "@typescript-eslint/parser", | |
| "plugins": ["@typescript-eslint", "react", "prettier", "babel"], | |
| "extends": [ | |
| "airbnb/hooks", | |
| "eslint:recommended", | |
| "plugin:react/recommended", | |
| "plugin:@typescript-eslint/eslint-recommended", | |
| "plugin:@typescript-eslint/recommended", |
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 Server from "express"; | |
| import bodyParser from "body-parser"; | |
| import cors from "cors"; | |
| import http, { HttpBase } from "http"; | |
| import https from "https"; | |
| import { readFileSync } from "fs"; | |
| import errors from "./middlewares/error"; |
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 dotenv from "dotenv"; | |
| import { readFileSync } from "fs"; | |
| const compareKeys = (sample: object, config: object) => { | |
| const configKeys = Object.keys(config); | |
| return Object.keys(sample).every(key => configKeys.includes(key)); | |
| }; | |
| const loadEnv = () => { | |
| const buffer = readFileSync(".env.example"); |
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
| #include <iostream> | |
| #include <cstdlib> | |
| using namespace std; | |
| int hanoi(int n) | |
| { | |
| if(n == 1) | |
| return 1; |
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
| type CallbackRunnerType = (startDate?: Date) => void | Promise<void>; | |
| export default class Runner { | |
| private milliseconds: number; | |
| private exit: boolean; | |
| constructor(milliseconds: number) { | |
| this.milliseconds = milliseconds; | |
| this.exit = false; | |
| } |
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
| interface GeoLocalizer { | |
| latitude: number; | |
| longitude: number; | |
| } | |
| interface DistanceCalculator { | |
| from: GeoLocalizer; | |
| to: GeoLocalizer; | |
| } |
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
| version: "3" | |
| services: | |
| db_mongodb: | |
| image: mongo | |
| container_name: ze-delivery | |
| ports: | |
| - "27017:${MONGO_PORT}" | |
| volumes: | |
| - ./__data__:/data/db |
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
| // Place your key bindings in this file to override the defaultsauto[] | |
| [ | |
| { | |
| "key": "ctrl+shift+alt+f5", | |
| "command": "workbench.action.debug.run", | |
| "when": "!inDebugMode" | |
| }, | |
| { | |
| "key": "ctrl+f5", | |
| "command": "-workbench.action.debug.run", |
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 Evento { | |
| constructor(eventos = []) { | |
| // eslint-disable-next-line no-return-assign | |
| eventos.forEach(evento => (this[evento] = [])); | |
| this.eventos = eventos; | |
| } | |
| addEventListener(nome, evento) { | |
| console.log(`%c addEventListener ${nome} `, 'background: #17a2b8; color: #0c0c0c'); |
NewerOlder