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
.filter('slugify', function(){ | |
return function(input){ | |
var tittles = "ÃÀÁÄÂÈÉËÊÌÍÏÎÒÓÖÔÙÚÜÛãàáäâèéëêìíïîòóöôùúüûÑñÇç"; | |
var original = "AAAAAEEEEIIIIOOOOUUUUaaaaaeeeeiiiioooouuuunncc"; | |
for (var i = 0; i < tittles.length; i++) { | |
input = input.replace(tittles.charAt(i), original.charAt(i)).toLowerCase(); | |
}; | |
return input; | |
}; | |
}); |
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
var duration = moment.duration(end.diff(startTime)); | |
var hours = duration.asHours(); |
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 Sequelize from 'sequelize' | |
import bcrypt from 'bcrypt-nodejs' | |
import connection from '../config/db' | |
require('sequelize-isunique-validator')(Sequelize) | |
let User = connection.define('user', { | |
firstName: { | |
type: Sequelize.STRING(50), | |
allowNull: false, |
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 time | |
class Offer(models.Model): | |
title = models.CharField(max_length=140,) | |
description = models.TextField(max_length=500, blank=True, null=True) | |
slug = models.SlugField(max_length=240, unique=True) | |
created_at = models.DateTimeField(auto_now_add=True, editable=False) | |
def __str__(self): | |
return self.title |
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
atom-workspace { | |
font-family: "Operator Mono"; | |
font-size: 12px; | |
font-weight: 400; | |
} | |
atom-text-editor { | |
font-family: "Operator Mono"; | |
font-size: 13px; | |
font-weight: 400; |
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 webpack = require('webpack') | |
const path = require('path') | |
const HtmlWebpackPlugin = require('html-webpack-plugin') | |
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ | |
template: path.join(__dirname, './src/index.html'), | |
filename: 'index.html', | |
inject: 'body' | |
}) |
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 { Schema } = require('mongoose'); | |
const mongoose = require('mongoose'); | |
const User = new Schema({ | |
instagram: { | |
id: String, | |
accessToken: String, | |
full_name: String, | |
username: String, | |
profile_picture: String, |
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 express = require('express'); | |
const session = require('express-session'); | |
const passport = require('passport'); | |
const exphbs = require('express-handlebars'); | |
const bodyParser = require('body-parser'); | |
require('./config/db'); | |
const app = express(); | |
app.engine('handlebars', exphbs({ defaultLayout: 'main' })); |