Skip to content

Instantly share code, notes, and snippets.

View brunohq's full-sized avatar

Bruno Costa brunohq

View GitHub Profile
@brunohq
brunohq / delete-channel-messages.js
Created August 28, 2017 11:05 — forked from firatkucuk/delete-slack-messages.js
Deletes slack public/private channel messages.
var https = require('https');
// CONFIGURATION #######################################################################################################
var token = 'SLACK TOKEN';
var channel = 'CHANNEL ID';
var privateChannel = false;
var delay = 300; // delay between delete operations in millisecond
// GLOBALS #############################################################################################################
@brunohq
brunohq / copy-to-clipboard-bookmarklet.md
Created August 24, 2017 15:44 — forked from stefanmaric/copy-to-clipboard-bookmarklet.md
Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard

Copy-to-clipboard Bookmarklet

Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.

This is the base javascript:

(function (text) {
  var node = document.createElement('textarea')
  var selection = document.getSelection()