Skip to content

Instantly share code, notes, and snippets.

View lelit's full-sized avatar
🇺🇦

Lele Gaifax lelit

🇺🇦
  • Rovereto (TN), Italy
View GitHub Profile
@lelit
lelit / Makefile
Created October 17, 2023 08:40
Sphinx test
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
@lelit
lelit / DINNextLTPro-Regular.ttf
Last active December 12, 2021 21:28
RL hyphenation glitch
@lelit
lelit / check-ds.sh
Created January 24, 2021 18:52
SQLAlchemy spell checks
pylint --disable all --enable spelling --spelling-dict en_US \
--spelling-private-dict-file doc/build/checked-words \
--spelling-ignore-words appendleft,asfrom,attr,attrs,attrname,bytea,collist,datastructure,dbtype,,deannotation,dedupe,elif,empno,eventname,firstcol,fks,fmt,fn,gc,generatively,geo,hacky,impl,ints,kwarg,maxvalue,myclass,MyClass,mycolumn,mytable,noqa,orderline,othertable,outerjoin,poolclass,pycon,pydoc,rowsets,selectables,selectbase,somecol,somecolumn,someint,somename,someothertable,somestr,sometable,sqltypes,starttime,stmt,subq,sys,tablea,tableb,tablename,tablesample,tbl,uid,unnest,wendy,whereclause,xmin,otherdb,dbo,mxodbc,freetds,myarray,pytest,dburi,argnames,opfunc,lt,mariadb,oursql,len,deduping,deduplication,deduplicating,deduplicate,reraising,SomeClass,RighEntity,LeftEntity,retval,lifecycle,subqueryload,lazyload,selectinload,raiseload,appender,parens,testlib,connectstring \
${*:-lib/sqlalchemy/sql}
@lelit
lelit / constraints.txt
Created December 3, 2020 22:19
Minimal recipe to reproduce pip issue #9215
celery==4.4.7
redis==3.5.3
pgcli==3.0.0
# NB: the following is an incompatible dependency, as pgcli wants sqlparse<0.4
# Commenting it out, everything works as expected
sqlparse==0.4.1
@lelit
lelit / test.py
Last active June 21, 2018 08:04
Injecting Pyphen into RL Paragraph
from reportlab.lib.pagesizes import A4
from reportlab.platypus import ImageAndFlowables, SimpleDocTemplate, Image
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.pdfbase.pdfmetrics import stringWidth, getFont, getAscentDescent
from reportlab.platypus.paragraph import (Paragraph, split, strip, _handleBulletWidth,
_processed_frags, _SplitText, _getFragWords,
_FK_BREAK, _FK_IMG, _FK_TEXT, _HSWord, sameFrag,
_SplitList, FragLine, ParaLines)
from pyphen import Pyphen
@lelit
lelit / spidermonkey.el
Created March 14, 2015 10:34
Elisp script to adapt SpiderMonkey msgs to js2-mode
;;; -*- coding: utf-8 -*-
;;; :Progetto: js2-mode -- Adapt spidermonkey msgs
;;; :Creato: sab 14 mar 2015 11:26:19 CET
;;; :Autore: Lele Gaifax <lele@metapensiero.it>
;;; :Licenza: GNU General Public License version 3 or later
;;;
(defun js2--morph-spidermonkey-msgs (status)
(require 'levenshtein)