Skip to content

Instantly share code, notes, and snippets.

@ypchen
ypchen / slack_backup.py
Created July 22, 2022 01:34 — forked from benoit-cty/slack_backup.py
Script to archive Slack messages from a channel list.
'''
Script to archive Slack messages from a channel list.
You have to create a Slack Bot and invite him to private channels.
View https://github.com/docmarionum1/slack-archive-bot for how to configure your account.
Then provide the bot token to this script with the list of channels.
'''
TOKEN='xoxb-xxxxx-xxxxxx-xxxxxxxxxxx'
channels = {
@ypchen
ypchen / hdp_ims-1.18.4.py
Last active August 19, 2022 08:13
Auto-update for plugin.video.hdp_ims
def my_gist_hash ():
return 'cd452b0f316b16d5a9dab1983795a3cc'
def my_addon_version ():
return '1.18.4'
def my_version ():
return my_addon_version() + '-gist-r3'
# priv: revision 4
@ypchen
ypchen / hdp_ims-1.18.3.py
Last active November 13, 2021 13:48
Auto-update for plugin.video.hdp_ims
def my_gist_hash ():
return 'a056ebf6ae5c46b2989a549f62702e3c'
def my_addon_version ():
return '1.18.3'
def my_version ():
return my_addon_version() + '-gist-r8'
# priv: revision 45
@ypchen
ypchen / hdp_ims-1.18.2.py
Last active April 3, 2021 15:27
Auto-update for plugin.video.hdp_ims
def my_gist_hash ():
return 'ebb973eae84b4001ebe82229164610ea'
def my_addon_version ():
return '1.18.2'
def my_version ():
return my_addon_version() + '-gist-r9'
# priv: revision 24
@ypchen
ypchen / hdp_ims-1.18.1.py
Last active February 9, 2021 13:50
Auto-update for plugin.video.hdp_ims
def my_gist_hash ():
return '3312e9f0ee2e9268d849057364c7fa9f'
def my_addon_version ():
return '1.18.1'
def my_version ():
return my_addon_version() + '-gist-r11'
# priv: revision 70
@ypchen
ypchen / hdp_ims-1.18.0.py
Last active September 22, 2019 08:41
Auto-update for plugin.video.hdp_ims
def my_gist_hash ():
return '46c0cd04c2287f0ec449e883a72cef48'
def my_version ():
return '1.18.0-gist-r7'
# priv: revision 69
def inc(int_array, by = 1000):
int_array[0] += by
@ypchen
ypchen / message-to-Slack.bash
Last active February 17, 2019 11:40
Send a message to Slack
#!/bin/bash
# default
if [ -z ${CURL+x} ]; then
CURL="/usr/bin/curl"
fi
if [ -z ${ECHO+x} ]; then
ECHO="/usr/bin/echo"
fi
if [ -z ${CUT+x} ]; then
#!/bin/bash
# execute-gist.bash is at https://gist.github.com/ypchen/aceeaf43144844f1f4275202259b690c
if [ -z "${1}" ] || [ -z "${2}" ] || [ -z "${3}" ]; then
echo "${0}" "to_email" "subject" "body" "[optional]from_email"
exit 1
fi
execute-gist.bash 5b1b1af9750cb54b6e1e88fe9a91d2f7 "${1}" "${2}" "${3}" "${4}"
@ypchen
ypchen / message-to-Mailgun.bash
Last active February 15, 2018 10:20
send a message to Mailgun
#!/bin/bash
# default
if [ -z ${CURL+x} ]; then
CURL="/usr/bin/curl"
fi
# mg_domain, api_key, MSG_SUBJ_PREFIX, MSG_FROM_EMAIL, & CURL if necessary
CONF="${HOME}/.Mailgun.conf"
source ${CONF}
@ypchen
ypchen / hdp_ims-1.0.0.py
Last active April 7, 2019 07:35
Auto-update for plugin.video.hdp_ims
def my_gist_hash ():
return 'b31d56a0eefcefbd36fc4538c9b40289'
def my_version ():
return '1.0.0-gist-r93'
# priv: revision 93
sites = [
{