Coding tips
Customize Latex Workshop external viewer
In Vscode the following configuration works well with Latex workshop.
Sumatra
{
"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.external.viewer.command": "C:\\Program Files\\SumatraPDF\\SumatraPDF.exe",
"latex-workshop.view.pdf.external.viewer.args": [
"%PDF%"
],
"latex-workshop.view.pdf.external.synctex": "sumatrapdf",
"latex-workshop.view.pdf.external.synctex.args": [
"-forward-search",
"%TEX%",
"%LINE%",
"-reuse-instance",
"-inverse-search",
"\"C:\\Users\\<Username>\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"C:\\Users\\<U>\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\cli.js\" --ms-enable-electron-run-as-node -r -g \"%f:%l\"",
"%PDF%"
]
}
Sioyek
{
"latex-workshop.view.pdf.external.viewer.command": "C:\\path\\to\\sioyek\\sioyek.exe",
"latex-workshop.view.pdf.external.synctex.command": "C:\\path\\to\\sioyek\\sioyek.exe",
"latex-workshop.view.pdf.external.synctex.args": [
"--inverse-search",
"\"C:\\path\\to\\vscode\\Code.exe\" \"C:\\path\\to\\vscode\\resources\\app\\out\\cli.js\" --ms-enable-electron-run-as-node -r -g \"%1:%2\"",
"--reuse-instance",
"--forward-search-file",
"%TEX%",
"--forward-search-line",
"%LINE%",
"%PDF%"
]
}
Biblatex bibliography trick
To change the url
biblatex entry string from retrieved from to available at, do this:
\DefineBibliographyStrings{english}{%
retrieved = {available},
from = {at},
}
Create a new sveltekit project
pnpm dlx sv create my-app
cd my-app
git init && git add -A # (optional)
pnpm run dev
How to install strapi
pnpm dlx create-strapi-app@latest
See strapi.io for details.
Clone only the latest commit of a Git repository
git clone --depth 1 <url>
If you need an specific commit, you can obtain it with the git checkout
command:
git checkout <commit_hash>
Source
- Bing AI Chat, 21/9/2023.
- Copie un repositorio de git sin historial - QA Stack.
- Clonar repositorio remoto de git hasta cierto commit.
- Regresar un repositorio a un commit especifico - Stack Overflow.
- Atlassian Git Tutorial.
Edit Git Remote URL
git remote set-url origin <new-url>
Django tests not running
Solution. Make sure you are writing your tests wrapped in classes that inherit from TestCase
. Example:
from django.test import TestCase
class FooTest(TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_this_will(self):
print 'Win'
Children