diff options
Diffstat (limited to 'templates/site')
-rw-r--r-- | templates/site/about/.description | 1 | ||||
-rw-r--r-- | templates/site/about/faq.html | 3 | ||||
-rw-r--r-- | templates/site/about/whoami.html | 1 | ||||
-rw-r--r-- | templates/site/files/.description | 1 | ||||
-rw-r--r-- | templates/site/files/1.html | 11 | ||||
-rw-r--r-- | templates/site/fun/.description | 1 | ||||
-rw-r--r-- | templates/site/fun/.links | 1 | ||||
-rw-r--r-- | templates/site/home.html | 4 | ||||
-rw-r--r-- | templates/site/license.html | 17 | ||||
-rw-r--r-- | templates/site/thoughts/.description | 3 | ||||
-rw-r--r-- | templates/site/thoughts/rants/dontread.txt | 2 | ||||
-rw-r--r-- | templates/site/tutorials/.description | 3 | ||||
-rw-r--r-- | templates/site/tutorials/.links | 1 | ||||
-rw-r--r-- | templates/site/tutorials/.secret/secretfile.txt | 1 | ||||
-rw-r--r-- | templates/site/tutorials/how-to-make-this-site.html | 1 | ||||
-rw-r--r-- | templates/site/tutorials/linux/linuz1.html | 1 | ||||
-rw-r--r-- | templates/site/tutorials/python/.description | 1 | ||||
-rw-r--r-- | templates/site/tutorials/python/py-style.md | 93 | ||||
-rw-r--r-- | templates/site/tutorials/python/test.py | 2 |
19 files changed, 148 insertions, 0 deletions
diff --git a/templates/site/about/.description b/templates/site/about/.description new file mode 100644 index 0000000..eee24f1 --- /dev/null +++ b/templates/site/about/.description @@ -0,0 +1 @@ +Who runs this place anyway? diff --git a/templates/site/about/faq.html b/templates/site/about/faq.html new file mode 100644 index 0000000..0ad0c1a --- /dev/null +++ b/templates/site/about/faq.html @@ -0,0 +1,3 @@ +<h2>Frequently Anticipated Questions</h2> +<li><i>A question?</i></li> +<p>Yes, that is a question. Nice one</p> diff --git a/templates/site/about/whoami.html b/templates/site/about/whoami.html new file mode 100644 index 0000000..954d8db --- /dev/null +++ b/templates/site/about/whoami.html @@ -0,0 +1 @@ +<p>Person that does things</p> diff --git a/templates/site/files/.description b/templates/site/files/.description new file mode 100644 index 0000000..0dd21eb --- /dev/null +++ b/templates/site/files/.description @@ -0,0 +1 @@ +Everything else I don't have a place for diff --git a/templates/site/files/1.html b/templates/site/files/1.html new file mode 100644 index 0000000..6be9b63 --- /dev/null +++ b/templates/site/files/1.html @@ -0,0 +1,11 @@ +<p>This is some text</p> +<br> +<br> +<br> +<p> +This is a whole lot more text including very very very long lines, like wowza +this is long! Fortunately, css should wrap it nicely +</p> +<p> +Separate each paragraph! +</p> diff --git a/templates/site/fun/.description b/templates/site/fun/.description new file mode 100644 index 0000000..37c5a36 --- /dev/null +++ b/templates/site/fun/.description @@ -0,0 +1 @@ +The internet is srs business these days. Here's some fun stuff instead diff --git a/templates/site/fun/.links b/templates/site/fun/.links new file mode 100644 index 0000000..b3ea8fb --- /dev/null +++ b/templates/site/fun/.links @@ -0,0 +1 @@ +???,http://www.nyan.cat/ diff --git a/templates/site/home.html b/templates/site/home.html new file mode 100644 index 0000000..01d676e --- /dev/null +++ b/templates/site/home.html @@ -0,0 +1,4 @@ +{% extends 'base.html' %} +{% block content %} +<p>Home</p> +{% endblock %} diff --git a/templates/site/license.html b/templates/site/license.html new file mode 100644 index 0000000..172b43f --- /dev/null +++ b/templates/site/license.html @@ -0,0 +1,17 @@ +<p xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"> + <a rel="license" + href="http://creativecommons.org/publicdomain/zero/1.0/"> + <img src="http://i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style: none;" alt="CC0" /> + </a> + <br /> + To the extent possible under law, + <span property="dct:title">The author</span> + has waived all copyright and related or neighboring rights to + content on <span property="dct:title">{{ domain }}</span>. + All work may be cited without attribution at the reader's discretion. + However, if you do use the work here, or otherwise benefit from it, + the author would love to hear about it! + This work is published from: +<span property="vcard:Country" datatype="dct:ISO3166" content="US" about="{{ domain }}"> + United States</span>. +</p> diff --git a/templates/site/thoughts/.description b/templates/site/thoughts/.description new file mode 100644 index 0000000..f9004b2 --- /dev/null +++ b/templates/site/thoughts/.description @@ -0,0 +1,3 @@ +My thoughts on various topics that I may or may not be qualified to write about +When I can't figure out exactly what I'm thinking, it gets written somewhere +here. diff --git a/templates/site/thoughts/rants/dontread.txt b/templates/site/thoughts/rants/dontread.txt new file mode 100644 index 0000000..e90754c --- /dev/null +++ b/templates/site/thoughts/rants/dontread.txt @@ -0,0 +1,2 @@ +I hate people who try to beep me while I'm turning left... like what do you +want me to do? Run the kids over? diff --git a/templates/site/tutorials/.description b/templates/site/tutorials/.description new file mode 100644 index 0000000..ec41834 --- /dev/null +++ b/templates/site/tutorials/.description @@ -0,0 +1,3 @@ +There's a lot of tutorials out there that can show you something if you know +what to look for. Here's some tutorials that might help when you don't know +what to search. diff --git a/templates/site/tutorials/.links b/templates/site/tutorials/.links new file mode 100644 index 0000000..a0e2e99 --- /dev/null +++ b/templates/site/tutorials/.links @@ -0,0 +1 @@ +Cool site,https://fsf.org diff --git a/templates/site/tutorials/.secret/secretfile.txt b/templates/site/tutorials/.secret/secretfile.txt new file mode 100644 index 0000000..cae75f7 --- /dev/null +++ b/templates/site/tutorials/.secret/secretfile.txt @@ -0,0 +1 @@ +You shouldn't be able to see this file. It is a secret diff --git a/templates/site/tutorials/how-to-make-this-site.html b/templates/site/tutorials/how-to-make-this-site.html new file mode 100644 index 0000000..09dc877 --- /dev/null +++ b/templates/site/tutorials/how-to-make-this-site.html @@ -0,0 +1 @@ +<p>Carefully</p> diff --git a/templates/site/tutorials/linux/linuz1.html b/templates/site/tutorials/linux/linuz1.html new file mode 100644 index 0000000..c299a06 --- /dev/null +++ b/templates/site/tutorials/linux/linuz1.html @@ -0,0 +1 @@ +Linux is cool diff --git a/templates/site/tutorials/python/.description b/templates/site/tutorials/python/.description new file mode 100644 index 0000000..d69e5c3 --- /dev/null +++ b/templates/site/tutorials/python/.description @@ -0,0 +1 @@ +Some basics and thoughts on Python diff --git a/templates/site/tutorials/python/py-style.md b/templates/site/tutorials/python/py-style.md new file mode 100644 index 0000000..2a68fac --- /dev/null +++ b/templates/site/tutorials/python/py-style.md @@ -0,0 +1,93 @@ +# Coding Style Guide + +The purpose of this document is twofold: +1) To ensure that anyone who might like to make my code better understands + why I write python the way I do +2) to ensure *I* adhere to my own style because I'm terribly inconsistent + +Being terribly inconsistent, the guidelines are not set in stone and if +you have a good argument for doing things a particular, I don't really care. + +*BUT* first and foremost, *code must comply with PEP8 first*. This is easy +to automate. I like coala since it's friendly but there' plenty of advanced +linters out there. + +That aside, I have the following idiosyncracies: + +## 1) *Strings* are *double-quoted*. *Keys* and *chars* are *single-quoted*. + +This is really just because I like how C does it. And Cpython's C-based so +why not? + +Like so: + ``` + string = "This is a phrase" + word = "word" + cur_char = 'a' + newline = '\n' # note, two characters, but it's still ONE char in output + # keys are single-quoted to avoid confusion + dictionary = { 'key' : "1245dqw3w431", 'return': newline } + ``` + +The only exception is for strings with quotes in them (anything to avoid +escapes, really) + ``` + quoted_string = ( + '"You miss 100% of the shots you don't take - Wayne Gretsky" - Michael Scott' + ) + ``` +That brings me to my next point. + +## 2) Long strings belong in parentheses + +As in: + ``` + longboi = ( + "This is a really long string usefull when making help menus. Be\n" + "sure to leave s space at the end of each line, or add a new line\n" + "when needed.\n" + + "Try your best to keep formatting accurate like this." + ) + ``` + +## 3) Tabs are four spaces and spaces are *ALWAYS* prefered to tabs +Again, see PEP8. + +## 4) Always add spaces between arithmetic, but never for brackets +It's a pain to read: + ``` + 1/(2*sqrt(pi))*exp(x**2) + ``` +Do this + ``` + 1 / (2 * sqrt(pi)) * exp(x ** 2) + ``` +The same goes for logic operators + ``` + true & false ^ true + ``` + +## 5) EVERYTHING should be snake_case +This is python. Unless there's a compatibility thing (like a library's +code was written that way, or it matches an API variable), +snake_case is preferred. + ``` + + user_input = int(input()) # variable + MAX_INPUT = 1000 # constant + def judge_input(_input, _max): # function + if _max > _input: + print("Too big!") + + judge_input(user_input, MAX_INPUT + class Input_Judger: # a class + # etc etc + ``` +Example exception + ``` + # this doesn't actually work, but you get the idea + r = requests.get("www.debian.org") + pageSize = r.json()['pageSize'] # camel case ok + ``` + diff --git a/templates/site/tutorials/python/test.py b/templates/site/tutorials/python/test.py new file mode 100644 index 0000000..83b87a6 --- /dev/null +++ b/templates/site/tutorials/python/test.py @@ -0,0 +1,2 @@ +#!/usr/bin/python3 +print("hi") |