#Linux Cheat Sheet
##File Commands:
- ls – directory listing
- ls -al – formatted listing with hidden files
- cd dir - change directory to dir
- cd – change to home
- pwd – show current directory
- mkdir dir – create a directory dir
- rm file – delete file
#Linux Cheat Sheet
##File Commands:
| # Terminal Cheat Sheet | |
| pwd # print working directory | |
| ls # list files in directory | |
| cd # change directory | |
| ~ # home directory | |
| .. # up one directory | |
| - # previous working directory | |
| help # get help | |
| -h # get help |
| from django.template import Context, Template | |
| print Template("""<script type="text/javascript"> | |
| var foo = 1, | |
| bar = 2, | |
| url = '{% url view_name obj "'+foo+'" "'+bar+'" %}'; | |
| </script>""").render(Context(dict(obj='something'))) | |
| # Output: | |
| <script type="text/javascript"> |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc
Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server
Use this link and get $10 free. Just select the $5 plan unless this a production app.
| // Use !{var} to use unescaped conent | |
| style(type="text/css") !{compiledStyle} | |
| h1.title Invoice number ##{invoice.id} | |
| p.created-at #{invoice.createdAt} | |
| h3 For: #{invoice.customer.number} | |
| table |
| body { | |
| padding: 20px; | |
| font-family: Halvetica, sans-serif; | |
| .title { | |
| margin-bottom: 4px; | |
| } | |
| .created-at { | |
| font-size: 14px; |
| import TeaSchool from 'tea-school'; | |
| import * as pug from 'pug'; | |
| import * as path from 'path'; | |
| import {PDFOptions} from 'puppeteer'; | |
| import {Options as SassOptions} from 'node-sass'; | |
| (async () => { | |
| /******************************** | |
| * STYLE OPTIONS * | |
| ********************************/ |