Skip to content

Instantly share code, notes, and snippets.

View vaibhavi3t's full-sized avatar

Vaibhav Kumar vaibhavi3t

  • India
View GitHub Profile
@vaibhavi3t
vaibhavi3t / nvm-commands.js
Created January 4, 2021 06:14
most used nvm commands
// check nvm version
node -v || node --version
// list installed nvm versions
nvm ls
// install specific version of node
nvm install v11.15.0
// set default version of node
@vaibhavi3t
vaibhavi3t / trigger.sql
Created July 13, 2016 12:56
Mysql trigger to log the after update and after insert in a table. First trigger is to record the status of listing after update and second one to record the after insert status.
LISTING STATUS CHANGE TRACK
1. Table listing_status_track to log the listing status change.
create table listing_status_track (
listing_id int(10) unsigned,
status_from enum('incomplete','inactive','active','expired','truebiled','booked','soldByOthers'),
status_to enum('incomplete','inactive','active','expired','truebiled','booked','soldByOthers'),
changed_at TIMESTAMP default current_timestamp,
FOREIGN KEY (listing_id) REFERENCES listings(id)
);

These are some small widgets which can be used with other web elements in the web development.