Skip to content

Instantly share code, notes, and snippets.

View puranjayjain's full-sized avatar
🎱
Ballin'

Puranjay Jain puranjayjain

🎱
Ballin'
View GitHub Profile
@puranjayjain
puranjayjain / readme.md
Created May 27, 2020 06:20
Delete all git branches on remote except the ones mentioned to ignore

About

This unsafe and destructive command deletes all the prigin branches except the ones mentioned as grep -v 'uat'

List command

git branch --remote | grep -v 'dev' | grep -v 'qa' | grep -v 'uat' | grep -v 'master' | cut -b 10- | xargs

Deletion command

git branch --remote | grep -v 'dev' | grep -v 'qa' | grep -v 'uat' | grep -v 'master' | cut -b 10- | xargs git push --delete origin

@puranjayjain
puranjayjain / DeleteFirestoreIndexes
Created February 10, 2020 09:23
Delete all firestore composite indexes
# Delete all firestore composite indexes
gcloud firestore indexes composite list --uri | xargs -I{} gcloud firestore indexes composite delete {} --quiet
@puranjayjain
puranjayjain / darktheme.md
Created June 29, 2019 11:49
Dark theme on slack

For Mac

  1. Go to the applications folder and right click Slack.app and click show packaged contents
  2. Now go to '/Contents/Resources/app.asar.unpacked/src/static/'
  3. Open ssb-interop.js file in your code editor.
  4. add the code section as mentioned at the bottom to it and save it
  5. Now restart the slack app

For Windows

Keybase proof

I hereby claim:

  • I am puranjayjain on github.
  • I am puranjayjain (https://keybase.io/puranjayjain) on keybase.
  • I have a public key whose fingerprint is 5AB1 D590 72C7 D954 1423 F807 CCA8 E7F5 8987 4056

To claim this, I am signing this object:

@puranjayjain
puranjayjain / EmittingComponent.js
Created May 24, 2016 04:54
Using fbemitter-https://github.com/facebook/emitter/ (An event emitter) with React + ES6
import React from 'react'
import mrEmitter from '../helpers/mrEmitter'
export default class EmittingComponent extends React.Component {
handleClick = () => {
mrEmitter.emit('onSomeEvent', 'foo sends bar')
}
render() {