Skip to content

Instantly share code, notes, and snippets.

@apjyotirmay
apjyotirmay / 20181118235404-some-migration.js
Created October 16, 2019 09:54 — forked from s1moe2/20181118235404-some-migration.js
Sequelize migration add/drop multiple columns (transacting)
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.sequelize.transaction((t) => {
return Promise.all([
queryInterface.addColumn('table_name', 'column_name1', {
type: Sequelize.STRING
}, { transaction: t }),
queryInterface.addColumn('table_name', 'column_name2', {
type: Sequelize.STRING,
}, { transaction: t })
@apjyotirmay
apjyotirmay / damn-fast-ruby-setup.sh
Last active August 15, 2018 12:36 — forked from sandys/damn-fast-ruby-setup.sh
Set up a development environment for ruby in 30 minutes on ubuntu. This will use rbenv to take care of paths and will mimic how you would set up your production environment. A very clean separated setup conducive to integration with Puppet/chef (for installation of ruby versions) and Capistrano (for contained deployment). Allows for per-user own…
#pre-requisites
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev git libpq-dev libmysqlclient-dev libpq-dev nodejs libcurl4-openssl-dev libffi-dev imagemagick libjpeg-progs pngcrush
############optional
sudo apt-get install vim zsh
######### optional for jruby
sudo apt-get install openjdk-7-jdk