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
services: | |
mongo-rs-1-1: | |
container_name: "mongo-1-1" | |
image: mongobuild | |
ports: | |
- "30201:27017" | |
command: mongod --replSet rs-1 --port 27017 --nojournal --oplogSize 16 --noprealloc --smallfiles | |
links: | |
- mongo-rs-1-2:mongo-rs-1-2 | |
- mongo-rs-1-3:mongo-rs-1-3 |
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
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
node: true, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'airbnb', |
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
#!/usr/bin/env bash | |
fonts_dir="${HOME}/.local/share/fonts" | |
if [ ! -d "${fonts_dir}" ]; then | |
echo "mkdir -p $fonts_dir" | |
mkdir -p "${fonts_dir}" | |
else | |
echo "Found fonts dir $fonts_dir" | |
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
const createLogger = require('winston').createLogger; | |
const format = require('winston').format; | |
const transports = require('winston').transports; | |
const logger = createLogger({ | |
level: 'error', | |
format: format.json, | |
transports: [ | |
new transports.File({ | |
filename: "logs/error.json", |
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 bairros = ["ACAMPAMENTO BONANÇA","ACAMPAMENTO JOSÉ ARNALDO","AGROVILA MASSANGANO","ALMAS","ALTO BELA VISTA","ALTO DA BOA VISTA","ALTO DO COCAR","ALTO GRANDE","ALVORADA","ANTÔNIO CASSIMIRO","ARANZEU","ARCO ÍRIS","ÁREA 17","ÁREA 19","ÁREA 20","ÁREA 21","ÁREA 22","AREIA BRANCA","ASSENCO","ASSENTAMENTO 25 DE JULHO","ASSENTAMENTO ÁGUA VIVA I","ASSENTAMENTO ÁGUA VIVA II","ASSENTAMENTO JOSE ALMEIDA","ASSENTAMENTO MANDACARU","ASSENTAMENTO MANSUETO DE LAVOR","ASSENTAMENTO TERRAS DA LIBERDADE","ATALHO","ATRAS DA BANCA","BAIXA FECHADA","BARÃO DO RIO BRANCO","BELA VISTA","BETÂNIA","BOA ESPERANÇA","BOLA DE OURO","BOM JESUS","BR 428","C 1","C 2","C 3","CAATINGUINHA","CACHEADO","CAITITU","CAMINHO DAS ÁGUAS","CAMINHO DO SOL","CANAL 14","CAPIM","CARLEUSA","CARNEIRO","CARRETÃO","CASA NOVA","CASSIMIRO GOMES DE SÁ I","CASSIMIRO GOMES DE SÁ II","CASTRO ALVES","CELECINA LIRA REIS","CENTRO","CHACARAS","CIDADE JARDIM","CIDADE NOVA","CIDADE UNIVERSITÁRIA","COHAB I","COHAB II","COHAB III","COHAB IV","COHAB MASSANGANO","COHAB SÃO |
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
//No Controller | |
return redirect()->back()->with([ | |
'message' => "Favor preencha todos os CAMPOS!" | |
]); | |
//No template | |
@if(Session::has('message')) | |
<script> | |
$(function () { | |
$.jGrowl("{{ Session::get('message') }}", { |
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
// Cache clear route | |
Route::get( | |
'cache-clear', | |
function () { | |
\Artisan::call('config:cache'); | |
\Artisan::call('cache:clear'); | |
\Artisan::call('config:clear'); | |
return redirect()->back(); | |
} | |
); |
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
#--execute=statement, -e statement | |
mysql -u root -e'create database apidemo' |
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 * as FileSystem from "expo-file-system"; | |
class File { | |
static documents = FileSystem.documentDirectory; | |
static path = (filename) => { | |
return this.isAbsolute(filename) ? filename : `${this.documents}${filename}`; | |
} | |
static isAbsolute = (filename) => { |
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 PDFReader from "rn-pdf-reader-js" | |
const PDF = (file) => { | |
const uri = File.path(file.url); | |
return <PDFReader source={{ uri }} withScroll={true} /> | |
}; | |
export default PDF; |
NewerOlder