Skip to content

Instantly share code, notes, and snippets.

View LockBlock-dev's full-sized avatar
📌
I may be slow to respond.

LockBlock-dev

📌
I may be slow to respond.
  • France
  • 16:22 (UTC +02:00)
View GitHub Profile
@shawnli87
shawnli87 / workupload_download.sh
Created August 27, 2022 04:47 — forked from rexlManu/workupload_download.sh
Download workupload files via curl
#!/bin/bash
[ -z "$1" ] && echo "Usage: workupload_download.sh '<workupload link>'" && exit 1
id_string=$(sed 's|.*workupload.com/||g' <<< "$1")
type=$(cut -d'/' -f1 <<< "$id_string")
id=$(cut -d'/' -f2 <<< "$id_string")
[[ "$type" != "file" ]] && [[ "$type" != "archive" ]] && echo "Invalid link provided" && exit 1
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active July 5, 2024 15:33
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@TheSunCat
TheSunCat / DisblockOrigin.theme.css
Last active July 7, 2024 09:32
Hide all Nitro & Boost upsells in Discord!
/**
* @name Adblock for Discord
* @author TheSunCat and contributors
* @version 1.0.0
* @description Hide all Nitro & Boost upsells on Discord!
* @source https://gist.github.com/TheSunCat/58fedaa19d6154ef3e4b2b676c286906
*/
/* ------------------ */
/* Hide Nitro upsells */
@delimitry
delimitry / compiled_file_python_version.py
Last active May 20, 2024 04:22
Get the version of Python by which the file was compiled
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A script to get the version of Python by which the file was compiled
"""
from __future__ import print_function
import binascii
import os
@carlosmcevilly
carlosmcevilly / gist:2221249
Created March 27, 2012 22:55
fix git commit with wrong email address in git config, before pushing
If:
- you add and commit with the wrong email address in git, and
- your remote has a hook set up to prevent you from pushing with the bad address
Then you need to amend the author of your commit before push can succeed:
1. fix your email address in git config:
$ git config user.name "Your Name"