Category Archives: Uncategorized

Work Core Needs

These points are what I use to gauge how I feel about my job.

  1. I see motion towards making terrible things less terrible.
  2. I feel recognized, valued, and that my work has meaning.
  3. My direct report is not an overbearing micromanaging jerk.
  4. The work environment is not that of a sweatshop.
  5. My pay is accurate, timely, fair, and my benefits are beneficial to my family.

I have noticed that when the truthy points dip below 60%, I start wondering what I am doing and how I can make changes to get back to 80%.

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.