Skip to content

Instantly share code, notes, and snippets.

@lmarkus
lmarkus / keybase.md
Last active August 29, 2015 14:11
keybase.md

Keybase proof

I hereby claim:

  • I am lmarkus on github.
  • I am lennymarkus (https://keybase.io/lennymarkus) on keybase.
  • I have a public key whose fingerprint is 477C 85AB 4D65 FAC9 4845 DEAC 7D52 B2D5 A39B 3394

To claim this, I am signing this object:

@lmarkus
lmarkus / squirt
Last active March 4, 2021 23:11
SquirtJS: Upload a file to Slack from the CLI using NodeJS.
#!/usr/bin/env node
/**
* Created by lmarkus on 5/23/15.
* Adapted from https://gist.github.com/foozmeat/82f177d60d5dfc7fc518
*/
'use strict';
var assert = require('assert'),
exec = require('child_process').execFileSync,
util = require('util'),
curl_json = function(command) {return JSON.parse(exec(command.shift(), command).toString());},
@lmarkus
lmarkus / todoBlame.sh
Created June 11, 2015 03:26
TODO Blame tool
#! /bin/bash
# Greps the codebase looking for TODO entries, and prints out who's the lazy dev that left it there...
git grep -n "TODO" |
while read -d $'\n' task
do
split=(${task//:/ })
file=${split[0]}
line=${split[1]}
@lmarkus
lmarkus / README.MD
Last active October 3, 2024 18:13
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@lmarkus
lmarkus / import_hack.js
Created January 7, 2016 20:48
How to import a subset of a large number of users into slack
var emailMatcher = /^.*\((.*)\)/; // name followed by enclosed email: akjshdkajshd ([email protected])
var SKIP='0', UNSELECTED='-', INVITE='invite';
//Pick all unmapped user entries
var unmapped = $('#target_2 select')
.filter(function () {
return $(this).find('option:selected[value="'+UNSELECTED+'"]').length > 0;
});
//Set the default to "Skip"
@lmarkus
lmarkus / SlackPGP.js
Created May 27, 2016 08:30
PGP over Slack using Greasemonkey
// ==UserScript==
// @name SlackPGP
// @namespace slack
// @description slackPGP
// @include https://*.slack.com/messages/*
// @version 1
// @grant none
// ==/UserScript==