Skip to content

Instantly share code, notes, and snippets.

View acanimal's full-sized avatar

Antonio Santiago acanimal

View GitHub Profile
@acanimal
acanimal / getDomainName.js
Last active August 17, 2018 16:16 — forked from tahirm/getDomainName.js
Get complete domain name with protocol and port if available. #js #urlFrom http://stackoverflow.com/questions/6941533/javascript-get-protocol-domain-and-port-from-url
const domain = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
@acanimal
acanimal / model-user.js
Last active February 17, 2020 15:34 — forked from lucasscariot/model-user.js
Composite Primary Key in Sequelize
/*
* Migration
*/
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.createTable('JobSkills', {
experience: {
type: Sequelize.INTEGER,
allowNull: false
},