Skip to content

Instantly share code, notes, and snippets.

View AFCMS's full-sized avatar
🎯
Focusing

AFCMS

🎯
Focusing
View GitHub Profile
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active July 29, 2024 15:09
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

This no longer works if you're alone in vc! Somebody else has to join you!

Warning

There are now two quest types ("stream" and "play")! Pay attention to the instructions!

Video on a SSD1306 Oled display driven by the ESP32-WROOM-32

Getting the video

First, you need a video to display.

In my case, I wanted to display a video available on YouTube, so I used the Parabolic GUI for the yt-dlp project, which allows downloading videos from YouTube and other video streaming services.

Important

Please keep in mind you may not have the right to include a video in your project.

@Klhmt
Klhmt / autopaper.py
Last active September 11, 2022 18:18
Python Script To Change Randomly Gnome Wallpaper
from os import system, listdir
from random import randint
def changeWallpaper(wallpaper_path: str):
"""This function changes the wallpaper of your Gnome desktop
Arg:
wallpaper_path (str): path of the a folder that contains your wallpaper
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*

Primary work:

  • credits templates
  • thumbnails
  • final montage
  • music

Features:

  • Lanterns
  • Composters
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active July 21, 2024 12:46
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.

--Light Controller 2
--A product of Advanced Mesecons Devices, a Cheapie Systems company
--This is free and unencumbered software released into the public domain.
--See http://unlicense.org/ for more information
local MODE_OFF = 0
local MODE_ON = 1
local MODE_DUSKDAWN = 2
local MODE_DAWNDUSK = 3
local MODE_GAMETIME = 4
@AFCMS
AFCMS / qteps2.py
Last active May 19, 2022 15:12
QT-EPSILON
#####################################################
# QT_EPSILON #
# GUI Framework for the Numworks calculator #
# By AFCMS, under GPLv3 #
#####################################################
"""
This Framework is inspired by QT design and aims to simplificate the process of creation of basic GUIs
WARNING: This script is very big, so make sure to leave enough space for it
@AFCMS
AFCMS / zsh-minetest-completion
Last active April 21, 2022 15:03
Minetest ZSH Completion
#compdef minetest
local curcontext="$curcontext" state line
typeset -A opt_arg
_arguments -s -C \
'--address[Address to connect to]:url:_urls'\
'--color[Coloured logs]:type:(always never auto)'\
'--config[Load configuration from specified file.]:file:_files -g *.conf'\
'--gameid[Set gameid]'\
'--go[Disable main menu]'\
'--help[Show allowed options]'\
local imlib2 = require("imlib2")
local img = imlib2.image.load(arg[1])
local xsize = img:get_width()
local ysize = img:get_height()
local function explodebits(input,count)
local output = {}
if not count then count = 8 end
for i=0,count-1,1 do
output[i] = input%(2^(i+1)) >= 2^i