Skip to content

Instantly share code, notes, and snippets.

View ankush's full-sized avatar

Ankush Menat ankush

View GitHub Profile
const fetch = require('node-fetch')
fetch('http://yoursite/api/resource/Item/itemname', {
headers: {
'Authorization': 'token key_id:key_secret',
'Accept': 'application/json',
'Content-Type': 'application/json',
}
})
.then(r => r.json())
@ankush
ankush / remind-users-to-delete-channels.py
Created April 19, 2020 17:02
Script to remind slack users to delete the channels which aren't being used.
import slack
from collections import defaultdict
from time import sleep
def process_channels(channels):
users = defaultdict(list)
for ch in channels:
@ankush
ankush / pan_status.py
Last active January 27, 2020 19:25
Check for PAN card application status using command line!
#!/usr/bin/env python
# Simple script to get PAN card application status
# Author: Ankush Menat
# Licence: WTFPL
# Requirements: requests, BeautifulSoup4
import requests
from bs4 import BeautifulSoup