GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: junicode; | |
src: url('_junicode.ttf'); | |
} | |
.card, table { | |
font-family: Helvetica, sans-serif, junicode; | |
font-size: 20px; | |
text-align: center; | |
color: #d03030; | |
background-color: #fafaf5; |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
Fields | null=True | blank=True |
---|---|---|
CharField, TextField, SlugField, EmailField, CommaSeparatedIntegerField | DON'T Django's convention is to store empty values as the empty string, and to always retrieve NULL or empty values as the empty string for consistency. | OK Do this if you want the corresponding form widget to accept empty values. If you set this, empty values get stored as empty strings in the database. |
BooleanField | DON'T Use NullBooleanField instead. | DON'T |
IntegerField, FloatField, DecimalField | OK If you wabt to be able to set the value to NULL in the database | OK if you want the corresponding form widget to accept empty values. if so out will also want to set null=True |
DateTimeField, DateField, TimeField | OK if you want to be able to set the value to NULL in the database. | OK If you want the corresponding form widget to accept empty values, or if you are using auto now or auto now add. If so, you will al |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Fix virtualenv symlinks after upgrading python with Homebrew and then running | |
# `cleanup`. | |
# | |
# After upgrading Python using Homebrew and then running `brew cleanup` one can | |
# get this message while trying to run python: | |
# dyld: Library not loaded: @executable_path/../.Python | |
# Referenced from: /Users/pablo/.venv/my-app/bin/python | |
# Reason: image not found |
Guides:
- https://stephentanner.com/restoring-grub-for-an-encrypted-lvm.html
- https://askubuntu.com/questions/719409/how-to-reinstall-grub-from-a-liveusb-if-the-partition-is-encrypted-and-there-i
- https://help.ubuntu.com/community/Grub2/Installing
cryptsetup luksOpen /dev/sdb3 home_sdb3
vgchange -ay
lvscan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HeroBlock(StructBlock): | |
content = StreamBlock([ | |
('button', StructBlock([ | |
('text', CharBlock(required=False, max_length=80, label='Label')), | |
('url', URLBlock(required=False, label='URL')), | |
], label='Call to action', help_text='A "call-to-action" button, like "Sign Up Now!"')), | |
('video', EmbedBlock(label='Video')), | |
('quote', StructBlock([ | |
('text', TextBlock()), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wagtail.core.models import Page | |
from wagtail.core.fields import RichTextField | |
from proj.richtext_validator import RichTextLengthValidator | |
class AuthorPage(Page): | |
biography = RichTextField( | |
max_length=3600, | |
validators=[RichTextLengthValidator(3000, line_length=50)], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Core assets | |
let coreAssets = []; | |
// On install, cache core assets | |
self.addEventListener('install', function (event) { | |
// Cache core assets | |
event.waitUntil(caches.open('app').then(function (cache) { | |
for (let asset of coreAssets) { | |
cache.add(new Request(asset)); |
OlderNewer