From ca922bd736b9210cafec4bf82f42418e973e817b Mon Sep 17 00:00:00 2001
From: Steve0Greatness <75220768+Steve0Greatness@users.noreply.github.com>
Date: Mon, 1 Jan 2024 16:13:17 -0800
Subject: [PATCH] Migrate all other posts.
---
.github/workflows/deploy.yml | 2 +-
blog-posts/Changing_the_Light-mode.md | 5 ++
blog-posts/Creating_HTML_DD_List.md | 5 ++
blog-posts/How-To-make-mockups.md | 5 ++
blog-posts/How-to-Store-Passwords.md | 35 +++++++++++
blog-posts/How-to-copy-and-paste-on-mobile.md | 5 ++
blog-posts/How_To_Make_Tea.md | 5 ++
blog-posts/Is_Kris_the_Knight.md | 5 ++
blog-posts/Merging_Blog_to_the_main_site.md | 5 ++
...The_song_that_we_didnt_get_in_undertale.md | 5 ++
blog-posts/What-about-the-second-site.md | 5 ++
.../Why-inspect-element-is-a-useful-tool.md | 5 ++
blog-posts/Youtube_needs_a_Rest_API.md | 5 ++
blog-posts/checkbox-custom-styles.md | 5 ++
blog-posts/creating_a_theme_switch.md | 5 ++
blog-posts/creatingaswitch.md | 5 ++
blog-posts/dividing-by-0.md | 5 ++
blog-posts/fizzbuzz.md | 5 ++
blog-posts/fortress-forever-on-linux.md | 14 +++++
blog-posts/macos-page-tab-nav.md | 9 +++
blog-posts/md.md | 7 +++
blog-posts/satisfactory-farming-idea.md | 54 ++++++++++++++++
blog-posts/singular-blog.md | 8 +++
blog-posts/symbols.md | 5 ++
blog-posts/tf2-disguise-cmd.md | 62 +++++++++++++++++++
blog-posts/whyLocalVarCallLet.md | 5 ++
build.py | 15 +++--
27 files changed, 290 insertions(+), 6 deletions(-)
create mode 100644 blog-posts/Changing_the_Light-mode.md
create mode 100644 blog-posts/Creating_HTML_DD_List.md
create mode 100644 blog-posts/How-To-make-mockups.md
create mode 100644 blog-posts/How-to-Store-Passwords.md
create mode 100644 blog-posts/How-to-copy-and-paste-on-mobile.md
create mode 100644 blog-posts/How_To_Make_Tea.md
create mode 100644 blog-posts/Is_Kris_the_Knight.md
create mode 100644 blog-posts/Merging_Blog_to_the_main_site.md
create mode 100644 blog-posts/The_song_that_we_didnt_get_in_undertale.md
create mode 100644 blog-posts/What-about-the-second-site.md
create mode 100644 blog-posts/Why-inspect-element-is-a-useful-tool.md
create mode 100644 blog-posts/Youtube_needs_a_Rest_API.md
create mode 100644 blog-posts/checkbox-custom-styles.md
create mode 100644 blog-posts/creating_a_theme_switch.md
create mode 100644 blog-posts/creatingaswitch.md
create mode 100644 blog-posts/dividing-by-0.md
create mode 100644 blog-posts/fizzbuzz.md
create mode 100644 blog-posts/fortress-forever-on-linux.md
create mode 100644 blog-posts/macos-page-tab-nav.md
create mode 100644 blog-posts/md.md
create mode 100644 blog-posts/satisfactory-farming-idea.md
create mode 100644 blog-posts/singular-blog.md
create mode 100644 blog-posts/symbols.md
create mode 100644 blog-posts/tf2-disguise-cmd.md
create mode 100644 blog-posts/whyLocalVarCallLet.md
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index ee10a7e..4500f5f 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"]
+ python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
# this Action should follow steps to set up Python build environment
diff --git a/blog-posts/Changing_the_Light-mode.md b/blog-posts/Changing_the_Light-mode.md
new file mode 100644
index 0000000..1a0ec9a
--- /dev/null
+++ b/blog-posts/Changing_the_Light-mode.md
@@ -0,0 +1,5 @@
+---
+title: Changing the light-mode
+date: 2021 Sep 11
+---
+As of currently, the light mode on this site doesn't live up to what I want it to be.
I want it to be something that is the opposite of the dark mode, and it really isn't that. Expect it to change. But, in case you do still want to view it, here are the current css variable colors:
Select Image: |
now that you've selected the element, let's learn how to edit it! You should see the element that you clicked on(using the
Undertale is an amazing game. I really enjoyed my time playing it. I listen to the sound track a lot(I'm doing it as I write this). I even read a fanmade AU called Inverted Fate. The only thing that I haven't done(and don't intend on doing) is a Genocide Run. But, there's one thing that's kinda been bugging me since it first found out about it. It's the fact that their's a version of Undertale(the song) that wasn't added, and instead was replaced with the version we have now.
The version we got of Undertale was a pretty good one. It's a little sad, while also filled with hope(just like the monsters in the neutral route. It is kinda the song of their hope, since it only plays during the end of the neutral route). Below is the version we got in the game.
This one is also greate, and I personally think I like it a lot better than the one we have. I feel like it's more happy in tone. Even if it might not fit with what the game would have been trying to fit it's context into, it's still a good song on it's own.
\ No newline at end of file diff --git a/blog-posts/What-about-the-second-site.md b/blog-posts/What-about-the-second-site.md new file mode 100644 index 0000000..2b64da6 --- /dev/null +++ b/blog-posts/What-about-the-second-site.md @@ -0,0 +1,5 @@ +--- +title: What about the second site? +date: 2021 Sep 01 +--- +So you may know about StevesGreatness.Repl.Co, or, the second site.but what makes inspect so important?
Well I'm glad I asked!Checkboxes are hard to style. But when you're making a website, they may look ugly.
As you can see here, this bland checkbox does not fit into my clearly great website(/s). But really, it does not fit in at all.
The first step toward styling it how we want it is to give it an appearence of none, and a width and height that are what you want.
Now we can do whatever we want to it. Also, remeber to add a checked pseudo
The first step is to create the themes in your stylesheet, you can have as many as you want. Just make sure to remeber all their names within your CSS.
This is why you need to remeber all their names within the CSS. You need to add them all to an array in your JS. Below is an example of an array containing some themes.
This is the part you've been waiting for! The actual content switcher. It's surprisingly simple.
First, get the index of the current theme using let currentTheme = themes.indexOf(document.documentElement.className). Then, use an if statement to see if it's more than or equal to the length of the array containing your themes.
A switch is something that is basically just a nicer checkbox. Here, I'll be showing you how to make one.
The first step is to create checkbox with any classname; I'll be using switch.Next step is to add an appearance of none to the CSS--make sure to add -moz- and -webkit-. After that, you're going to want to set it so that the checkbox a rectangle--make sure it's in px. We also want to set the position to relative
Next we want to create a ::before pseudo. In there we want to make it have a position of relative, a width and height that are abit less than the height of the main switch, a display of inline-block, a top and left of 0, a content of anything, color of transparent, and a background color that's different from the one in the main switch.
Finally add a pseudo called :checked which checks if a checkbox, or a radio, was checked; you'll want to change the before pseudo if the the checkbox is checked. You need to set the left to a bit less than the width of the checkbox; you can adjust it until it looks right to you.
Now, let's look at what it looks likeYou have 2 rooms, and 0 people, if each room gets an equal amount of people(not including decimals, you can't have half, or a quarter of a person without them being dead)
A FizzBuzz Program is a program used in many job interviews to see if a programmer is good at problem solving. There are many ways to make one.
First let me tell you why I write these programs. These programs, at least in my opinion, are good when you're learning a new programming language. It gives you a problem to solve, and all you need to do to solve it. Incase you're wondering, the problem is to make a program that counts from 1 to 100 and replaces all multiples of 3 with Fizz, all multiples of 5 with Buzz, and multiples of both with FizzBuzz. Generally in interviews, they also ask you to add on more multiples, such as multiples of 7 are replaced with Fuzz, and multiples of 11 are replaced with Bizz.
Now that I've told you what a FizzBuzz Program is, let me show you how I make them in Psuedo-Code.
The first thing I do is I create a for loop, and within it I put a print statement and a variable named toPrint.
The next thing I do is I define a function that checks if one number is a multiple of another, and if it is, then it returns the string, otherwise, it returns an empty string.
Then I make a function that checks if a string is an empty one, if it is, then it returns a number.
Once I have these 2 functions, I go back into the for loop and make the toPrint variable have the variable for checking if a string is empty(and if it is replace it with a number) check if 2 of the other function that check if one number is a multiple of another(and if it is, return a string). Finally, it prints the output.
I've tried this method many times. Below are some examples of this method in action!
\ No newline at end of file diff --git a/blog-posts/fortress-forever-on-linux.md b/blog-posts/fortress-forever-on-linux.md new file mode 100644 index 0000000..5b762c9 --- /dev/null +++ b/blog-posts/fortress-forever-on-linux.md @@ -0,0 +1,14 @@ +--- +title: Fortress Forever on Linux! +date: 2022 Dec 16 +updated: 2023 Jan 1 +--- +Fortress Forever is finally playable fully on Linux using Proton-GE version 7-41(note: if you change the setting you will have to reboot the game). + +If you need a quick rundown on how to download and install Proton-GE, [I've made a video about that already](https://youtu.be/B2LZ8nYd3Bw). It is technically about a different game, however, the problem is still similar enough to apply pretty much the same steps. + +It plays pretty well, the only problem is when a local server changes maps, and the font for some of the menus(and the chat) being very... bad looking. It's not the game's fault for the second one, however, it is still something that's annoying if you don't want to do too much tinkering. + +I'm glad to be able to play this great game on my daily OS without having to open Bottles every time I want to play Fortress Forever. + +Whenever I'm playing Fortress Forever, I'm usually on [MaxTF's Midwest server](https://www.gametracker.com/server_info/server2.maxcommunity.net:27015/)... I have the lowest ping there, not good though. \ No newline at end of file diff --git a/blog-posts/macos-page-tab-nav.md b/blog-posts/macos-page-tab-nav.md new file mode 100644 index 0000000..7235d5e --- /dev/null +++ b/blog-posts/macos-page-tab-nav.md @@ -0,0 +1,9 @@ +--- +title: Page Keyboard Navigation on MacOS +date: 2022 Feb 26 +--- +Ok, so I feel like a complete idiot right now. + +When I've been trying(and failing) to use the tab key on my computer(it's a Macbook) for what feels like forever now. Turns out, it was as simple as hitting control + fn + <<(<< is F7). + +To be honest, I thought that it was just an issue with FireFox, and then I read [Browser keyboard navigation in macOS](https://www.a11yproject.com/posts/macos-browser-keyboard-navigation/) and realized that it was an issue with MacOS! This should really be an option enabled by default, but Apple is stupid. \ No newline at end of file diff --git a/blog-posts/md.md b/blog-posts/md.md new file mode 100644 index 0000000..7bdb4b4 --- /dev/null +++ b/blog-posts/md.md @@ -0,0 +1,7 @@ +--- +title: MD now works here :) +date: 2022 Jan 20 +--- +I'd just like to say that my blog now works with _mark down_. So that's cool. + +Incase you're wondering, I used a library called [marked.js](https://marked.js.org/)(a popular library used to convert `markdown` to `html`) \ No newline at end of file diff --git a/blog-posts/satisfactory-farming-idea.md b/blog-posts/satisfactory-farming-idea.md new file mode 100644 index 0000000..07bbb25 --- /dev/null +++ b/blog-posts/satisfactory-farming-idea.md @@ -0,0 +1,54 @@ +--- +title: Satisfactory Concept: Farming +date: 2023 Apr 16 +--- +Here is my idea for automating the collection of healing materials(such as Beryl Nuts) in Satisfactory + +## Plant Pods + +Plant pods would be researchable in the Nutrients section of the MAM. It would cost: +* 5 modular frames +* 10 steel pipes +* 20 biofuel + +to research. + +You'd be able to build it in a new _Farming_ section in the production category of the build menu. It would cost the user: +* 4 steel pipes +* 2 quickwire +* 5 biofuel + +to build. It would require 1 MW of power to function. Plants that are left without power while in there will not continue growing or providing harvest, however they will not die(that'd be annoying if they did). + +The user would be able to interact with the planting pod to bring up a menu that tells them what stage of growing it's at(baby, growing, fully grown), how ripe for harvest the plant is(out of 3 states: none, starting, ripe). The UI will have a button to harvest at the bottom, and a box that will allow the plant to be exchanged for another--which would give you a few leaves, proportional to how long it's been growing(0 if baby, 4 if growing, 10 if fully grown), and the amount of fruit they would have gotten from the harvest + 1 extra(for the fruit they put in). + +## Robot Farmers + +Researchable under the _Crystal Oscillator_. The research cost is: +* 10 Crystal Oscillators +* 5 AI limiter +* 3 quickwire + +These little farmers need power to survive, which is why the _ROBOT charger_ is unlocked with them. +This building can be built in the power section. They cost: +* 15 quickwire +* 2 modular frames +* 5 crystal oscillators + +to build. + +Once built, this building acts like the truck station, but instead of coal, it loads power, and it can only unload items from the bot's inventory. + +The Robo-Farmer is then buildable under the _Farming_ section in the production category of the build menu. It costs : +* 1 Factory Cart +* 2 Crystal Oscillators +* 1 AI limiter +* 3 quickwire +* 5 steal pipes + +to build. + +These little robots have themselves a little UI that allows you to select items they should farm. Once given a task, these robots will always return to the nearest _ROBOT charger_ when their inventory is full, or they are running low on power(robots will always attempt to keep themselves powered). If the robot cannot find a plant within range that is harvestable, then the they will wait until there is one. + +## Getting the most out of these resources +Robot Farmers are best at traversing on foundations(they spend less power). As such, it is recommended, that the player create a flat platform that has plant pods with some space between for the bots to traverse between them. In the center, the player should build a _ROBOT charger_, as it will allow the robots the run around equally in each direction. Players should also utilize the _Conveyor Lift_ to bring materials to a layer above for sorting, or other purposes. diff --git a/blog-posts/singular-blog.md b/blog-posts/singular-blog.md new file mode 100644 index 0000000..2befef5 --- /dev/null +++ b/blog-posts/singular-blog.md @@ -0,0 +1,8 @@ +--- +title: My blog is now in one place +date: 2024 Jan 1 +--- + +Alright, I've now moved all my full blog posts over to this one website. There might be other I miss in other places, but I'll add them here soon. I will not be moving over my micro-blogs, however. Those are too small, and I'd rather keep those separated anyway. + +I'm not a fan of how I wrote before December of 2022, everything there is filled with spelling mistakes and grammar issues, I also think most of it was rude towards the reader, which is not a good impression. \ No newline at end of file diff --git a/blog-posts/symbols.md b/blog-posts/symbols.md new file mode 100644 index 0000000..8bae273 --- /dev/null +++ b/blog-posts/symbols.md @@ -0,0 +1,5 @@ +--- +title: Symbols +date: 2021 Oct 10 +--- +In our lifes on the internet, we see alot of characters that we don't normally see. Like @, #, &, [], {}, \, ;, and |. But what are thier names, what are their origins, and why do they look like they do? I'm going to try and find out!In JavaScript there are 3 different kinds of variables, global variables(using var), constants(const, and local variables(let). All of the act allittle differently from eachother. Allow me to explain what they do.
Global variables, made using var, are as they sound, global variables. Once defined, they can be used, edited, or redefind anywhere.
Constants, defined with const, are constant, they cannot change, at all.
Local variables, defined with let, are variables that can only be used in the place that it is defined, like a function, and it's children.
Now that we has that established, let's talk about how local variables got their name.Turns out "let" is a mathematical term. The "let" expression may also be defined in mathematics, where it associates a Boolean condition with a restricted scope. [source]. It was first used in programming in early languages like Basic.
In case you're wondering, the main source is this answer on Stack Overflow. \ No newline at end of file diff --git a/build.py b/build.py index 5b2d700..43c5868 100644 --- a/build.py +++ b/build.py @@ -4,6 +4,7 @@ from os import mkdir as CreateDirectory, listdir as ListDirectory, unlink as DeleteFile from os.path import isfile as IsFile, exists as PathExists from distutils.dir_util import copy_tree as CopyDirectory +from datetime import datetime GITHUB_BUILD_DIR = "docs" # Separate because this site is built with an action that won't work if they aren't LOCAL_BUILD_DIR = "build" @@ -27,17 +28,21 @@ def WipeFinalDir(): continue DeleteDirectory(path) +def PostSortHelper(Post): + return datetime.strptime(Post["date"], "%Y %b %d") + def GetBlogList(): PostSlugs = ListDirectory("blog-posts") Posts = [] for slug in PostSlugs: - with open("blog-posts/" + slug) as MDFile: + with open("blog-posts/" + slug, encoding="utf-8") as MDFile: PostHTML = RenderMarkdown(MDFile.read()) Item = PostHTML.metadata Item["content"] = PostHTML Item["pathname"] = slug.replace(".md", ".html") Posts.append(Item) - return Posts + PostsByDate = sorted(Posts, key=PostSortHelper, reverse=True) + return PostsByDate PostList = GetBlogList() @@ -45,16 +50,16 @@ def RenderPosts(): for post in ListDirectory("blog-posts"): path = "blog-posts/" + post RenderedHTML: str - with open(path, "r") as PostContent: + with open(path, "r", encoding="utf-8") as PostContent: PostHTML = RenderMarkdown(PostContent.read()) Title = PostHTML.metadata["title"] PostDate = PostHTML.metadata["date"] RenderedHTML = RenderTemplate("blog-post.html", Title=Title, PostDate=PostDate, Content=PostHTML) - with open(BUILD_DIRECTORY + "/blog/" + post.replace(".md", ".html"), "w") as PostLocation: + with open(BUILD_DIRECTORY + "/blog/" + post.replace(".md", ".html"), "w", encoding="utf-8") as PostLocation: PostLocation.write(RenderedHTML) def RenderPage(PageInput: str, ContentDest: str, **kwargs): - with open(BUILD_DIRECTORY + "/" + ContentDest, "w") as DestLocation: + with open(BUILD_DIRECTORY + "/" + ContentDest, "w", encoding="utf-8") as DestLocation: DestLocation.write(RenderTemplate(PageInput, **kwargs)) if __name__ == "__main__":