Skip to content

Instantly share code, notes, and snippets.

View nncl's full-sized avatar

Cauê Almeida nncl

View GitHub Profile
@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
$('html,body').animate({
  scrollTop: $("<ELEMENT-HERE>").offset().top},
'slow');
{
"points" : [
{
"title" : "Place 1",
"address" : "Avenida Paulista",
"specialties" : "Cardiologia, Gastro",
"phone" : "11 1234-4321",
"latitude": -23.534749,
"longitude": -46.611924
},
/**
* @description
* Environment variables
*/
(function (window) {
window.__env = window.__env || {};
window.__env.URL_API = 'http://example.com.br:3000/institutoavonapi/v1/';
window.__env.title = 'Instituto Avon';
window.__env.author = 'Avon';

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.

[
{
"nome": "Clube Atético Mineiro",
"estado": "MG",
"escudo": "http://www.testosterona.blog.br/wp-content/uploads/2016/02/atletico-mineiro.jpg",
"anofundacao": 1908
},
{
"nome": "Clube Atlético Paranaense",
"estado": "PR",