Skip to content

Instantly share code, notes, and snippets.

View thelbouffi's full-sized avatar

Taha EL BOUFFI thelbouffi

View GitHub Profile
@medhatdawoud
medhatdawoud / rules-to-write-better-commit-messages.md
Last active October 17, 2024 19:09
This gist is the summary of a video on YouTube [in Arabic] you can watch from here: https://youtu.be/BTlL-LBDCSI

Rules to write a better commit message

These are my preferences for a good commit message, feel free to fork this gist and add your own standards, or add comment here to share yours with the community.

1. Include only the files related to the feature you are implementing:

  • Don't add any file that is not related to the main issue, you can make it in a separate commit.
  • Separating files that not related is important in the revert cases.
  • Revise the whole changes always before committing and make sure to mention each change you made in the message.

2. Commit subject should be concise and reflect the essence of the commit:

  • Imagine the commit as an Email to the owner or your team mates.
  • Subject in the first and main sentence of the commit, it should be concise and to the point.
  • It shouldn't exceed 50 char.
@thameera
thameera / delete.js
Last active November 15, 2023 11:58
Bulk delete Auth0 users
#!/usr/bin/env node
/*
* Install dependencies with:
* npm install request request-promise-native bottleneck
*
* Replace YOUR_TENANT_NAME, MGMT_TOKEN, and FILENAME
* The input file (FILENAME) should contain a list of user ids to delete, separated by newlines
*/
@palaniraja
palaniraja / firebase scheme.json
Last active January 10, 2019 17:53
Firebase - REST api calls - postman collection. - Firebase schema - https://www.flickr.com/gp/palaniraja-mca/32J3rA
{
"activites" : "activitiesTable",
"tasks" : {
"-KfbYYnJDdJ1IfQ4D6bl" : {
"firstname" : "palani",
"lastname" : "just lastname updated"
},
"-KfpLsLVH59MpKXDdYVm" : {
"firstname" : "palaniraja",
"lastname" : "raja"
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active November 4, 2024 04:19
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active September 18, 2024 18:30
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups