Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo
{ | |
"presets": ["es2015"], | |
"plugins": [ | |
"add-module-exports" | |
], | |
} |
module.exports = { | |
up: function (queryInterface, Sequelize) { | |
return [ | |
queryInterface.addColumn('User', 'name', { | |
type: Sequelize.STRING | |
}), | |
queryInterface.addColumn('User', 'nickname', { | |
type: Sequelize.STRING, | |
}) | |
]; |
Based off of: http://docs.sequelizejs.com/en/1.7.0/articles/express/
Create and initialize your a directory for your Express application.
$ mkdir sequelize-demo
# Heroku Django Commands # | |
# ---------------------- # | |
# Push local git changes to heroku | |
git push heroku master | |
# Login to heroku via toolbelt | |
heroku login | |
# View heroku processes |
// NOTE: MySQL does not support transactional DDL (https://dev.mysql.com/doc/internals/en/transactions-notes-on-ddl-and-normal-transaction.html) | |
// You should use this with a (cool) DBMS such as PostgreSQL. | |
module.exports = { | |
up: (queryInterface, Sequelize) => { | |
return queryInterface.sequelize.transaction((t) => { | |
return Promise.all([ | |
queryInterface.addColumn('table_name', 'column_name1', { | |
type: Sequelize.STRING | |
}, { transaction: t }), |
/* Closure */ | |
const buttons = document.getElementsByClassName('three-buttons'); | |
for (var i = 0; i < 3; i++) { | |
buttons[i].addEventListener(function(){ | |
console.log(i) | |
}); | |
} | |
// Click 1st button -> 2 | |
// Click 2nd button -> 2 | |
// Click 3rd button -> 2 |
web: vendor/bin/heroku-php-apache2 public/ |
<video controls> | |
<source src=http://techslides.com/demos/sample-videos/small.webm type=video/webm> | |
<source src=http://techslides.com/demos/sample-videos/small.ogv type=video/ogg> | |
<source src=http://techslides.com/demos/sample-videos/small.mp4 type=video/mp4> | |
<source src=http://techslides.com/demos/sample-videos/small.3gp type=video/3gp> | |
</video> |
<!doctype html> | |
<html> | |
<head> | |
<title>page thumbnails using iframes and CSS3</title> | |
<meta charset="utf-8"> | |
<style> | |
.thumbnail { | |
width: 300px; | |
height: 160px; | |
} |
First run ...
ssh-keygen -t rsa -b 4096 -C 'email@domain.com'
... from terminal, then run ...
eval "$(ssh-agent -s)"