Skip to content

Instantly share code, notes, and snippets.

View aziis98's full-sized avatar

Antonio De Lucreziis aziis98

View GitHub Profile
@aziis98
aziis98 / embed-eval-component.js
Created April 20, 2021 14:15
A Javascript function to embed an HTML component inside a scirpt tag that also loads all necessary JS in the right order
const TICK = '`';
const componentEmbedTemplate = ({ uid, code }) => `
<div class="embed">
<script id="embed-${uid}">
(async function() {
const $self = document.getElementById('embed-${uid}');
const $embedContainer = document.createElement('div');
$embedContainer.classList.add('container');
const $shadow = $embedContainer.attachShadow({ mode: 'open' });
@aziis98
aziis98 / !notifica-esami.md
Last active September 18, 2020 14:36
Controlla un sito per degli aggiornamenti

notifica-esami

Telgram

  • Crea un bot
  • Invia un messaggio al nuovo bot
  • Questo comando richiede gli ultimi messaggi da processare del Bot e permette di estrarre l'ID dell'utente.
    curl -s https://api.telegram.org/bot$BOT_TOKEN/getUpdates | jq .result[].message.chat.id
    
@aziis98
aziis98 / !README.md
Last active November 20, 2021 13:42
Stylus Theme - If Donald Knuth had designed Wikipedia
#!/bin/bash
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
@aziis98
aziis98 / colors.sh
Created September 14, 2020 14:53
Basic coloring for bash
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
@aziis98
aziis98 / jstp.md
Last active July 23, 2020 15:25
BTL - A backtick extensible templating language (prototype specification)

BTL - Backtick Templating Language

A backtick centered extensible templating language inspired by Javascript template litterals.

Examples

h1`A title`

This is a paragraph.
@aziis98
aziis98 / extract-lesson.sh
Created November 30, 2019 01:52
Script per estrarre l'ultima lezione attraverso git diff
#!/bin/bash
if [ "$#" -eq "0" ] ; then
echo "Passa come primo parametro il nome del file in cui mettere la lezione!"
exit 1
fi
FILE_NAME=$1
cat "./lezioni/template.tex" > "./lezioni/$FILE_NAME.tex"
@aziis98
aziis98 / main.py
Created July 10, 2019 15:17
A boilerplate script for the pygame library
import pygame
import random
WIDTH = 720
HEIGHT = 480
FPS = 30
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
@aziis98
aziis98 / Unicode Markdown.md
Last active June 23, 2019 23:52
Unicode Markdown

Unicode Markdown

All text is processed in blocks, there is a top
block and then more can be nested by using 「those
brackets」.They count as a single character so
tokenizing is easier and they are also less intrusive
in the text. 
@aziis98
aziis98 / !README.md
Last active May 25, 2020 23:55
Mio template per le cose in LaTeX.

LaTeX Template

Perché è sempre cosa buona e giusta mettere i README:

  • Font: Linux Libertine
  • Geometry: Margine di soli 30mm
  • Section: Linee sotto le section
  • Babel: Supporto per l'italiano