Skip to content

Instantly share code, notes, and snippets.

View pablocattaneo's full-sized avatar

Pablo Cattaneo pablocattaneo

View GitHub Profile
echo $SHELL
Source: https://stackoverflow.com/a/3327022/3599272
expect(typeof controller.createUser()).toBe('object')
Using toEqual method, for example:
expect(data).toEqual({one: 1, two: 2});
# Access mysql client line command
/opt/lampp/bin/mysql -u root
Yes, absolutely — you can **revert a problematic pull request (PR)** from `dev` without rewriting history. Here's how:
---
## ✅ Option 1: Revert the Entire PR Using `git revert -m`
If the PR was merged using a **merge commit** (the default for GitHub/GitLab), you can revert the whole PR cleanly with:
```bash
git checkout dev
app.use((req, res, next) => {
res.status(404).send('<h1>404!! Page not found</h1>');
})
// Note that there is not path and the status method that define the status code of the respond.
// index.js
app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET, POST, PUT, PATCH, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
next();
});
NumberInt(number)
// example
NumberInt(15)