updating site
Some checks failed
Build and Deploy docker container / build (push) Failing after 3m28s

This commit is contained in:
Jonathan Branan 2024-11-15 14:52:06 -06:00
parent fda7b149a9
commit dbd27cb5c7
14 changed files with 567 additions and 29 deletions

View File

@ -6,16 +6,18 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: cstuder/apprise-ga@master - name: Send message job is starting
uses: cstuder/apprise-ga@master
with: with:
title: 'jonb.io site deployment' title: 'jonb.io site deployment'
message: >- message: >-
Push received on {{ ref }} Started build for:
Commit by {{ head_commit.author.name }}: {{ head_commit.message | Commit by {{ head_commit.author.name }}: {{ head_commit.message |
truncate(128) }} ({{ head_commit.id[0:7] }}) truncate(128) }} ({{ head_commit.id[0:7] }})
env: env:
APPRISE_URL: '${{ secrets.APPRISE_URL }}' APPRISE_URL: '${{ secrets.APPRISE_URL }}'
- uses: actions/checkout@v4 - name: Checkout main
uses: actions/checkout@v4
- name: Install Yarn - name: Install Yarn
run: npm install -g yarn run: npm install -g yarn
- name: Set Node.js 22.x - name: Set Node.js 22.x
@ -26,7 +28,8 @@ jobs:
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarn-cache-dir-path id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4 - name: Restore cache
uses: actions/cache@v4
id: yarn-cache id: yarn-cache
with: with:
path: | path: |
@ -35,8 +38,10 @@ jobs:
key: '${{ runner.os }}-yarn-${{ hashFiles(''**/yarn.lock'') }}' key: '${{ runner.os }}-yarn-${{ hashFiles(''**/yarn.lock'') }}'
restore-keys: | restore-keys: |
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- run: yarn - name: Update node modules
- run: EXPORT=1 UNOPTIMIZED=1 yarn build run: yarn
- name: Build app and export to ./out
run: EXPORT=1 UNOPTIMIZED=1 yarn build
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub - name: Login to Docker Hub
@ -54,19 +59,20 @@ jobs:
cache-from: 'type=registry,ref=git.jonb.io/jblu/jonbio:buildcache' cache-from: 'type=registry,ref=git.jonb.io/jblu/jonbio:buildcache'
cache-to: >- cache-to: >-
type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
- name: Deploy App - name: Deploy qpp
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
with: with:
url: 'http://192.168.4.11:7777/v1/update' url: 'http://192.168.4.11:7777/v1/update'
method: GET method: GET
bearerToken: '${{ secrets.DEPLOYTOKEN }}' bearerToken: '${{ secrets.DEPLOYTOKEN }}'
timeout: 60000 timeout: 60000
- uses: cstuder/apprise-ga@master - name: Send message app has deployed
uses: cstuder/apprise-ga@master
with: with:
title: 'jonb.io site deployment' title: 'jonb.io site deployment'
message: >- message: >-
Push received on {{ ref }} Deployed {{head_commit.message}}
Commit by {{ head_commit.author.name }}: {{ head_commit.message | Commit by {{ head_commit.author.name }}: {{ head_commit.message |
truncate(128) }} ({{ head_commit.id[0:7] }}) deployed. truncate(128) }} ({{ head_commit.id[0:7] }})
env: env:
APPRISE_URL: '${{ secrets.APPRISE_URL }}' APPRISE_URL: '${{ secrets.APPRISE_URL }}'

View File

@ -14,7 +14,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
lastModified: post.lastmod || post.date, lastModified: post.lastmod || post.date,
})) }))
const routes = ['', 'blog', 'projects', 'tags'].map((route) => ({ const routes = ['', 'blog','likes', 'projects', 'tags'].map((route) => ({
url: `${siteUrl}/${route}`, url: `${siteUrl}/${route}`,
lastModified: new Date().toISOString().split('T')[0], lastModified: new Date().toISOString().split('T')[0],
})) }))

View File

@ -1 +1 @@
{"cygnus":1,"self-hosted":1,"server":1,"python":1,"projects":1,"code":1} {"art":1,"store":1,"melis-sweetsimple":1,"visual-studio-code":1,"guide":3,"tailwind-nextjs-starter-blog":1,"github":1,"python":1,"projects":1,"code":1,"cygnus":1,"self-hosted":1,"server":1,"next-js":1}

7
data/authors/meli.mdx Normal file
View File

@ -0,0 +1,7 @@
---
name: Melina Branan
avatar: https://s3.jonb.io/cdn/author/IMG_2901.jpeg
occupation: Infrastructure Engineer
---
This is who I am

