Skip to content

Instantly share code, notes, and snippets.

View ssebastianoo's full-sized avatar
:octocat:
o_O

seb ssebastianoo

:octocat:
o_O
View GitHub Profile
@ssebastianoo
ssebastianoo / fixed-calendar.js
Last active November 14, 2025 10:01
Remove duplicate entries from my University calendar and serve the fixed file over http. https://fixcalendar.gir8.it/
const fileUrl = "https://www.unive.it/data/ajax/Didattica/generaics?cache=-1&cds=CT3&anno=2&curriculum=TSI";
async function getCalendar() {
const res = await fetch(fileUrl);
const data = await res.text();
let new_events = ""
let events = []
let current_event = ""
@ssebastianoo
ssebastianoo / fixcalendar.py
Created September 30, 2024 08:30
Remove duplicates from Ca'Foscari's calendar
with open('CT3_1anno.ics', 'r') as f:
data = f.read()
new_events = ""
events = []
current_event = ""
for line in data.splitlines():
if line.startswith("BEGIN:VEVENT"):
if current_event.startswith("BEGIN:VEVENT"):
@ssebastianoo
ssebastianoo / notion_topbar_filter_ublock_origin
Last active December 21, 2023 11:31
uBlock Origin filter to hide the annoying Notion top bar saying "This page is live on.."
notion.so##div[style="display: flex; align-items: center; justify-content: center; white-space: nowrap; padding: 0px 12px; font-size: 14px; line-height: 1.2; cursor: default; min-height: 44px; color: rgb(35, 131, 226); fill: rgb(35, 131, 226); background: rgba(35, 131, 226, 0.07);"]
@ssebastianoo
ssebastianoo / ciao.go
Created January 13, 2023 19:08
the no hello simulator
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"strconv"
"time"
)
@ssebastianoo
ssebastianoo / volume.py
Last active November 6, 2021 10:08
raspberry volume controller
# make sure amixer is installed (sudo apt install alsa-utils)
import os
while True:
value = input("set volume to? ")
if not value.isdigit():
print("invalid volume")
else:
os.system(f"sudo amixer cset numid=1 {value}%")
os.system("clear")
@ssebastianoo
ssebastianoo / slashcommand.py
Created August 12, 2021 18:14
basic Slash Command class
from discord.ext import commands
class InvalidOptionType(Exception):
pass
class Command:
def __init__(self, bot: commands.Bot, name: str, description: str, guild_id: int=None):
self.bot = bot
self.name = name
self.description = description
@ssebastianoo
ssebastianoo / emojis.py
Created August 8, 2021 18:18
List of default emojis
emojis = ['๐Ÿ˜Š', '๐Ÿ˜ƒ', 'โ˜บ', '๐Ÿ˜', '๐Ÿ˜', '๐Ÿ˜˜', '๐Ÿ˜š', '๐Ÿ˜ณ', '๐Ÿ˜Œ', '๐Ÿ˜†', '๐Ÿ˜', '๐Ÿ˜‰', '๐Ÿ˜œ', '๐Ÿ˜', '๐Ÿ˜€', '๐Ÿ˜—', '๐Ÿ˜™', '๐Ÿ˜›', '๐Ÿ˜ด', '๐Ÿ˜Ÿ', '๐Ÿ˜ฆ', '๐Ÿ˜ง', '๐Ÿ˜ฎ', '๐Ÿ˜ฌ', '๐Ÿ˜•', '๐Ÿ˜ฏ', '๐Ÿ˜‘', '๐Ÿ˜’', '๐Ÿ˜…', '๐Ÿ˜“', '๐Ÿ˜ฅ', '๐Ÿ˜ฉ', '๐Ÿ˜”', '๐Ÿ˜ž', '๐Ÿ˜–', '๐Ÿ˜จ', '๐Ÿ˜ฐ', '๐Ÿ˜ฃ', '๐Ÿ˜ข', '๐Ÿ˜ญ', '๐Ÿ˜‚', '๐Ÿ˜ฒ', '๐Ÿ˜ฑ', '๐Ÿ˜ซ', '๐Ÿ˜ ', '๐Ÿ˜ก', '๐Ÿ˜ค', '๐Ÿ˜ช', '๐Ÿ˜‹', '๐Ÿ˜ท', '๐Ÿ˜Ž', '๐Ÿ˜ต', '๐Ÿ‘ฟ', '๐Ÿ˜ˆ', '๐Ÿ˜', '๐Ÿ˜ถ', '๐Ÿ˜‡', '๐Ÿ‘ฝ', '๐Ÿ’›', '๐Ÿ’™', '๐Ÿ’œ', 'โค', '๐Ÿ’š', '๐Ÿ’”', '๐Ÿ’“', '๐Ÿ’—', '๐Ÿ’•', '๐Ÿ’ž', '๐Ÿ’˜', '๐Ÿ’–', 'โœจ', 'โญ', '๐ŸŒŸ', '๐Ÿ’ซ', '๐Ÿ’ฅ', '๐Ÿ’ฅ', '๐Ÿ’ข', 'โ—', 'โ“', 'โ•', 'โ”', '๐Ÿ’ค', '๐Ÿ’จ', '๐Ÿ’ฆ', '๐ŸŽถ', '๐ŸŽต', '๐Ÿ”ฅ', '๐Ÿ’ฉ', '๐Ÿ’ฉ', '๐Ÿ’ฉ', '๐Ÿ‘', '+', '๐Ÿ‘', '๐Ÿ‘Ž', '-', '๐Ÿ‘Ž', '๐Ÿ‘Œ', '๐Ÿ‘Š', '๐Ÿ‘Š', 'โœŠ', 'โœŒ', '๐Ÿ‘‹', 'โœ‹', 'โœ‹', '๐Ÿ‘', 'โ˜', '๐Ÿ‘‡', '๐Ÿ‘ˆ', '๐Ÿ‘‰', '๐Ÿ™Œ', '๐Ÿ™', '๐Ÿ‘†', '๐Ÿ‘', '๐Ÿ’ช', '๐Ÿค˜', '๐Ÿ–•', '๐Ÿšถ', '๐Ÿƒ', '๐Ÿƒ', '๐Ÿ‘ซ', '๐Ÿ‘ช', '๐Ÿ‘ฌ', '๐Ÿ‘ญ', '๐Ÿ’ƒ', '๐Ÿ‘ฏ', '๐Ÿ™†', 'โ™€', '๐Ÿ™…', '๐Ÿ’', '๐Ÿ™‹', '๐Ÿ‘ฐ', '๐Ÿ™‡', '๐Ÿ’', '๐Ÿ’‘', '๐Ÿ’†', '๐Ÿ’‡', '๐Ÿ’…', '๐Ÿ‘ฆ', '๐Ÿ‘ง', '๐Ÿ‘ฉ', '๐Ÿ‘จ', '๐Ÿ‘ถ', '๐Ÿ‘ต', '๐Ÿ‘ด', '๐Ÿ‘ฒ', '๐Ÿ‘ณ', 'โ™‚', '๐Ÿ‘ท', '๐Ÿ‘ฎ', '๐Ÿ‘ผ', '๐Ÿ‘ธ', '๐Ÿ˜บ', '๐Ÿ˜ธ', '๐Ÿ˜ป', '๐Ÿ˜ฝ', '๐Ÿ˜ผ', '๐Ÿ™€', '๐Ÿ˜ฟ', '๐Ÿ˜น', '๐Ÿ˜พ', '๐Ÿ‘น', '๐Ÿ‘บ', '๐Ÿ™ˆ', '๐Ÿ™‰', '๐Ÿ™Š', '๐Ÿ’‚', 'โ™‚', '๐Ÿ’€', '๐Ÿพ', '๐Ÿ‘„', '๐Ÿ’‹', '๐Ÿ’ง', '๐Ÿ‘‚', '๐Ÿ‘€', '๐Ÿ‘ƒ', '๐Ÿ‘…', '๐Ÿ’Œ', '๐Ÿ‘ค', '๐Ÿ‘ฅ', '๐Ÿ’ฌ', '๐Ÿ’ญ', 'โ˜€', 'โ˜”', 'โ˜', 'โ„', 'โ›„', 'โšก', '๐ŸŒ€', '๐ŸŒ', '๐ŸŒŠ', '๐Ÿฑ', '๐Ÿถ', '๐Ÿญ', '๐Ÿน', '๐Ÿฐ', '๐Ÿบ', '๐Ÿธ', '๐Ÿฏ', '๐Ÿจ', '๐Ÿป', '๐Ÿท', '๐Ÿฝ', '๐Ÿฎ',
@ssebastianoo
ssebastianoo / guessgame.py
Created September 3, 2020 19:38
a guess game using the binary search method
import time, os
if os.name == "nt":
clear = "cls"
else:
clear = "clear"
def write(text):
result = ""
@ssebastianoo
ssebastianoo / emojilocker-faq.md
Last active October 6, 2020 19:06
some faq about emoji locker

Emoji Locker Faq

I locked an emoji for the role I have and now I can't unlock it because it's hidden!

No problem, you can pass the emoji name to unlock it, e!unlock emoji_name

I can't lock an emoji!

The bot can't lock

โ€ข Default Emojis

@ssebastianoo
ssebastianoo / help.py
Last active August 24, 2020 21:17
a really basic help command for discord.py
@bot.command()
async def help(ctx, command = None):
"Get a list of commands"
emb = discord.Embed(colour = discord.Colour.blurple(), timestamp = ctx.message.created_at)
emb.set_author(name = ctx.author, icon_url = str(ctx.author.avatar_url_as(static_format = "png")))
if command:
command = bot.get_command(command)