This file contains hidden or 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
| # on MacOS to avoid the "zsh: no matches found" error, wrap url in quotes, or 'setopt noglob' to | |
| # turn off wildcard '?' matching | |
| # show HTTP response | |
| curl -i url | |
| # follow 302 redirects | |
| curl -L url | |
| # search response for http status, discarding all other content, and following redirects (-L) |
This file contains hidden or 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
| {% expression %} | |
| {{ output_value_in_context }} | |
| {% for item in items %} | |
| {{ item }} | |
| {% endfor %} | |
| {% if item %} | |
| output something |
This file contains hidden or 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
| Running dev server: | |
| python3 manage.py runserver | |
| Adding a user to admin: | |
| python3 manage.py createsuperuser | |
| Adding app to installed apps: | |
| In yoursite/settings.py, add to: | |
| INSTALLED_APPS = [ | |
| ] |
This file contains hidden or 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
| mvn test -Dtest=package.testname -pl subprojectname -am -Dsurefire.failIfNoSpecifiedTests=false | |
| // -pl module name containing test | |
| // -am = also modules, to build dependent modules | |
| // -Dsurefire.failIfNoSpecifiedTests=false = don't fail if dependent modules don't contain any tests |
This file contains hidden or 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
| SELECT version FROM PRODUCT_COMPONENT_VERSION | |
| WHERE product LIKE 'Oracle Database%'; |
This file contains hidden or 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
| Ctrl-a : jump to start of line | |
| Ctrl-e : jump to end of line |
This file contains hidden or 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
| If you've already staged changes ready to commit but want to view the diff, use: | |
| git diff --cached |
This file contains hidden or 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
| To review changes stashed (git stash push) without retrieving from stash: | |
| What files have changed: | |
| - git stash show | |
| View diffs on stashed changes (patch): | |
| - git stash show -p | |
| To checkout a single file from the latest {0} stash (change number to reference other stashes if not latest) |
This file contains hidden or 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
| \dt # describe all tables | |
| \d tablename # describe table tablename |
This file contains hidden or 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
| terraform { | |
| required_providers { | |
| local = { | |
| source = "hashicorp/local" | |
| } | |
| } | |
| # Provider functions require Terraform 1.8 and later. | |
| required_version = ">= 1.8.0" | |
| } |
NewerOlder