Skip to content

Instantly share code, notes, and snippets.

View toba-madamori's full-sized avatar
🎯
Focusing on Node/Express js

Toba Madamori toba-madamori

🎯
Focusing on Node/Express js
View GitHub Profile
@BekBrace
BekBrace / booking.sql
Last active May 30, 2024 04:37
MySQL Cheat Sheet
-- Simulate creating booking.com database
SHOW DATABASES;
CREATE DATABASE booking_company;
USE booking_company;
SELECT DATABASE ();
SHOW CREATE DATABASE booking_company;
-- create guests table
CREATE TABLE guests (
id INT NOT NULL AUTO_INCREMENT,
@whoisryosuke
whoisryosuke / Update-branch.md
Created September 17, 2019 17:38 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@stongo
stongo / app.js
Last active June 13, 2024 11:40
Joi validation in a Mongoose model
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
var db = mongoose.connection;
db.on('error', function() {
return console.error.bind(console, 'connection error: ');
});