Skip to content

Instantly share code, notes, and snippets.

View appi147's full-sized avatar
💭
10% Luck 20% Skill

Arpit Choudhary appi147

💭
10% Luck 20% Skill
View GitHub Profile
@Soheab
Soheab / wait_for in command.md
Last active June 19, 2025 11:38
Examples for a wait_for in ext.commands.

This gist shows how to make the bot wait for a message or reaction after doing a command. This should not be copypasted.

Docs

Check the discord.py docs for a detailed explanation of how it all works internally and which kwargs it takes.

Commands

See here two commands, one waiting for any message in a channel and the other waiting for a reaction with a specific emoji.

Check

@EvieePy
EvieePy / error_handler.py
Last active July 7, 2025 05:48
Simple Error Handling for Prefix and App commands - discord.py
import logging
import discord
from discord import app_commands
from discord.ext import commands
LOGGER: logging.Logger = logging.getLogger(__name__)
@citrusui
citrusui / dropdown.md
Last active June 25, 2025 12:57
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@PlainSight
PlainSight / game.py
Last active December 16, 2023 13:40
Simple Multiplayer Python Game and Server
import pygame, sys
from pygame.locals import *
import pickle
import select
import socket
WIDTH = 400
HEIGHT = 400
BUFFERSIZE = 2048
@papaben
papaben / idid.sh
Last active February 18, 2021 11:31
Run the git command you intended, `idid !!`
##
# "I did [mean that]"
# Re-run the suggested git command
# Intended to be run as 'idid "!!"'
# Place this file in your $PATH
# TODO create this as a brew script
##
declare last=''
declare selection_ordinal='1'
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active July 4, 2025 07:01
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@jsok
jsok / phantom.py
Created March 12, 2014 06:42
Use PhantomJS and Python Selenium bindings to take screenshots of websites.
import StringIO
from selenium import webdriver
from PIL import Image
# Install instructions
#
# npm install phantomjs
# sudo apt-get install libjpeg-dev
# pip install selenium pillow
@rduplain
rduplain / README.md
Created October 17, 2011 20:04
Connect to MSSQL using FreeTDS / ODBC in Python.

Goal: Connect to MSSQL using FreeTDS / ODBC in Python.

Host: Ubuntu 11.10 x86_64

Install:

sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy

In /etc/odbcinst.ini: