Skip to content

Instantly share code, notes, and snippets.

View kzndotsh's full-sized avatar

kzndotsh kzndotsh

View GitHub Profile
@AmazingAkai
AmazingAkai / bot.py
Created March 24, 2024 09:05
Discord.py button roles example.
from __future__ import annotations
import re
from typing import Optional
import discord
from discord.ext import commands
# Role IDs to labels mapping.
# role_id: label
@eylenburg
eylenburg / msoffice_in_linux.md
Last active June 21, 2024 17:59
Installing Microsoft Office 2016 (Excel, Powerpoint, Word) in Linux

Step by step guide: How to install Microsoft Office 2016 in any Linux distribution

There are multiple options how to install MS Office on Linux.

VM-based - Integrate Windows apps running in a Windows VM as native-looking in Linux

  1. Winapps, based on KVM, QEMU, Virt-Manager, and FreeRDP. Still actively maintained (getting Github commits).
  2. Cassowary, based on KVM, QEMU, Virt-Manager, and FreeRDP. Has a helpful GUI and apparently can auto-suspend the VM when no Windows app is in use. Last release in Feb 2022 and seems to be abandoned.

The VM-based options means can run Office 2021 or Office 365 including all apps, but for me it was quite buggy and when I encounterd some (FreeRDP-related?) bug in both Winapps and Cassowary that meant I could only start Excel with an external screen plugged in, I gave up. bug

@Jbziscool
Jbziscool / reportsystem.py
Created October 21, 2023 22:03
Report system using discord.py
from discord import ui # remember to import this
class banreason(ui.Modal, title='Punishment information'):
reason = ui.TextInput(label='Reason')
def __init__(self, member: discord.Member):
super().__init__()
self.member = member
@tboerger
tboerger / README.md
Created November 14, 2022 13:43
Hack The Box: Starting Point Tier 0

Meow

Questionnaire

What does the acronym VM stand for?
Virtual Machine
@imptype
imptype / messagemaker.py
Last active May 25, 2024 19:02
A better embed maker/embed builder for discord.py
"""
The messagemaker command!
Supports:
- Editing message content
- Add, edit, remove, clear embeds: title, desc, timestamp, fields etc. - everything to customize an embed.
-- Exporting and Importing exclusively for the embed
- Importing JSON: from modal text input, from mystbin link, from existing message
- Exporting to JSON, as a message or uploaded as file and mystbin link if < 2000 chars
- Sending to: a channel, a webhook, edit existing message
# Copyright 2020-present Michael Hall
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@imptype
imptype / embedmaker.py
Last active May 2, 2024 19:25
embed maker command
"""
A quick embed maker command.
Supports Title, URL, Description, Color, Timestamp,
Author (name, icon, url), Footer (icon, name), Image (url), Thumbnail (url)
adding and inserting fields (name, value, inline, index),
removing fields (index),
clearing fields,
editing fields (select -> name, value, inline)
@trevorflahardy
trevorflahardy / slash_utils_cooldowns.py
Created November 28, 2021 06:30
A simple addon to slash utils that allows for max_concurrency and cooldowns
from __future__ import annotations
from enum import Enum
import datetime
import inspect
from collections import defaultdict
import discord
import discord, discord.channel, discord.http, discord.state
from discord.ext import commands
@ghostrider-05
ghostrider-05 / discord_app_protocols.md
Last active June 29, 2024 17:47
An unofficial list of discord app protocol routes

Discord app protocol routes

Home:

  • /: discord://-/
  • friends: discord://-/channels/@me/
  • nitro: discord://-/store
  • shop: discord://-/shop
  • message requests: discord://-/message-requests
  • family centre: discord://-/family-center
@the0neWhoKnocks
the0neWhoKnocks / Arch Linux.md
Last active May 7, 2023 13:20
Arch Linux Install and Customization

Arch Linux Install and Customization


Live env. (booting Linux from a separate drive)

I use Ventoy to store multiple Linux imgs on one drive, with the ability to choose from a menu any distro I want.

At the time of writing, I used ventoy v1.0.52, and Arch Linux v2021.09.01.