Skip to content

Instantly share code, notes, and snippets.

@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active April 24, 2024 09:14
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.

@eromatiya
eromatiya / miui12-blur-go-brrr.md
Last active March 5, 2023 17:05
A guide to enable blur effects on MIUI 12 low-end devices

How to bring back the blur effects of MIUI 12 on low-end devices

If you have a low-end device, you probably noticed the gray background color on your control center and notification shade. Let's bring back the glorious blur effect by patching MiuiSystemUI.apk.

Prerequisites:

  • adb
  • apktool < v2.6.0
  • smali/baksmali
  • Code/Text Editor
@jeb5
jeb5 / Youtube Subs to OPML.js
Last active April 16, 2024 18:30
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));
@ilyaigpetrov
ilyaigpetrov / Evaluate the Risk of Browser Extension Before Installing It by Reading the Source Code.md
Last active March 29, 2024 19:30
Evaluate the Risk of Browser Extension Before Installing It by Reading the Source Code | by https://git.io/ilyaigpetrov

Evaluate the Risk of Browser Extension Before Installing It by Reading the Source Code

This post is written for Manifest v2, Manifest v3 is not yet released at the moment.

Ok, kids, today we are going to scrutinize a source code of a browser extension to speculate about its risks.
First, you will need to know how to download or view browser extension source codes:

  1. Extension for Chromium/Chrome: https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
  2. Right Click for FireFox: https://superuser.com/questions/771825/how-to-examine-source-code-of-firefox-extension-before-installing-it
@riverar
riverar / features.json
Last active November 8, 2023 20:46
Quick n' dirty hack to enable Your Phone remoting, notification and other experiments
{
"AATes123": true,
"AcrylicAndBackground": true,
"AudioInfoSync": true,
"BatteryIndicator": true,
"CallingDiscoveryTimeout": 30,
"CallingEnableOnARM": true,
"CallingFromMessages": true,
"CallingLabelInProd": true,
"CallingNode": true,
@AveYo
AveYo / .FreeStandbyMemory.bat
Last active November 23, 2023 21:16
FreeStandbyMemory.bat - ninja edits at https://pastebin.com/Kj36ug5h
/* 2>nul || title FreeStandbyMemory.bat by AveYo v2019.06.01
@echo off|| csc compiling snippet, advanced schedule, builtin add_remove - UPDATE: reliable free memory detection
set/a CLEAR_EVERY_MINUTES=1
set/a CLEAR_WHEN_UNDER_MB=512
set/a CLEAR_SYSTEMCACHEWS=0
:: check_admin_rights
reg query "HKEY_USERS\S-1-5-20\Environment" /v TEMP >nul 2>nul || (
color 0e & echo. & echo PERMISSION DENIED! Right-click %~nx0 ^& Run as administrator
@matthewzring
matthewzring / markdown-text-101.md
Last active April 27, 2024 17:56
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@spences10
spences10 / github-cheat-sheet.md
Last active March 22, 2022 17:59
GitHub Cheat Sheet

Useful Git commands

This is just stuff that I have put down that I find I use a lot of the time for my own reference.

Latest changes from repo to your machine

$ git pull
@jagrosh
jagrosh / WebhookTutorial.md
Last active December 4, 2023 20:28
Simple Webhook Tutorial (Twitter -> Discord)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel

Step 1 - Register on Zapier

  1. Go to https://zapier.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets
@andersevenrud
andersevenrud / bl-fullscreen-server-browser.user.js
Last active November 30, 2020 01:44
Fullscreen Battlelog Server Browser (BF4)
// ==UserScript==
// @name Fullscreen Battlelog Server Browser (BF4)
// @namespace http://andersevenrud.github.io/
// @version 0.5.0
// @description Fullscreen Battlelog Server Browser (BF4)
// @match http://battlelog.battlefield.com/bf4
// @match http://battlelog.battlefield.com/bf4/*
// @match http://cte.battlelog.battlefield.com/bf4
// @match http://cte.battlelog.battlefield.com/bf4/*
// @match http://cte.battlelog.com/bf4