Skip to content

Instantly share code, notes, and snippets.

View SanjeevKumarPandey's full-sized avatar

Sanjeev Pandey SanjeevKumarPandey

View GitHub Profile
SanjeevKumarPandey / push-notification.js
Created April 5, 2021 13:40
* async function
* @returns token for messaging service
const askForPermissionToReceiveNotifications = async () => {
try {
const messaging = firebase.messaging();
await messaging.requestPermission();
const token = await messaging.getToken();
console.log('client token for the messaging:\n', token);
SanjeevKumarPandey /
Created June 17, 2019 08:14 — forked from scy/
How to delete a file from a Git repository, but not other users' working copies

How to delete a file from a Git repository, but not other users' working copies

Suppose you have, by mistake, added your IDE's project folder (you know, these .idea folders with all kinds of local paths and configuration data and settings in it) to the Git repository of your project. (We're talking about a whole folder here, but the same rules apply to individual files as well.)

Of course, you only realize that two days after the fact and have already pushed it, and your colleagues have already pulled it. They use the same IDE as you do, so whenever they change a setting or fix paths, they can either

  • commit that, causing nasty merge conflicts for you and others or
  • ignore the changes and carry around a modified file until the end of time without ever committing it.

Why .gitignore won't help

SanjeevKumarPandey /
Created January 14, 2019 20:02 — forked from mrbar42/
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)


bash beach.mkv

will produce:

      |- playlist.m3u8
 |- 360p.m3u8