Category Archives: Uncategorized

running jellyfin via podman

Here are the quick and dirty step I do to update images, containers and run Jellyfin via Podman:

  • sudo podman ps # get container id
  • sudo podman stop #
  • sudo podman rm #
  • sudo podman images # get the image id
  • sudo podman rmi -f #
  • sudo podman run -d --cgroup-manager=systemd --volume /opt/jellyfin/config:/config --volume /opt/jellyfin/cache:/cache --volume /storage/videos/:/media --volume /storage/books:/books --volume /opt/zap2xml:/zap2xml --net=host --restart=unless-stopped --device /dev/dri/renderD128:/dev/dri/renderD128 --device /dev/dri/card0:/dev/dri/card0 jellyfin/jellyfin:unstable
  • sudo podman run -d --name zap2xml -v /opt/zap2xml:/data -e USERNAME=youremail@email.com -e PASSWORD=**password** -e OPT_ARGS="-I -D" -e XMLTV_FILENAME=xmltv.xml shuaiscott/zap2xml

 

10 lb Turkey, 5 lb Pot

One day a man was watching his wife prepare a turkey for the Thanksgiving feast. She got out her 5lb pot, reached for her 10lb turkey and immediately trimmed off half of the meat from the turkey. She then proceeded to forcibly stuff the turkey into the pot – meeting with resistance and having to lean into it to get that turkey to fit into that pot.

Curious the man asked “Why do you prepare the turkey this way?” to which his wife responded “Well it’s the way my mother does it and it’s the way I have always done it for 10 years now”.

The next year with a new grandchild the couple decide to spend Thanksgiving with her parents. The time comes and the man watches the grandmother get out the 5lb turkey and a 5lb pot proceed efficiently to put the turkey into the pot and put it into the oven. He asked why she taught her daughter differently which she responded “Oh the market was all out of 5lb turkeys that year so I got a 10lb one”.

Seek to understand why we are doing what we are doing, don’t assume the standard course is the best direction.

Running ASP.NET MVC via DNX on Ubuntu 15.10

My steps I did to get my ASP.NET MVC application I created on my Windows 10 box running on a Ubuntu 15.10 server.

Setup ASP.NET 5 on Ubuntu following this:
http://docs.asp.net/en/latest/publishing/linuxproduction.html
http://docs.asp.net/en/latest/getting-started/installing-on-linux.html

Update dnvm on windows:

dnvm updateself
dnvm upgrade -r coreclr

Fix the libicu for Ubuntu 15.10:

wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb
dpkg -i libicu52_52.1-8ubuntu0.2_amd64.deb

Say the web project is “WebApplication1” then console into that folder:

dnu publish
dnx web

Hit localhost and make sure the page load.

Copy the entire “WebApplication1” folder to linux box.
Restore the packages from the “WebApplication1” folder copied to the linux box:

dnu restore
dnx web

Enjoy!

Error With Pip and flask-bcrypt

I am playing around with Flask and I wanted to use the Bcrypt tool to encrypt my users passwords. So like all the other packages I attempted:

pip install flask-bcrypt

That however resulted in this rather unpleasant error:

  error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

  ----------------------------------------
  Failed building wheel for python-bcrypt

That of course sent me on a dizzying hunt for resolution. I got it working by editing the “msvc9_support.py” file to not use the registry and use just the path where I found vcvarsall.bat on my computer:

   productdir = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC" # Reg.get_value(key, "installdir")

Elegant? Eh probably not, Utility? perhaps. But it does work and after that I was able to install flask-bcrypt.

Blog Setup

Hopefully this will be a start of something new and exciting – or another thing for me to procrastinate about. I have tried several times before to blog consistently I just get, well, sidetracked.

My intention is to blog stuff that I don’t want to forget or stuff that I want to share. Most things I would expect to be of a technical nature but I suspect that sometimes I will want to post something for the ages to remember my wit and wisdom (read; me ranting about something inconsequential).

Enjoy!

Wheezy.web + Sublime Text

Part of being a developer is pushing yourself to learn and use something new. So I decided I would take a language I am familiar with and do MVC in it (as I do ASP.NET MVC in C# daily at work). I looked at several MVC frameworks for Python but decided upon Wheezy.web

After playing around with Sublime Text 3 for about two hours I decided to get a license; and frankly its rare I actually pay for something that there are many FOSS alternatives. Sublime Text 3 is just that good. Yes really, that good. Highly recommend you setup “Package Control” for Sublime Text it makes installing packages a breeze. I used this blog post and installed Anaconda for syntax completion.

Sublime Text 3
See I do support projects I use.

This is using the built-in “Sunburst” theme along with the “Dark” Sublime Text layout. It’s a thing of beauty. Here is my “User” config setup :

[js]
{
"color_scheme": "Packages/Color Scheme – Default/Sunburst.tmTheme",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"__pycache__"
],
"font_face": "Consolas",
"font_size": 12,
"ignored_packages":
[
"Vintage"
],
"indent_to_bracket": true,
"rulers":
[
79
],
"shift_tab_unindent": true,
"theme": "Soda Dark 3.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"wrap_width": 80
}
[/js]

Wheezy.web has some really impressive features for such a lean framework. This coupled with Mako templates makes for a great foundation for highly concurrent, high performance web projects.

So much hate.

