Skip to content

Instantly share code, notes, and snippets.

View krishnans2006's full-sized avatar
🔬
36 53 16 1 11 7

Krishnan Shankar krishnans2006

🔬
36 53 16 1 11 7
View GitHub Profile
@RobertKrajewski
RobertKrajewski / mattermost-dl.py
Last active April 13, 2024 10:46
This script allows to export the content (text+files) of an interactively selected Mattermost channel (public, private, group, direct message) to files. Tested on Mattermost 5.27 using Python 3.7
import os
import sqlite3
from datetime import datetime, date
from typing import Tuple, Dict, List
import getpass
from mattermostdriver import Driver
import pathlib
import json
@Birdie0
Birdie0 / ifttt-webhooks-extended-guide.md
Last active March 6, 2024 13:38
How to use Discord Webhooks

⚠️ This gist is no longer updated! For maintained, improved and even more extended guide click here.


How to use Discord Webhook

It's a JSON

First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.

@eszterkv
eszterkv / randomchoice.js
Created July 14, 2016 12:16
A JavaScript solution for random choice from an array.
function randomChoice(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}
@njvack
njvack / expressify.py
Created September 21, 2012 02:30
My stab at safe python evaluation
import ast
import math
SAFE_FX = {
'exp': math.exp,
}
SAFE_NODES = set(
(ast.Expression,
ast.Num,