Skip to content

Instantly share code, notes, and snippets.

View nncl's full-sized avatar

Cauê Almeida nncl

View GitHub Profile

Din Digital - Padrões Frontend

Alguns padrões dos projetos da Din Digital.

Guideline

O que todo projeto deve seguir está comentado aqui.

Essa guideline não está finalizada e sempre adicionamos novas ideias/padrões/etc para nos ajudar no desenvolvimento.

@nncl
nncl / ratings.md
Created December 26, 2017 18:32
Ratings

Rating

Rating info.

Ratings' Collection

{
	"value" : 5 // 1 a 5
	, "product" : 32123 // ID AVON
@nncl
nncl / remove-accents.js
Created December 26, 2017 16:40 — forked from monkeymonk/remove-accents.js
AngularJS `removeAccents` filter
angular.module('utils.filters', [])
.filter('removeAccents', removeAccents);
function removeAccents() {
return function (source) {
var accent = [
/[\300-\306]/g, /[\340-\346]/g, // A, a
/[\310-\313]/g, /[\350-\353]/g, // E, e
/[\314-\317]/g, /[\354-\357]/g, // I, i
/[\322-\330]/g, /[\362-\370]/g, // O, o
@nncl
nncl / getWeek.js
Created October 12, 2017 22:30 — forked from dtomasi/getWeek.js
Get Week of Year in Javascript
Date.prototype.getWeek = function() {
var jan4th = new Date(this.getFullYear(),0,4);
return Math.ceil((((this - jan4th) / 86400000) + jan4th.getDay()+1)/7);
}
var now = new Date();
var weekNumber = now.getWeek();
console.log(weekNumber);
@nncl
nncl / WMI - Main Flow.md
Created October 2, 2017 03:49
WMI - Main Flow

Perfil

- quem ele é -> tags, pq quando alguém buscar por profissional vai buscar perfil com essa tag

Projeto

- add esse projeto no array de projetos do usuário - by ID, pq Projeto é um coleção

Busca

- eu vou buscar por um profissional, vou ver os projetos dele e vou dar like em um
- esse profissional vai receber um push avisando que alguém está interessado em seu perfil
- ao clicar na notificação o app mostra o meu perfil
@nncl
nncl / Be MEAN Instagram - MongoDB.md
Last active September 7, 2017 21:12
Be Mean Instagram

Be MEAN Instagram - MongoDB

Getting Started

Configure your CLI to MongoDB, bro:

$ 
@nncl
nncl / ionic-device.md
Last active September 6, 2017 17:04
Ionic Device Information

Ionic Device Information

You can get information about client's device running:

var deviceInformation = ionic.Platform.device();
console.log(JSON.stringify(deviceInformation));

The console.log(JSON.stringify(deviceInformation)) shows this:

@nncl
nncl / Din Stuff.md
Last active August 14, 2017 22:04
How to create virtual machines, import/export databases, make a deploy on server and much more.

Din Stuff

This file is based on doubts that I had/have when I got in at Din Digital and when I forget some stuff.

Note: some paths depend of your own enviroment.

What you'll find here

This:

@nncl
nncl / Laravel Enviroment.md
Last active August 11, 2017 13:57
Laravel Enviroment tips and stuff