Skip to content

Instantly share code, notes, and snippets.

View laerciobernardo's full-sized avatar
🏠
Working from home

Laércio Bernardo laerciobernardo

🏠
Working from home
  • iUPi Tecnologia
  • Vila Nova de Gaia, Porto
  • 12:19 (UTC +01:00)
  • X @laerciobernardo
View GitHub Profile
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU
#
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
#
ssh -i <your private key.pem> ec2-user@<your public ip address>
#
# On the Mac
@laerciobernardo
laerciobernardo / init.vim
Created February 26, 2021 00:50 — forked from jtumano/init.vim
Neovim coc config for frontend development
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" ---
Plug 'scrooloose/nerdtree' " NERD Tree
Plug 'Xuyuanp/nerdtree-git-plugin' " show git status in Nerd tree
@laerciobernardo
laerciobernardo / index.html
Created January 2, 2019 22:29
Test get ip and store on firebase
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
'use strict'
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
let avaliationItemSchema = new Schema({
description: String,
_type: {type: Schema.Types.ObjectId, ref: 'avaliationType'},
active: Boolean,
});
angular.module('starter')
.factory("$fileFactory", function ($q) {
var File = function () { };
File.prototype = {
getParentDirectory: function (path) {
var deferred = $q.defer();
var filesPath = ["file:///storage/emulated/0/myfile.txt","file:///storage/emulated/0/folder", "file:///storage/emulated/0/other-file.txt"];
function processFilesPaths(filesPath) {
angular.forEach(data, function (filePath) {
window.resolveLocalFileSystemURL(filePath, function (fileEntry) {
fileEntry.file(function (file) {
vm.attachments.push(file);
});
});
});
'use strict'
const express = require('express');
const router = express.Router();
const Ctrl = require('../controllers/companyCtrl');
const callback = (data, res) => {
res.json(data);
};
const errorHandler = (err, res) => {
'use strict'
const Model = require('../models/company');
const create = (obj) => {
return Model.create(obj);
};
const remove = (uid) => {
let query = {uid: uid};
return Model.remove(query);
'use strict'
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
let companySchema = new Schema({
cnpj: String,
ie: String,
razaoSocial: String,
nomeFantasia: String,
endereco: {
const func1 = () ={
console.log("sou a func 1);
}
const func2 = () ={
console.log("sou a func 2);
}
module.exports = {
func1,