Skip to content

Instantly share code, notes, and snippets.

View haimingzhao's full-sized avatar

H Z haimingzhao

View GitHub Profile
@haimingzhao
haimingzhao / channel_username.py
Last active September 16, 2021 15:18
Get more than 100 usernames from a slack channel
import os
import requests
SLACK_API_TOKEN='' # Your token here
FROM_CHANNEL_ID='' # Get the id from the bottom of the channel description
NEW_CHANNEL_ID=''
LIMIT=200 # default limit was 100 need to change based on size
members = requests.get('https://slack.com/api/conversations.members?token=%s&channel=%s&limit=%s' % (SLACK_API_TOKEN, FROM_CHANNEL_ID, LIMIT)).json()['members']
existing_members = requests.get('https://slack.com/api/conversations.members?token=%s&channel=%s&limit=%s' % (SLACK_API_TOKEN, NEW_CHANNEL_ID, LIMIT)).json()['members']
@haimingzhao
haimingzhao / DarkRead.css
Last active September 27, 2017 09:53
My custom stylesheets for Chrome plugin Just-Read https://github.com/ZachSaucier/Just-Read.
@font-face {
font-family: "Source Sans Pro Semibold";
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Semibold.ttf");
}
@font-face {
font-family: "Source Sans Pro Bold";
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Bold.ttf");
}