See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| { | |
| // Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| // Example: | |
| // "Print to console": { | |
| // "prefix": "log", | |
| // "body": [ | |
| // "console.log('$1');", |
| Keyboard Shortcuts | Descption |
|---|---|
| Cmd-/ | Comment/uncomment |
| Cmd + Alt + L | Reformat code |
| Cmd-F | Find text |
| Cmd-Shift-F | Find text in files |
| Cmd-Plus | Expand code block |
| Cmd-Minus | Collapse code block |
| Cmd-B | Goto declaration of current variable |
| Cmd-U | Goto superclass |
| /* | |
| * Copyright (C) 2014 skyfish.jy@gmail.com | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2014 Matthieu Harlé | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| /* | |
| * Copyright (C) 2014 Antonio Leiva Gordillo. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| from django.forms import ModelForm | |
| from django.forms.models import inlineformset_factory | |
| from models import Sponsor, Sponsorship | |
| class SponsorForm(ModelForm): | |
| class Meta: | |
| model = Sponsor |
| # Assuming you have a Article Model like this | |
| # class Article(models.Model): | |
| # ... Some field | |
| # media = models.FileField(upload_to="path_to_inner_media_folder", blank=True) | |
| from django.core.files.base import ContentFile | |
| import os | |
| # Create an article with the associated model | |
| new_article = Article() |