Skip to content

Instantly share code, notes, and snippets.

View giorgiovilardo's full-sized avatar

Giorgio Vilardo giorgiovilardo

View GitHub Profile
@giorgiovilardo
giorgiovilardo / settings.json
Created January 19, 2020 21:04
basic vscode settings json for python with black and flake8
{
"python.pythonPath": "env/bin/python",
"python.formatting.provider": "black",
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"files.trimFinalNewlines": true
}
@giorgiovilardo
giorgiovilardo / tox.ini
Created January 19, 2020 21:05
basic flake8 conf for basic py projects
[flake8]
exclude=.git,__pycache__,env
ignore=E231,E501
@giorgiovilardo
giorgiovilardo / alphabetvalues.js
Last active February 6, 2020 17:50
alphabet values boring boring
alphabetObj = {
a: 0,
b: 1,
c: 2,
d: 3,
e: 4,
f: 5,
g: 6,
h: 7,
i: 8,
@giorgiovilardo
giorgiovilardo / a4-in-css.css
Last active June 22, 2020 12:26
A4 sheet for CSS - media query
@media print {
body {
width: 21cm;
height: 29.7cm;
margin: 30mm 45mm 30mm 45mm;
/* change the margins as you want them to be. */
}
}
@giorgiovilardo
giorgiovilardo / createpyproj.sh
Last active September 7, 2020 11:17
quick shell script to create a python+pytest project for my environment
if [ -z "$1" ]
then
echo "no argument given. pass a project name"
exit 1
fi
mkdir -p $1
cd $1
mkdir -p ".vscode"
mkdir -p "src/$1"
touch "src/$1/__init__.py"
@giorgiovilardo
giorgiovilardo / all_html_tags.py
Created April 8, 2022 11:41
A python list containing all html tags without the lt-gt symbols. Useful for things like tag disallow-lists etc.
ALL_HTML_TAGS = [
"a",
"abbr",
"acronym",
"address",
"applet",
"area",
"article",
"aside",
"audio",