Skip to content

Instantly share code, notes, and snippets.

@Rapptz
Rapptz / keepass.md
Last active September 26, 2024 04:56
Setting up KeePass

Setting Up KeePass

I frequently see discussions around which password manager to use. I personally use [KeePass][main]. This is an open source program that allows you to have control in your data. The database format is encrypted so as long as you keep your master password secure, the chance of someone getting access to your passwords is practically zero.

This document is just meant as a signpost to steer you in the right direction of how to set up KeePass across multiple operating systems and have your file synced in the cloud all while paying $0 and not having to set up a single server to do so.

Why KeePass?

You can skip this if you don't care

@Rapptz
Rapptz / docs.md
Last active October 28, 2022 14:40 — forked from Zomatree/docs.md

Overview

messages can be sent with the components key to add buttons and other components (when discord brings them out), you can edit and add new buttons via editing the message, this is useful for the disabled key to stop people from clicking it.

Example Payload

{
    "content": "this is an example message for components",
    "components": [
        {"type": 1, "components": [
 {"type": 2, "style": 2, "label": "Button 1", "custom_id": "1"},
@Rapptz
Rapptz / discord_qol.md
Last active October 28, 2022 14:40
For Jake

I restricted these to client-only QoL features that I thought were small.

  • Reverse sorting search
  • Group by Guild in Emoji panel so you can see what guild an emoji is in
  • Disabling "GIF" or "Gift" buttons in the message box
  • Hover over for complete timestamp on messages
    • Maybe the same for embed timestamps?
  • More time information in call messages (e.g. how long it lasted for) (I know it's provided in the message since I have it in d.py)
  • Lock channels so you don't accidentally move them by dragging (this one might be less trivial iunno)
  • Character count indicator for knowing if you're reaching 2000 characters. too hard apparently
using Discord;
namespace Yonom.DiscordTools
{
static class DiscordAvatar
{
// for documentation purposes only
private static enum DefaultAvatars
{
blurple = 0,
2016-11-02 17:31:20 #python_discord-py @luke#7172: uhhh
2016-11-02 17:31:36 #python_discord-py @Fuyukai desu#0588: what
2016-11-02 17:31:46 #python_discord-py @luke#7172: :/
2016-11-02 17:31:50 #python_discord-py @luke#7172: I don't know how to do this
2016-11-02 17:32:27 #python_discord-py @luke#7172: I need to get info of another shard
2016-11-02 17:33:03 #python_discord-py @luke#7172: like server amount, etc
2016-11-02 17:33:07 #python_discord-py @luke#7172: whats the best method to do this
2016-11-02 17:34:07 #python_discord-py @Fuyukai desu#0588: ipc
2016-11-02 17:34:37 #python_discord-py @luke#7172: Indian Penal Code?
2016-11-02 17:34:41 #python_discord-py @Recchan#4305: who shards
import requests
import json
USER_TOKEN = 'token'
API_BASE = 'https://discordapp.com/api'
class Embeds:
def __init__(self, data):
basic_keys = ('title', 'type', 'description', 'url', 'timestamp', 'color',
'footer', 'image', 'thumbnail', 'provider', 'author')
@Rapptz
Rapptz / custom_commands.py
Last active October 28, 2022 14:42
Showing off custom commands using discord.ext
import discord
from discord.ext import commands
import json, inspect
import functools
import re
# some JSON set up for our storage because >lazy<
class CustomCommandEntry:
__slots__ = ['name', 'content', 'guild_id']
@Rapptz
Rapptz / changelog.md
Last active October 28, 2022 14:42
Changelog for R. Danny

Changelog (Updated Jan. 29th 2016)

The bot has been completely rewritten.

For feature requests or questions feel free to ping/private message @Danny.

Big changes

  • Most things don't require quotes anymore. A lot of people had a hard time with the concept of adding quotes to things so if it's the last argument of a command
@Rapptz
Rapptz / map_generator.py
Created January 26, 2016 08:42
The random map generator for Splatoon tournaments.
from __future__ import division
import random
from collections import Counter, namedtuple
import bisect
import math
# for my own purposes.
debug = False
def weighted_choice(choices):
@Rapptz
Rapptz / rdanny.md
Created December 20, 2015 00:29
R. Danny v3.0.0

R. Danny v3.0.0 ideas:

  • Fully asyncio rewrite.
    • Will use the async branch (or v0.10.0) when it becomes available.
  • Authority system based on permissions/roles.
    • e.g. Manage Messages -> !cleanup is valid
    • e.g. Bot Mod -> can call bot commands without having the permissions themselves
    • This will make it easier for people to administrate on servers I'm not on.
  • Remove cronjob and pass it in as a background task to the event loop
  • Lowers the need of dependencies by quite a bit.