Skip to content

Instantly share code, notes, and snippets.

import asyncio
from typing import Any, Dict
from slack_bolt.adapter.socket_mode.async_handler import AsyncSocketModeHandler
from slack_bolt.app.async_app import AsyncApp
from slack_bolt.context.ack.async_ack import AsyncAck
from slack_bolt.context.say.async_say import AsyncSay
app = AsyncApp()
@stupoid
stupoid / lambda_canary.py
Last active June 19, 2021 05:12
Modified version of lambda-canary blueprint to monitor multiple sites and log via telegram_bot
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen
def getenvbool(key: str, default: bool) -> bool:
envvar = os.getenv(key, "").lower()
if envvar in {"true", "1"}:
return True
elif envvar in {"false", "0"}:
@stupoid
stupoid / scripts.sh
Created December 23, 2020 02:18
General shell scripts for python dev
#!/bin/sh
lint() {
TARGET_FOLDERS=$@
if [ -z "$TARGET_FOLDERS" ]; then
TARGET_FOLDERS="app tests"
fi
echo "linting folders $TARGET_FOLDERS..."
echo "running autoflake"
@stupoid
stupoid / .eslintrc.json
Created June 1, 2017 08:35
react eslint config
{
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"env": {
"browser": true,
"node": true
@stupoid
stupoid / profile_examples.json
Created October 2, 2015 08:30
Example profile questions
{
"title": "name",
"type": "text"
}
{
"title": "How do you feel about tbe current state of politics",
"type": "textarea"
}