Skip to content

Instantly share code, notes, and snippets.

View alissa-maria's full-sized avatar
🩵

alissa alissa-maria

🩵
View GitHub Profile
@alissa-maria
alissa-maria / daily-text.py
Created April 9, 2024 10:09
Prints daily text + explanation to stdout
import requests
from bs4 import BeautifulSoup
url = 'https://wol.jw.org/en/wol/h/r1/lp-e'
response = requests.get(url)
html_content = response.content
soup = BeautifulSoup(html_content, 'html.parser')
@alissa-maria
alissa-maria / typewriter.js
Last active December 5, 2023 13:41
Simplified version of typewriter effect from https://github.com/alissa-maria/ceramic
const textElement = document.getElementById('fetch');
const originalText = textElement.textContent.trim();
textElement.textContent = '';
let index = 0;
function typeNextCharacter() {
textElement.textContent += originalText[index];
index++;
@alissa-maria
alissa-maria / footnotes.js
Created December 5, 2023 13:28
Collects footnote data in article elements and generates appropriate HTML
document.addEventListener("DOMContentLoaded", function () {
const articles = document.querySelectorAll("article");
articles.forEach((article) => {
// Looks for (span) elements with footnote class
const footnotes = article.querySelectorAll(".footnote");
// Creates a separator if there are footnotes present
if (footnotes.length > 0) {
const hrElement = document.createElement("hr");
article.appendChild(hrElement);
}
@alissa-maria
alissa-maria / screen.sh
Last active May 8, 2023 14:24
Script to start/stop/restart known applications as daemons
#!/bin/bash
declare -a apps=(
"rain"
"quotes"
)
app="$2"
start_app() {