Tag Archives: howto

.NET Core setup in Void

Here are the steps I did to get .NET core 8 setup on my Void Linux box.

$ wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
$ sudo ./dotnet-install.sh --channel 8.0$ 
$ sudo xbps-install vscode
$ sudo xbps-install nerd-fonts
$ sudo xbps-install font-emoji-one-color

$ dotnet new blazor -o BlazorApp
$ cd BlazorApp
$ dotnet watch

Now dotnet runs and the emojis render as expected:

ThenĀ  setup the prompt to be like Hanselmans post:

$ sudo xbps-install go
$ go install github.com/justjanne/powerline-go@latest

Then we install the Cascadia Font:

$ unzip CascadiaCode*.zip 
$ cd CasCadiaCode 
$ sudo mv *.ttf /usr/share/fonts/TTF/

Then modify the font settings in your terminal to use Cascadia and your prompt will look something like this :

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

 

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.