Skip to content

Instantly share code, notes, and snippets.

View paulofreitas's full-sized avatar

Paulo Freitas paulofreitas

View GitHub Profile
@ghostrider-05
ghostrider-05 / discord_app_protocols.md
Last active July 21, 2024 15:56
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
@Soheab
Soheab / 0-discord.Colour.md
Last active May 20, 2024 15:16
See everything related to discord.Colour in a clean way with their usages.

discord.Colour

See here every colour and method the discord.Colour class has.

Jump Links

Colours

@scragly
scragly / discord_emoji.md
Last active July 3, 2024 20:57
Emoji for Discord Bots

Discord Emoji

Note: This is written for those using Python 3 and discord.py, so if you're using something else please reference the relevant documentation for your language or library if you choose to use this as a general reference.

On Discord, there are two different emoji types:

Each needs to be handled differently, as while unicode emoji are just simple unicode characters, Discord custom emoji are special objects available only in Discord, belonging to a specific Discord guild and having their own snowflake ID.

@justinmeiners
justinmeiners / sqrt.py
Last active June 10, 2019 18:16
I explained to a friend how sqrt can be implemented.
import math
def sqrt(x_0, guess, tol):
x = guess
while math.fabs(x*x - x_0) > tol:
x = (x*x - x_0) / (2.0 * x)
return x
print(sqrt(2.0, 2.0, 0.0001))
@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active July 22, 2024 14:45
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@zabaala
zabaala / BindDatabaseServiceProvider.php
Last active March 2, 2021 07:50
php artisan db:log <start> <stop>
<?php
namespace App\Commands\Database;
use Illuminate\Support\ServiceProvider;
class BindDatabaseServiceProvider extends ServiceProvider
{
public function boot()
{
@zabaala
zabaala / DescTableCommand.php
Last active June 18, 2018 23:36
A desc table command for artisans
<?php
namespace App\Commands;
use Illuminate\Console\Command;
class DescTableCommand extends Command
{
/**
* The name and signature of the console command.