Skip to content

Instantly share code, notes, and snippets.

View digitaldrreamer's full-sized avatar
💭
I may be slow to respond. Gimme three days, at most ;)

Abdullah Basheer digitaldrreamer

💭
I may be slow to respond. Gimme three days, at most ;)
View GitHub Profile
@digitaldrreamer
digitaldrreamer / objectDiff.js
Last active October 23, 2024 08:34
A Function to Compare Two Objects and Get The Difference or return `null`.
/**
* Compares two objects and returns the differences, or null if they're the same
* @param {Object} original - Original form data
* @param {Object} current - Current form data
* @returns {Object|null} Object containing only the changed fields, or null if no changes
*/
function getObjectDiff(original, current) {
const changes = {};
for (const [key, value] of Object.entries(current)) {
@kevin-smets
kevin-smets / _README.md
Last active July 19, 2024 18:34
Google Sheets API on Node.js
@AnalyzePlatypus
AnalyzePlatypus / using-sheets-api.md
Last active October 17, 2024 01:03
Node.js - Accessing a spreadsheet using the Google Sheets API

Using the Sheets API

To access the Sheets API, you will need to enable the Sheets API, obtain credentials, and grant access to your Sheet.

Based on these instructions

1. Enabling the Sheets API

  1. Open the Google Developers Console
  2. Select your project or create a new one (and then select it)
@mrkpatchaa
mrkpatchaa / README.md
Last active October 21, 2024 16:46
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.