View File

@ -0,0 +1,198 @@
---
title: 'Markdown Guide'
date: '2024-11-6'
tags: ['github', 'guide']
draft: true
summary: 'Markdown cheatsheet for all your blogging needs - headers, lists, images, tables and more! An illustrated guide based on GitHub Flavored Markdown.'
---
# Introduction
Markdown and Mdx parsing is supported via `unified`, and other remark and rehype packages. `next-mdx-remote` allows us to parse `.mdx` and `.md` files in a more flexible manner without touching webpack.
GitHub flavored markdown is used. `mdx-prism` provides syntax highlighting capabilities for code blocks. Here's a demo of how everything looks.
The following markdown cheatsheet is adapted from: https://guides.github.com/features/mastering-markdown/
# What is Markdown?
Markdown is a way to style text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like `#` or `*`.
# Syntax guide
Heres an overview of Markdown syntax that you can use anywhere on GitHub.com or in your own text files.
## Headers
```
# This is a h1 tag
## This is a h2 tag
#### This is a h4 tag
```
# This is a h1 tag
## This is a h2 tag
#### This is a h4 tag
## Emphasis
```
_This text will be italic_
**This text will be bold**
_You **can** combine them_
```
_This text will be italic_
**This text will be bold**
_You **can** combine them_
## Lists
### Unordered
```
- Item 1
- Item 2
- Item 2a
- Item 2b
```
- Item 1
- Item 2
- Item 2a
- Item 2b
### Ordered
```
1. Item 1
1. Item 2
1. Item 3
1. Item 3a
1. Item 3b
```
1. Item 1
1. Item 2
1. Item 3
1. Item 3a
1. Item 3b
## Images
```
![GitHub Logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)
Format: ![Alt Text](url)
```
![GitHub Logo](https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png)
## Links
```
http://github.com - automatic!
[GitHub](http://github.com)
```
http://github.com - automatic!
[GitHub](http://github.com)
## Blockquotes
```
As Kanye West said:
> We're living the future so
> the present is our past.
```
As Kanye West said:
> We're living the future so
> the present is our past.
## Inline code
```
I think you should use an
`<addr>` element here instead.
```
I think you should use an
`<addr>` element here instead.
## Syntax highlighting
Heres an example of how you can use syntax highlighting with [GitHub Flavored Markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/):
````
```js:fancyAlert.js
function fancyAlert(arg) {
if (arg) {
$.facebox({ div: '#foo' })
}
}
```
````
And here's how it looks - nicely colored with styled code titles!
```js:fancyAlert.js
function fancyAlert(arg) {
if (arg) {
$.facebox({ div: '#foo' })
}
}
```
## Footnotes
```
Here is a simple footnote[^1]. With some additional text after it.
[^1]: My reference.
```
Here is a simple footnote[^1]. With some additional text after it.
[^1]: My reference.
## Task Lists
```
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item
```
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item
## Tables
You can create tables by assembling a list of words and dividing them with hyphens `-` (for the first row), and then separating each column with a pipe `|`:
```
| First Header | Second Header |
| --------------------------- | ---------------------------- |
| Content from cell 1 | Content from cell 2 |
| Content in the first column | Content in the second column |
```
| First Header | Second Header |
| --------------------------- | ---------------------------- |
| Content from cell 1 | Content from cell 2 |
| Content in the first column | Content in the second column |
## Strikethrough
Any word wrapped with two tildes (like `~~this~~`) will appear ~~crossed out~~.

View File

@ -0,0 +1,68 @@
---
title: Images in Next.js
date: '2020-11-11'
tags: ['next js', 'guide']
draft: true
summary: 'In this article we introduce adding images in the tailwind starter blog and the benefits and limitations of the next/image component.'
---
# Introduction
The tailwind starter blog has out of the box support for [Next.js's built-in image component](https://nextjs.org/docs/api-reference/next/image) and automatically swaps out default image tags in markdown or mdx documents to use the Image component provided.
# Usage
To use in a new page route / javascript file, simply import the image component and call it e.g.
```js
import Image from 'next/image'
function Home() {
return (
<>
<h1>My Homepage</h1>
<Image src="/me.png" alt="Picture of the author" width={500} height={500} />
<p>Welcome to my homepage!</p>
</>
)
}
export default Home
```
For a markdown file, the default image tag can be used and the default `img` tag gets replaced by the `Image` component in the build process.
Assuming we have a file called `logo.png` in `static/images/logo.png`, the following line of code would generate the optimized image.
```
![logo](static/images/logo.png)
```
Alternatively, since we are using mdx, we can just use the image component directly! Note, that you would have to provide a fixed width and height. The `img` tag method parses the dimension automatically.
```js
<Image alt="ocean" src="/static/images/logo.png" width={256} height={128} />
```
_Note_: If you try to save the image, it is in webp format, if your browser supports it!
![logo](/static/images/logo.png)
# Benefits
- Smaller image size with Webp (~30% smaller than jpeg)
- Responsive images - the correct image size is served based on the user's viewport
- Lazy loading - images load as they are scrolled to the viewport
- Avoids [Cumulative Layout Shift](https://web.dev/cls/)
- Optimization on demand instead of build-time - no increase in build time!
# Limitations
- Due to the reliance on `next/image`, unless you are using an external image CDN like Cloudinary or Imgix, it is practically required to use Vercel for hosting. This is because the component acts like a serverless function that calls a highly optimized image CDN.
If you do not want to be tied to Vercel, you can remove `imgToJsx` in `remarkPlugins` in `lib/mdx.js`. This would avoid substituting the default `img` tag.
Alternatively, one could wait for image optimization at build time to be supported. A different library, [next-optimized-images](https://github.com/cyrilwanner/next-optimized-images) does that, although it requires transforming the images through webpack which is not done here.
- Images from external links are not passed through `next/image`
- All images have to be stored in the `public` folder e.g `/static/images/logo.png`

View File

@ -0,0 +1,139 @@
---
title: 'Using Visual Studio Code to quickly write frontmatter'
date: '2024-11-12'
#lastmod: '202year-day-month'
tags: ['Visual Studio Code', 'guide', 'Tailwind Nextjs Starter Blog']
draft: true
summary: 'summary'
#images: ['/static/images/image.jpg',]
#authors: ['default',]
#layout: PostLayout
#canonicalUrl: https://jonb.io/blog/the-url-here
---
```json
{
"Blog Frontmatter": {
"prefix": "f",
"scope":"markdown",
"body": [
"---",
"title: '${1:title}'",
"date: '202${2:year}-${3:month}-${4:day}'",
"#lastmod: '202${12:year}-${13:month}-${14:day}'",
"tags: ['${5:tag1}', '${6:tag2}', '${7:tag3}']",
"draft: ${8:true}",
"summary: '${9:summary}'",
"#images: ['/static/images/${10:image.jpg}',]",
"#authors: ['default',]",
"#layout: PostLayout # PostLayout, PostSimple and PostBanner",
"#canonicalUrl: https://jonb.io/blog/${11:the-url-here}",
"---$0"
],
"description": "Write a template for blog frontmatter."
},
"Blog Frontmatter Title": {
"prefix": "f:title",
"body": [
"title: '${1:title}'$0",
],
"description": "Shortcode for blog frontmatter title."
},
"Blog Frontmatter Date": {
"prefix": "f:date",
"body": [
"date: '202${1:year}-${2:month}-${3:day}'$0"
],
"description": "Shortcode for blog frontmatter date."
},
"Blog Frontmatter lastmod": {
"prefix": "f:lastmod",
"body": [
"lastmod: '202${1:year}-${2:month}-${3:day}'$0",
],
"description": "Shortcode for blog frontmatter lastmod."
},
"Blog Frontmatter tags": {
"prefix": "f:tags",
"body": [
"tags: ['${1:tag1}', '${2:tag2}', '${3:tag3}']$0",
],
"description": "Shortcode for blog frontmatter tags."
},
"Blog Frontmatter draft": {
"prefix": "f:draft",
"body": [
"draft: ${1:true}$0",
],
"description": "Shortcode for blog frontmatter draft."
},
"Blog Frontmatter summary": {
"prefix": "f:summary",
"body": [
"summary: '${1:summary}'$0",
],
"description": "Shortcode for blog frontmatter summary."
},
"Blog Frontmatter images": {
"prefix": "f:images",
"body": [
"images: ['/static/images/${1:image.jpg}',]$0",
],
"description": "Shortcode for blog frontmatter images."
},
"Blog Frontmatter authors": {
"prefix": "f:authors",
"body": [
"authors: ['default',]$0",
],
"description": "Shortcode for blog frontmatter authors."
},
"Blog Frontmatter layout": {
"prefix": "f:layout",
"body": [
"layout: PostLayout # PostLayout, PostSimple and PostBanner$0",
],
"description": "Shortcode for blog frontmatter layout."
},
"Blog Frontmatter canonicalUrl": {
"prefix": "f:canonicalUrl",
"body": [
"canonicalUrl: https://jonb.io/blog/${1:the-url-here}$0",
],
"description": "Shortcode for blog frontmatter canonicalUrl."
},
"Blog Link": {
"prefix": "blog:link",
"body": [
"[${1:Name}](${2:Link})$0"
],
"description": "Shortcode for markdown link"
},
"Blog Image": {
"prefix": "blog:image",
"body": [
"![${1:Name}](${2:Link})$0"
],
"description": "Shortcode for markdown image"
},
"Blog Table of Contents": {
"prefix": "blog:toc",
"body": [
"<TOCInline toc={props.toc} asDisclosure toHeading={3} />$0"
],
"description": "Shortcode for markdown table of contents"
},
"Blog Video": {
"prefix": "blog:video",
"body": [
"<video controls>",
"<source",
"src=\"${1:src}\"",
"type=\"video/mp4\"",
"/>",
"</video>$0"
],
"description": "Shortcode for markdown video"
},
}
```

View File

@ -6,24 +6,30 @@ draft: false
summary: A story of how I started self-hosting. summary: A story of how I started self-hosting.
--- ---
<TOCInline toc={props.toc} asDisclosure toHeading={3} />
> #### Now that I think about it, they kind of took advantage of me > #### Now that I think about it, they kind of took advantage of me
### Side work for Aunt Laurie ### Side work for Aunt Laurie
The first piece of hardware I ever owned was given to me by my dear Aunt. At the time she had worked for a company that sold industrial saw blades and she was frequently fixing their IT issues despite being an accountant. To this day it still infuriates me how much they took advantage of her. Now that I think about it, they kind of took advantage of me. You see I had worked for GeekSquad at the time and looking back at it, I realize how little I knew then. While I know there is always more to learn in the industry, what you learn pretty quickly is that your time is valuable, and that not everyone views IT work as "easy" and "no big deal". If they had invited an IT consultant to do the 3 hours of work I did, the bill easily would have been hundreds of dollars. These days, I don't charge by the hour, I charge by the job. This way, I can work quickly and not get penalized for it. ![Saw Blade](https://www.kakaindustrial.com/cdn/shop/articles/KakaIndustrialLLC-278201-Different-Types-Saws-Blogbanner1.jpg?v=1710260765&width=1000)
The first piece of hardware I ever owned was given to me by my dear Aunt. At the time she had worked for a company that sold industrial saw blades and she was frequently fixing their IT issues despite being an accountant. To this day it still infuriates me how much they took advantage of her. Now that I think about it, they kind of took advantage of me too. You see I had worked for GeekSquad at the time and looking back at it, I realize how little I knew then. While I know there is always more to learn in the industry, you learn pretty quickly is that your time is valuable, and that not everyone views IT work as "easy" and "no big deal". If they had invited an IT consultant to do the 3 hours of work I did, the bill easily would have been hundreds of dollars. These days, I don't charge by the hour, I charge by the job. This way, I can work quickly and not get penalized for it.
She asked me in to help take a look at a virus infecting some of the computers at the office. This virus was mean; one of those that would keep creating itself until you found the source process. I don't really think it was a self-replicating-worm-type-of-virus because it didn't spread to all of the computers in the network, just a few. It was more like one of those click-a-link-in-an-email-that-you-shouldn't-have types. No, Harbor freights doesn't have a free gift card for you. What is free, is the headache it takes to find the dang source. I was able to find it only because i suggested an antivirus I liked: Webroot. It was one of the most performant and reliable anti-viruses I have ever seen. After convincing my aunt to buy it, I whipped up a batch file to install the application and register it all in one go. Boyyyy now that I think about it, that's probably when I really started to enjoy writing code/scripting. After using the script, Webroot immediately found the source process and resource usage went back to normal. She asked me in to help take a look at a virus infecting some of the computers at the office. This virus was mean; one of those that would keep creating itself until you found the source process. I don't really think it was a self-replicating [worm-type](https://en.wikipedia.org/wiki/Computer_worm) virus because it didn't spread to all of the computers in the network, just a few. It was more like one of those click-a-link-in-an-email-that-you-shouldn't-have types. No, Harbor freights doesn't have a free gift card for you. What is free, is the headache it takes to find the dang source. I was able to find it only because I suggested an antivirus I liked: Webroot. It was one of the most performant and reliable anti-viruses I have ever seen. After convincing my aunt to buy it, I whipped up a batch file to install the application and register it all in one go. Now that I think about it, that's probably when I really started to enjoy writing code/scripting. After using the script, Webroot immediately found the source process and resource usage went back to normal.
"Would you like a computer?" "Would you like a server?"
"A what?" I respond confused (I was expecting money). She starts walking to the networking closet where I see an old dell tower sitting on the floor. At first I think it's just a desktop, but after looking at the label closely, I realize it's actually a server in desktop form. She was offering me a Dell T100 equipped with a quad core Xeon processor(Intel Server CPU) and 4 bays for hard drives. Hard drives included. "A what?" I respond confused (I was expecting money). She starts walking to the networking closet where I see an old dell tower sitting on the floor. At first I think it's just a desktop, but after looking at the label closely, I realize it's actually a server in desktop form. She was offering me a [Dell T110](https://i.dell.com/sites/csdocuments/Shared-Content_data-Sheets_Documents/en/T110-SpecSheet.pdf) equipped with a quad core Xeon processor(Intel Server CPU) and 4 bays for hard drives. Hard drives included.
"Oh Sweet! Thanks Auntie Lar!" "Oh Sweet! Thanks Auntie Lar!"
Despite not being paid like a professional, this was sufficient compensation. While it wasn't the most powerful server on the market, it definitely would do anything I ask it. This leaves just one question... Despite not being paid like a professional, this was sufficient compensation. While it wasn't the most powerful server on the market, it definitely would do anything I ask. This left just one question...
### A way to watch movies ### A way to watch movies
> What should I ask it to do? > What should I ask it to do?
![Dell T110 Server](https://i.dell.com/das/dih.ashx/500x500/das/xa_____/global-site-design%20WEB/1bff82d3-cb9c-8eee-ff1c-0eacc05c69dd/1/OriginalJPG?id=Dell/Product_Images/Dell_Enterprise_Products/Enterprise_Systems/PowerEdge/PowerEdge_T110II/relative_size/server-poweredge-t110-II-right-relativesize-500-cropped.psd)
_Dell T110 Server_
The computer sits in my room for months. Every glance in its direction, I ask my self: "What should I ask it to do?". A month or two later, I am lounging in the living room with my parents watching OTA tv. My father just did a scan of channels and while we are flipping through the channels we come across The Fresh Prince of Bel-Air reruns. We couldn't get enough. I was so happy. You see, you couldn't find those reruns on OTA in San Antonio; And we just happened to be getting a channel from Austin! This goes on for a couple of days then one day, the floor just gets pull from underneath our feet. We were no longer getting signal! I have my answer to the question now. I am going to download The Fresh Prince of Bel-Air and watch it off my server. After installing Windows Sever 2012 Edition, I install plex. I happily download The Fresh Prince of Bel-Air and ironically, to this day I haven't watched all the episodes. I still have all of the files though. The computer sits in my room for months. Every glance in its direction, I ask my self: "What should I ask it to do?". A month or two later, I am lounging in the living room with my parents watching OTA tv. My father just did a scan of channels and while we are flipping through the channels we come across The Fresh Prince of Bel-Air reruns. We couldn't get enough. I was so happy. You see, you couldn't find those reruns on OTA in San Antonio; And we just happened to be getting a channel from Austin! This goes on for a couple of days then one day, the floor just gets pull from underneath our feet. We were no longer getting signal! I have my answer to the question now. I am going to download The Fresh Prince of Bel-Air and watch it off my server. After installing Windows Sever 2012 Edition, I install plex. I happily download The Fresh Prince of Bel-Air and ironically, to this day I haven't watched all the episodes. I still have all of the files though.
### Learning virtualization ### Learning virtualization
@ -33,7 +39,7 @@ The computer sits in my room for months. Every glance in its direction, I ask my
"That's cool, I have one too. Well alright, we are going to give you a technical interview now. Here's the packet. You have an hour." "That's cool, I have one too. Well alright, we are going to give you a technical interview now. Here's the packet. You have an hour."
I would say the interview went well. After all, I got the job. This was my first "Corporate Job". The exposure really required me to teach my self on the side. Using VMWare ESXI was very easy. Their bare metal hypervisor came with networking, storage management etc and was reasonably intuitive. I would say the interview went well. After all, I got the job. This was my first "Corporate Job". The exposure really required me to teach my self on the side. Using [VMWare ESXI](https://www.vmware.com/products/cloud-infrastructure/esxi-and-esx) was very easy. Their bare metal hypervisor came with networking, storage management etc and was reasonably intuitive.
Downloading and setting up linux virtual machines with each application was challenging yet rewarding. Setting up servers manually and then installing the applications was an involved process; One that likely set the ground work for understanding the use case of containers. Being RHEL certified did afford me a large degree of appreciation for linux. I would combine these later to make managing my home lab much, much easier. But, hey, you live and you learn. In this case I learned that I was demanding too much of my little Dell T100 server. I would need to build it bigger. After all, I was already at home. Downloading and setting up linux virtual machines with each application was challenging yet rewarding. Setting up servers manually and then installing the applications was an involved process; One that likely set the ground work for understanding the use case of containers. Being RHEL certified did afford me a large degree of appreciation for linux. I would combine these later to make managing my home lab much, much easier. But, hey, you live and you learn. In this case I learned that I was demanding too much of my little Dell T100 server. I would need to build it bigger. After all, I was already at home.
@ -41,13 +47,13 @@ Downloading and setting up linux virtual machines with each application was chal
Ebay, is a great website. You can find anything from car parts to an ice tea maker. They also sell things from China. Did you know you could buy server parts from Ebay? I built a dual processor server. Guess how much each processor was? $5. And the RAM(Memory)? $7. Just to put that in perspective, *new* processors were *hundreds* of dollars, sometimes even thousands. Ebay enabled me build an affordable home lab server. It was great while it lasted..... Ebay, is a great website. You can find anything from car parts to an ice tea maker. They also sell things from China. Did you know you could buy server parts from Ebay? I built a dual processor server. Guess how much each processor was? $5. And the RAM(Memory)? $7. Just to put that in perspective, *new* processors were *hundreds* of dollars, sometimes even thousands. Ebay enabled me build an affordable home lab server. It was great while it lasted.....
### 15 amp circuit breaker ### 15 amp circuit breaker
Did you know, in America, there are two typical types of circuits run in residential rooms? Me either! For example, your bedroom likely has several outlets however in most cases they all are sharing the same power connection or circuit. These circuits have a maximum amount of power they can safely pull before the safety switch or circuit breaker will "trip". I learned this the hard way. You see, I lived my grandparents at the time and my grandfather needed the house warmer to stay healthy and in a good mood. So my grandmother and I never raised the temperature. But since we live in Texas, I needed something to cool down my room. I was in the middle of an Overwatch gaming session and all of the sudden the pc shuts off. I new instantly the circuit breaker tripped because the AC shutoff too. I ran over to the circuit panel, slapped the breaker on and ran right back to my game. Booted the PC and get back in game as quickly as possible. Trips again. Turn it back on. I repeat this business another time before I give up. A gaming PC, a couple of servers and an air conditioner draw a lot of power. When all three are running on the same circuit, it can cause it to trip. I find out later the circuit in my room is a 15 amp breaker, instead of a 20! At least I know now. I go to watch a movie on Plex and I notice plex isn't loading. I walk over to the servers and power them on. The Dell T100 works just fine. My custom server, won't turn on! Panic sets in. Did you know, in America, there are two typical types of circuits run in residential rooms? Me either! For example, your bedroom likely has several outlets however in most cases they all are sharing the same power connection or circuit. These circuits have a maximum amount of power they can safely pull before the safety switch or circuit breaker will "trip". I learned this the hard way. You see, I lived my grandparents at the time and my grandfather needed the house warmer to stay healthy and in a good mood. So my grandmother and I never raised the temperature. But since we live in Texas, I needed something to cool down my room. I was in the middle of an Overwatch gaming session and all of the sudden the pc shuts off. I new instantly the circuit breaker tripped because the AC shutoff too. I ran over to the circuit panel, slapped the breaker on and ran right back to my game. Booted the PC and get back in game as quickly as possible. Trips again. Turn it back on. I repeat this business another time before I give up. A gaming PC, a couple of servers and an air conditioner draw a lot of power. When all three are running on the same circuit, it can cause it to trip. I find out later the circuit in my room is a 15 amp breaker, instead of a 20! At least I know now. I go to watch a movie on Plex and I notice plex isn't loading. I walk over to the servers and power them on. The Dell T100 works just fine. My custom server, won't turn on! Panic sets in.
To be continued.... ### Troubleshooting insanity
What on God's green earth is going on? The server's fans are spinning, but I am not getting any video output. I open the case
{/* {/*
### Troubleshooting insanity
### The Need to Concede ### The Need to Concede
### Light at the end of the tunnel ### Light at the end of the tunnel
*/} */}

View File

@ -0,0 +1,21 @@
---
title: 'Can I take a lightsaber on Southwest Airlines?'
date: '2024-11-12'
lastmod: '2024-11-13'
tags: ['Disney', 'guide']
draft: false
summary: 'How to take a lightsaber on an airplane.'
#images: ['/static/images/', '']
#authors: ['default']
# layout: PostLayout # PostLayout, PostSimple and PostBanner
#canonicalUrl: https://jonb.io/blog/the-url-here
---
![GalaxysEdge](https://cdn1.parksmedia.wdprapps.disney.com/resize/mwImage/1/900/360/90/media/disneyparks_v0100/1/media/star-wars-galaxys-edge/courtyard-wide-galaxys-edge-5x2-1.jpg)
In short, yes you can but you have to break it down. I recently went to Disneyland and enjoyed the experience at [Savi's workshop](https://disneyland.disney.go.com/shops/disneyland/savis-workshop-handbuilt-lightsabers/). On my way out they handed me a long slender case for my lightsaber. Fast forward a few days and my wife and I are packing for the return trip home. I google it and find [others](https://www.reddit.com/r/GalaxysEdge/comments/u3vqxz/how_do_you_guys_get_your_lightsabers_onto_planes/) were able to take their lightsabers on the plane just fine as a personal item. When I get to the LAX airport I am quickly told that I would have to check in my lightsaber since their policy doesn't allow them to be stowed overhead anymore. I wait to see if I will be told a second time I would have to check it in and sure enough, someone spots my carrying case and mentions to the gentleman that is helping my I would have to check it in. I mention to the gentleman I can break it down and put it in my backpack.
"You can do that?" He says surprised.
"Yeah, the hilt and the blade detach." I say calmly. "I'll do it in front of you..." It takes my about 30 seconds to disassemble it and shove the carrying case into my backpack and I leave the blade sticking out.
I was able to successfully move through TSA as their [policy](https://www.tsa.gov/travel/security-screening/whatcanibring/items/light-saber#:~:text=Sadly%2C%20the%20technology%20doesn't,carry%2Don%20or%20checked%20bag.) has no restrictions on lightsabers.

View File

@ -0,0 +1,30 @@
---
title: 'Introducing Melis Sweet&Simple'
date: '2024-11-14'
#lastmod: '202year-month-day'
tags: ['Art', 'store', 'Melis Sweet&Simple']
draft: false
summary: 'Elevate your Space with Bespoke Handcrafted Art from our Store that is Super Sweet and Simple.'
images: ['','','']
authors: ['default','meli']
layout: PostLayout # PostLayout, PostSimple and PostBanner
#canonicalUrl: https://jonb.io/blog/the-url-here
---
## Meli's Sweet&Simple
> Elevate your Space with Bespoke Handcrafted Art from our Store that is Super Sweet and Simple.
[Check it out!](https://melisweetsimple.jonb.io/)
<div className="-mx-2 flex flex-wrap overflow-hidden xl:-mx-2">
<div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
![walle](https://melisweetsimple.jonb.io/cdn/shop/files/FullSizeRender.heic?v=1730088140&width=2200)
</div>
<div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
![walleclose](https://melisweetsimple.jonb.io/cdn/shop/files/FullSizeRender_4297464f-1fe2-4809-9694-72058873bed8.heic?v=1730088140&width=2200)
</div>
<div className="my-1 w-full overflow-hidden px-2 xl:my-1 xl:w-1/2 xl:px-2">
![bird](https://melisweetsimple.jonb.io/cdn/shop/files/A_Whirlwind_6713f0cd-3ed1-4e75-a825-504ad1c88e66.png?v=1729026172&width=2048)
</div>
</div>

View File

@ -1,6 +1,7 @@
--- ---
title: Qbitmaid title: Qbitmaid
date: '2024-11-3' date: '2024-11-3'
lastmod: '2024-11-14'
tags: ['python', 'projects', 'code'] tags: ['python', 'projects', 'code']
draft: true draft: true
summary: How I used python to keep my torrents in check summary: How I used python to keep my torrents in check
@ -8,4 +9,60 @@ layout: PostBanner
images: ['https://s3.jonb.io/cdn/projects/qbitmaid.jpg'] images: ['https://s3.jonb.io/cdn/projects/qbitmaid.jpg']
--- ---
[Source Code](https://git.jonb.io/jblu/qbit-maid) ### qbit-maid
Development [^1] of qbitmaid was over the course of several months. At first, the project was called qbit-clean and didn't have all the features the project has now. The issue was mainly with my download cache in unraid being filled with torrents I no longer needed to seed[^2]. When I would get a notification from the server that the download cache was 95% full I would have to manually go to [qbittorrent](https://www.qbittorrent.org/), sort the torrents by age and remove the ones older than two weeks avoiding torrents I wanted to keep.
![qbittorrent](https://www.qbittorrent.org/img/qb_banner.webp)
This was tedious. Very tedious. So I went off to do more work just to avoid a little.
`qbitmaid.py`[^3]
```python
...
class Qbt:
def __init__(self):
"""Main object, should be calling functions from qlist.py, qlogging.py and qprocess.py"""
...
#logging in
try:
self.tl.info('Connecting to host.')
self.qbt_client.auth_log_in()
self.tl.info('Connected.')
except qbittorrentapi.APIError as e:
self.tl.exception(e)
self.po.send_message(e, title="qbit-maid API ERROR")
# Pulling all torrent data
self.torrent_list = self.qbt_client.torrents_info()
#Main process block
if self.use_log:
list_qbit_api_info(self)
list_first_tor(self)
debug_torrent_list(self)
build_tor_list(self)
process_counts(self)
if self.use_log:
torrent_count(self)
tor_processor(self)
if self.use_log:
print_processor(self)
if self.delete_torrents:
tor_delete(self)
self.et = datetime.datetime.now()
get_script_runtime(self)
if self.use_pushover:
tor_notify_summary(self)
if self.use_apprise:
tor_notify_apprise(self, r, apprise_notify)
if self.use_healthcheck:
send_ping(self, r, self.healthcheck_url)
# Run
if __name__== "__main__":
Qbt()
```
This is the main file that glues the project together. This was my first project where I heavily
[^1]: The Source Code can be found [here][source-code].
[^2]: Private trackers require you to seed a torrent for a period of time. In my case, I have to seed for about 2 weeks or to a ratio of 1.
[^3]: Code has been removed for examples in this article.
[source-code]: https://git.jonb.io/jblu/qbit-maid

View File

@ -1,8 +1,8 @@
/** @type {import("pliny/config").PlinyConfig } */ /** @type {import("pliny/config").PlinyConfig } */
const siteMetadata = { const siteMetadata = {
title: 'JonB.io', title: 'Joyful Fixations',
author: 'Jonathan Branan', author: 'Jonathan Branan',
headerTitle: 'JonB.io', headerTitle: 'Joyful Fixations',
description: "Thought's from someone with an internet connection.", description: "Thought's from someone with an internet connection.",
language: 'en-us', language: 'en-us',
theme: 'system', // system, dark or light theme: 'system', // system, dark or light
@ -23,7 +23,7 @@ const siteMetadata = {
// medium: 'https://medium.com', // medium: 'https://medium.com',
locale: 'en-US', locale: 'en-US',
// set to true if you want a navbar fixed to the top // set to true if you want a navbar fixed to the top
stickyNav: false, stickyNav: true,
analytics: { analytics: {
// If you want to use an analytics provider you have to add it to the // If you want to use an analytics provider you have to add it to the
// content security policy in the `next.config.js` file. // content security policy in the `next.config.js` file.
@ -51,14 +51,14 @@ const siteMetadata = {
newsletter: { newsletter: {
// supports mailchimp, buttondown, convertkit, klaviyo, revue, emailoctopus, beehive // supports mailchimp, buttondown, convertkit, klaviyo, revue, emailoctopus, beehive
// Please add your .env file and modify it according to your selection // Please add your .env file and modify it according to your selection
provider: 'emailoctopus', provider: '',
}, },
comments: { comments: {
// If you want to use an analytics provider you have to add it to the // If you want to use an analytics provider you have to add it to the
// content security policy in the `next.config.js` file. // content security policy in the `next.config.js` file.
// Select a provider and use the environment variables associated to it // Select a provider and use the environment variables associated to it
// https://vercel.com/docs/environment-variables // https://vercel.com/docs/environment-variables
provider: 'giscus', // supported providers: giscus, utterances, disqus provider: '', // supported providers: giscus, utterances, disqus
giscusConfig: { giscusConfig: {
// Visit the link below, and follow the steps in the 'configuration' section // Visit the link below, and follow the steps in the 'configuration' section
// https://giscus.app/ // https://giscus.app/

View File

@ -10,7 +10,7 @@ const ContentSecurityPolicy = `
script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app analytics.umami.is; script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app analytics.umami.is;
style-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
img-src * blob: data:; img-src * blob: data:;
media-src s3.jonb.io*; media-src s3.jonb.io* melisweetsimple.jonb.io*;
connect-src *; connect-src *;
font-src 'self'; font-src 'self';
frame-src giscus.app frame-src giscus.app
@ -83,6 +83,12 @@ module.exports = () => {
port: '', port: '',
pathname: '/cdn/**', pathname: '/cdn/**',
}, },
{
protocol: 'https',
hostname: 'melisweetsimple.jonb.io',
port: '',
pathname: '/**',
},
], ],
unoptimized, unoptimized,
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB