Skip to content

Instantly share code, notes, and snippets.

View jaipandya's full-sized avatar
💭
I may be slow to respond.

Jai Pandya jaipandya

💭
I may be slow to respond.
View GitHub Profile
@ZackStone
ZackStone / slack-invite-all-members-to-a-channel.js
Created April 14, 2017 13:48
Invite all team members to a Slack channel
/*
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062
Instructions: Just browse to the appropriate channel and paste
this script (below) into your Chrome/Firefox dev console and hit enter.
Then wait for the script to run until it completes.
It might take time as there is a limit to how many users may be invited at once.
The script will loop until all team members are invited.
*/
var foundAny=false;
function selectAllByLetter(remainingLetters) {
@bahoo
bahoo / export-users-from-slack-channel.py
Created February 2, 2017 21:28
Export users (first name, last name, email address) from a given Slack channel
import requests
SLACK_API_TOKEN = "xoxo-asdfghjkl..." # get one from https://api.slack.com/docs/oauth-test-tokens
CHANNEL_NAME = "general"
channel_list = requests.get('https://slack.com/api/channels.list?token=%s' % SLACK_API_TOKEN).json()['channels']
channel = filter(lambda c: c['name'] == CHANNEL_NAME, channel_list)[0]
channel_info = requests.get('https://slack.com/api/channels.info?token=%s&channel=%s' % (SLACK_API_TOKEN, channel['id'])).json()['channel']
members = channel_info['members']
@abrambailey
abrambailey / invite-all-users-to-slack-channel.js
Last active October 29, 2020 06:10
Invite all users to slack channel
var i = 1;
function inviteAllUsers() {
setTimeout(function () {
setTimeout(function() {
$('#channel_actions_toggle').click();
},100)
setTimeout(function() {
$('#channel_invite_item').click();
},200)
@eddiejaoude
eddiejaoude / most-active-users-on-github-2015.md
Last active November 30, 2017 10:30
Most active users on GitHub 2015

This is the top 1000 users on GitHub

Where are you on here?

For the first 6 months of 2015 (Jan - June).

Query used on Google's BigQuery with GitHubArchive Data

SELECT actor.login as user, COUNT(*) as total FROM (
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@markrian
markrian / vermin.js
Created August 21, 2014 11:07
Opinionated grunt task to manage filerev and usemin to ensure correct hashes after replacements. See https://github.com/yeoman/grunt-usemin/issues/288.
'use strict';
/**
* Vermin completely manages the running of the filerev and usemin tasks, so
* that assets that reference other assets are correctly hashed after their
* referenced assets are spliced in by usemin.
*
* Vermin also makes various assumptions about how filerev and usemin are set
* up. For instance, it assumes that usemin runs immediately after filerev,
* that filerev renames files in-place, and that usemin relies on
@jbarona
jbarona / gist:3444459
Created August 24, 2012 01:23
Timestamp fun
# no config
Time.now is localtime
1.second.from_now is UTC
Timestamp stored in UTC
AR not translated
Time.now: Fri Aug 24 10:22:25 +0930 2012
1.second.from_now 2012-08-24 00:52:26 UTC
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@grgur
grgur / BlobBuilder.js
Created July 13, 2011 17:25 — forked from eligrey/gist:1079572
BlobBuilder shim
/* BlobBuilder.js
* A complete BlobBuilder shim
* By Eli Grey
* License: MIT/X11
*/
/*global self, unescape, encodeURIComponent */
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
plusplus: true, maxerr: 50, indent: 4 */