Skip to content

Instantly share code, notes, and snippets.

@pragmat1c
pragmat1c / fullstory.d.ts
Last active August 24, 2022 17:36 — forked from ofer-papaya/fullstory.d.ts
Fullstory API typescript definitions
interface Fullstory {
identify(uid: string, userVars?: object): void;
setUserVars(userVars: object): void;
getCurrentSessionURL(now?: boolean): string;
log(msg: string): void;
log(level: string, msg: string): void;
shutdown(): void;
restart(): void;
consent(consent: boolean): void;
event(eventName: string, eventProperties: object): void;
@pragmat1c
pragmat1c / gist:125cdb06e56a7e8d790f070121d775bf
Created April 4, 2019 18:31
Prune local git branches that don't have a remote branch. I use this to clean up the branches I've committed and merged every so often.
#In your .gitconfig
[alias]
prune-branches = !git remote prune origin && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -D
@pragmat1c
pragmat1c / delete-slack-messages.js
Created April 1, 2019 15:40
Bulk delete a bunch of slack messages. Funny story: Someone put something on my desk and somehow it landed just right and the + and enter key were held down and I created a bunch of messages in a slack channel. Rather than deleting one by one, I found this script. I forget where I got out, otherwise I'd give proper credit. However it works (it's…
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = ''; // You can learn it from: https://api.slack.com/custom-integrations/legacy-tokens
// GLOBALS #############################################################################################################