In the middle of the desert you can say anything you want
I want to automatically get the PDF version of quarto/reveal presentations.
The usual way would be to open the presentation in export mode e
, then print with no margins through the usual print window.
I want to do this automatically as part of a CI/CD pipeliene.
selenium-print · PyPI / bubblegumsoldier/selenium-print uses selenium+chromium to do this.
As for the printing options available in Chrome, this looks relevant:
selenium-print/seleniumprint/drivers/chrome_pdf_driver.py at main · bubblegumsoldier/selenium-print
pdf = self.driver.execute_cdp_cmd("Page.printToPDF", {"printBackground": True})
OK, so it’s all a static option.
Chrome DevTools Protocol - Page domain has the other available options — which is what I need.
The rest of the code feels like a wrapper to this — maybe I can drop the entire library and just use these single bits?
TL;DR use your own personal settings, then “dev settings” (!), then create one but set the resource owner to the organization.
(As of 2024-10-14. Hard to find clear AND CORRECT documentation on this.)
Create access token for organization · community · Discussion #74701.
string collect
: string-collect - join strings into one — fish-shell 3.7.1 documentationset VARNAME (cat ~/myfile | string collect)
Here string collect
makes sure it’s a multiline variable instead of an array composed of one element per line.
Gitlab mirroring didn’t work for me after trying for hours, I give up. CI/CD it is.
On a slow connection or other constraints, you can check out only the last N commits or only a specific branch:
git clone --depth 3 --branch some-branch https://some-repo.org
TIL1:
./git/info/exclude
is your local .gitignore
outside the repository tree!git update-index --assume-unchanged .gitignore
makes git stop checking the changes for that file in the working tree. --no-assume-unchanged
to take it back.23Finally a place for my local ignores that won’t appear in autocomplete suggestions for git add
and friends. In Pycharm I have changelists, and now I finally have a solution for my just-as-usual vim/git/CLI workflow as well.
BUT:
exclude
won’t work if the file is already tracked (says SO but for me it works?..)As of 2024-10-02 20:16 at least.
give me the ag command to look inside markdown and yaml files only
GPT4o1:
`ag --include='*.md' --include='*.yaml' --include='*.yml' 'search_pattern'`
GPT42:
`ag "search_pattern" --markdown --yaml`
yay
took forever to compress pycharm. Like, 5-10 mins at least.
TODO documentation, but if you don’t care about package size but care about speed, this will speed up everything considerably:
PKGEXT='.pkg.tar' yay -S pycharm-professional
Wanted to do sth like this all the time, but the help basically told me to copypaste multiple arguments etc.
Will come back to bite me but nice to have the option I guess
Question: How can I install packages without having to confirm? · Issue #1033 · Jguer/yay:
echo y | LANG=C yay --noprovides --answerdiff None --answerclean None --mflags "--noconfirm" $PKGNAME
(--noconfirm
is not documented in help and man, and of course can create problems1)
BUT ALSO
yes
is a command that exists.
Then:
yes | yay ...
or yes | LANG=C yay
And generally really neat to have a command for answering “yes” to prompts.
And then quick unsafe bad dangerous command to update everything that includes 241001-1512 Yay better compression algos:
echo y | LANG=C PKGEXT='.pkg.tar' yay --answerdiff None --answerclean None --mflags "--noconfirm"