Skip to content

Instantly share code, notes, and snippets.

@pierremonico
pierremonico / Localize Vue files with Django `makemessages`.md
Last active April 26, 2022 13:51
Localize Vue files with Django `makemessages`

NB: the whole approach of serving a Vue project through Django is less than ideal, so this can be seen as deprecated.

Intro

The goal of this gist is to be able to use the built-in makemessages command of Django on your Vue frontend. You can then expose a JavaScript catalog and localize your frontend using gettext.

Following assumptions are made:

  • The directory for the frontend lives in your Django project
  • You are using components (.vue files)

Include the JS Catalog view

Somewhere in urls.py:

@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 6, 2024 07:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 5, 2024 18:31
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@dciccale
dciccale / LICENSE.txt
Created July 31, 2011 09:30 — forked from 140bytes/LICENSE.txt
Detect if Flash Player is installed in your browser (120bytes)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Denis Ciccale <http://webdecs.wordpress.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE