Skip to content

Instantly share code, notes, and snippets.

@Connie-Wild
Connie-Wild / channels.yml
Last active July 21, 2024 07:15
mirakurun BSCSチャンネル設定(2024/06/01現在)
- name: NHK BS1
type: BS
channel: BS15_0
serviceId: 101
- name: NHK BSプレミアム
type: BS
channel: BS03_1
serviceId: 103
- name: BS日テレ
type: BS
@frankie567
frankie567 / interactive_google_oauth2.py
Last active July 29, 2023 22:07
Interactive Google OAuth2 flow with Streamlit
import asyncio
import streamlit as st
from httpx_oauth.clients.google import GoogleOAuth2
st.title("Google OAuth2 flow")
"## Configuration"
client_id = st.text_input("Client ID")
@airhorns
airhorns / gunicorn_structlog_setup.py
Created September 13, 2019 12:30
Gunicorn structlog integration
import os
import logging.config
import structlog
from .app import app
timestamper = structlog.processors.TimeStamper(fmt="iso")
pre_chain = [
# Add the log level and a timestamp to the event_dict if the log entry is not from structlog.
structlog.stdlib.add_log_level,

beebotteの使い方メモ.md

Beebotteとは?

(図は公式ドキュメントより)

BeebotteはMQTTブローカ+REST API+Web Socketを提供するサービス。 無料アカウントでは50000メッセージ/日まで使える。

@rhoboro
rhoboro / async_sample.py
Last active April 30, 2023 07:24
asyncio, aiohttpを利用した並列処理のサンプルコード
import asyncio
import aiohttp
import async_timeout
from aiohttp import ClientError
async def _fetch(session, url, coro):
"""HTTPリソースからデータを取得しコルーチンを呼び出す
@EvieePy
EvieePy / error_handler.py
Last active November 8, 2024 11:38
Simple Error Handling for ext.commands - discord.py
"""
If you are not using this inside a cog, add the event decorator e.g:
@bot.event
async def on_command_error(ctx, error)
For examples of cogs see:
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be
For a list of exceptions:
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions
@mpneuried
mpneuried / Makefile
Last active August 22, 2024 10:36
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@mono0926
mono0926 / commit_message_example.md
Last active November 12, 2024 05:33
[転載] gitにおけるコミットログ/メッセージ例文集100
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@xanathar
xanathar / iis7_command_line_tool.md
Last active May 22, 2023 12:01 — forked from jonlabelle/iis7_command_line_tool.md
IIS 7 Command Line Tool

IIS 7 Command Line Tool

AppCmd.exe IIS 7 command-line tool used to perform common IIS administrative tasks such as creating new sites, stopping/starting services, and viewing status of the site.

Usage

appcmd (command) (object-type) <identifier> </parameter1:value1 ...>