I guess getting older sitting around watching and listening to people (especially on Facebook) is taking a toll on me. It’s difficult to sit and watch and listen to friends and relatives promote toxic behavior all in the vein of “Righteousness”. This rambling is my opinion (mixed with some King James bible quotes).

I was reminded of this today and thought it was awesome. “Judge not, and you will not be judged; condemn not, and you will not be condemned; forgive, and you will be forgiven” – Luke 6:37.

How great would it be if everyone realized we are all fallible, (“Do nothing from rivalry or conceit, but in humility count others more significant than yourselves.” Philip 2:3), and our love and respect for others is a reflection of who we really are.

The adherence to the “Golden Rule” shouldn’t be an elective – “So whatever you wish that others would do to you, do also to them” (Matthew 7:12). It should be mandatory, if you treat others not how you want others to treat you that makes you a hypocrite – and generally not a very endearing person to be with.

No matter your beliefs; some of us are Christians, some are Deists, some are Hindi, some are Jewish, some are Atheists. Everyone initially deserves being treated with respect; its that followup of how they respond to you which you can react (remember are you looking out of the bowl or is someone watching you from outside the bowl – your actions speak louder than your words). Initially don’t presume because they appear different than you that you are better than them – or nicer, or have more money, or whatever.

Try to remember this much. Your right to say whatever it is you think is right, and do whatever you think is right (obviously within legal limits) is equal to those rights of others. If you don’t think that equality exists – your effectively breaking the “Golden Rule”.

TL;DR; Be nice to others even when you don’t agree. No-one wants to deal with someone who intentionally wants to cause emotional damage. Everyone is fallible.

Why you should not shop at TigerDirect

On the hunt for a new TV during the 2013 Black Friday madness I saw that TigerDirect had a normally $499 TV for $299. Seemed a great deal and the convience of getting it shipped directly to my house wihout having to deal with waiting queues.

So I thought.

The first TV arrives, I gleefully unpack it and set it up – oh so shiny. Turn it on an experience a true “ah shit” moment. A crack in the lower right corner about 4″ in length. Sigh… So packed it up contacted TigerDirect got an RMA and sent it back. Another week I will wait for my exchange process.

The second TV arrives. I again with much excitement anticipate the elusive OOB experience and unpack the TV. But wait, the cords are not just right. They are not perfectly machine liked rolled together they are more like wrapped around themselves like someone put it together in haste. Humm. Oh well keep going I say to myserlf, ah, where is the remote. There isn’t a remote in the box. I must have missed it, turn the box over look under the packing thingies. Damn it! Moving my hand around the TV I realize there is only a single button as well – a power button. Well suffice to say its an experience trying to change the input and do the initial setup without a working remote. I ultimately was lucky enough to find a Uverse Remote Code that controls the TV just enough to work the menus and toggle power.

So back to my computer to contact TigerDirect thinking (obviously foolishly) that I would just ask them to send me a remote to go with this obviously returned (most retailers call that sort of merchandise an “Open Item”) TV.

The online chat button brings this conversation;

Please wait while we find an agent to assist you…
All agents are currently busy. Please stand by.
You have been connected to Relvin Borbolla.
Relvin Borbolla: Thank you for contacting us today, how may I assist you?
Steven Hildreth: Hello I ordered a TV, it came it was cracked. I got RMA sent it back received second TV – it was an open item and does not have a remote.
Steven Hildreth: I don’t think its fair that the second TV sent to me is an Open Item, I didn’t order an Open Item and I don’t know why its Ok to send an Open Item as a replaced for a defective item.
Steven Hildreth: It’s nearly impossible to use this TV without a remote.
Relvin Borbolla: Please contact the manufacturer directly at (800) 701-0680 for further assistance in order to get a remote.
Relvin Borbolla: We apologize for any inconvenience.
Steven Hildreth: Uhm wait, the item sent to me from TigerDirect is a return of someone else, the manufacturer isn’t going to help me as its not their issue.
Steven Hildreth: Its TigerDirect’s problem, as they sent me the TV without a remote.
Steven Hildreth: The second TV was clearly a return as the cords were not in original packages.
Relvin Borbolla: So you want to return it for a replacement again?
Relvin Borbolla: Unfortunately, we do not carry the remote for this item.
Relvin Borbolla: That is why you need to contact the manufacturer for the assistance.
Steven Hildreth: So I have two options; 1. Send the TV back to TigerDirect a second time to get a third TV that has a remote or 2. Purchase a TV remote (which should be included with the TV and would be if TigerDirect wasn’t sending out returned incomplete merchandise). Is this correct?
Relvin Borbolla: We can still process a return for an incomplete item for a replacement.
Relvin Borbolla: You can contact first the manufacturer in order to get a remote on
this item so you cannot return the item and wait for the replacement in 2-3 days.
Relvin Borbolla: Is there anything else I can assist you with?
Steven Hildreth: No you have helped me realize why I should not
solicit TigerDirect in the future. I will purchase a replacement remote on my own. Good day.

So to recap; TigerDirect thinks its Ok for them to replace a defective item with an returned (read: used, returned, “Open Item”) and seemingly an incomplete returned item at that. Furthermore its also Ok that when the customer calls asking for the missing pieces of the item to tell them to contact the manufacturer or return the item again (how lucky do you feel?).

With the likes of Newegg, Amazon and Best Buy I personally will not bother TigerDirect again to have to deal with seemingly unreasonable expectations with customers.