How To Set CPU Affinity for OBS Studio 64bit

Please reference this thread on how to generate the hexadecimal for the affinity command: https://www.eightforums.com/threads/cpu-affinity-shortcut-for-a-program-create-in-windows.40339/

I have a 16 core (i9 9900k), my hexadecimal is f (CPU0, CPU1, CPU2, CPU3)

The standard recommendation is to create a desktop shortcut… but there is an issue with this I mention below.

C:\Windows\System32\cmd.exe /c start “OBS Studio (64bit)” /affinity F “C:\Program Files\obs-studio\bin\64bit\obs64.exe”

When I open the shortcut, I get OBS gives me two error prompts

“Failed to find locale/en-US.ini”
“Failed to load locale”

I’ve noticed other forum discussions where people suggesting to cd to the OBS Studio directory. They were using a batch file. I opened up notepad and saved a file to my desktop called “obs.bat” and inserted the 2 lines below:

cd “C:\Program Files\obs-studio\bin\64bit\”
C:\Windows\System32\cmd.exe /c start “OBS Studio” /affinity F “C:\Program Files\obs-studio\bin\64bit\obs64.exe”

Now, I’m not sure how well optimize this will run… I’m streaming single PC, 720p at 60fps. I’d like to bump it to 1080p 60fps, however I don’t want to impact my game FPS or have OBS take a performance hit either.

Give this a try and let me know in the comments below how well it performs!

Read More

Caught The Raspberry Pi Bug!

I’ve recently caught the Raspberry Pi bug when I walked into Fry’s Electronics and started looking at all the awesome “Maker” gadgets on sale. I have always wanted to pick up a Pi and find a purpose for one in the household, and I’ve recently fallen in love with Raspbian and Kali Linux.

Photo Credit Brennen Bearnes

My first Raspberry Pi 3 Model B I picked up at Fry’s electronics came bundled with a breadboard, LED lights, and basic resistors for learning. Unfortunately the documentation that’s supposed to be coupled with the kit wasn’t the best. I might revisit this in the future after finding the “Freenove RFID Starter Kit” with a link to a fairly up-to-date Github repository with thorough documentation.

Currently I am using the Raspberry Pi as a motivational piece of hardware to keep tinkering away with Linux based operating systems. I am currently using both Raspbian / Debian and Kali Linux on a single Pi. At the moment, I am only using the Pi as a sandbox I can easily SSH or VPN into and not have to worry about juggling VM’s locally. I also want to continue working with the hardware to get into more advanced adventures like setting up security cameras, lasers, perhaps load Docker onto a Pi!

With the announcement of Raspberry Pi 3+ I decided to purchase second board and have begin thinking about what I could possibly do with two… or more! I certainly would like to be apart of the #MakerRevolution!

Read More

Mendix On AWS

Provisioning a Mendix server instance on AWS EC2 we will use the base Amazon AMI image (flavor of CentOS).

Launch AWS EC2 Instance

$ sudo yum update

Installing Mendix Server/Tools on CentOS

Add additional repo location mendix.repo

$ sudo vi /etc/yum.repos.d/example.repo

[mendix]
name=Mendix
baseurl=”https://packages.mendix.com/platform/rpm/”
gpgcheck=0

$ sudo yum install m2ee-tools

Oracle Java JRE 8

JRE 8 is required for Mendix 6 and above. Below is the commands to grab linux-x64. Reference the link below to the Oracle downloads page for latest version.

sudo su

$ cd ~/

$ wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” \ “http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jre-8u151-linux-x64.rpm”

Perform localinstall

$ sudo yum localinstall jre-8u151-linux-x64.rpm

Citation: https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Python Requirements

Check version

$ sudo su

# python --version
# pip install httplib2
Confirm
# pip list

Examples of m2ee config files are located at: /usr/share/doc/m2ee-tools-0.5.11.4/examples

Deployment Location

It’s highly recommended to create a separate user per mendix application you want to run on the application server. adduser example on m2ee-tools documentation does not have the same flags. –disabled-password and –gecos citation: https://github.com/mendix/m2ee-tools/blob/develop/doc/install-2.md

$ sudo adduser myfirstappz

Create filesystem location for the Mendix app

$ sudo mkdir -p /srv/mendix/myfirstappz
$ cd /srv/mendix/myfirstappz
$ sudo mkdir runtimes/ web/ model/ data/ data/database/ data/files/ data/model-upload/ data/tmp/
$ sudo chown myfirstappz:myfirstappz * -R
$ sudo chmod 700 model/ data/
$ sudo tree

AWS issue, this file structure methodology will not scale, need to consider other options on how to redeploy this in a stateless matter.

Configuring The Application

Going through the documentation on m2ee-tools, notes below. Note: might have to login as the app user (myapp) or root due to permissions https://github.com/mendix/m2ee-tools/blob/develop/doc/configure.md

Copy & Configure m2ee.yaml

$ cd /usr/share/doc/m2ee-tools-0.5.11.4/examples
$ mkdir ~/.m2ee
$ cp user-specific-m2ee.yaml ~/.m2ee/m2ee.yaml
$ sudo vi ~/.m2ee/m2ee.yaml

Config for m2ee goes in: ~/.m2ee/m2ee.yaml

Configuring NGINX

example config provided, lacks setting up nginix for this scenario.
https://github.com/mendix/m2ee-tools/blob/develop/doc/nginx.md

aws ubuntu example:
https://www.nginx.com/blog/setting-up-nginx/

$ sudo yum update
$ sudo yum install -y nginx
$ sudo service nginx start

example: http://ec2-34-212-160-182.us-west-2.compute.amazonaws.com/

configure nginx for myfirstappz

$ sudo vi /etc/nginx/nginx.conf

Set the Server->root to /srv/mendix/myfirstappz/web/

$ sudo nginx -s reload

Deploy Mendix App

Example MDA file on s3: https://s3-us-west-2.amazonaws.com/agents.exprealty.com/mda/mendixtest.mda

project location:

$ su myfirstappz myfirstappz@ip $ cd /srv/mendix/myfirstappz/data/model-upload
myfirstappz@ip $ wget https://s3-us-west-2.amazonaws.com/agents.exprealty.com/mda/mendixtest.mda

Launch m2ee and unpack the mda file

myfirstappz@ip $ m2ee
unpack mendixtext.mda

Run Mendix App For First Time

$ su myfirstappz
myfirstappz@ip $ m2ee
download_runtime
start

Read More

Logo Concept: Code Sleep Shred

I figured that I’d publish this now. As you can tell, the blog is running the stock TwentyTen theme, which is great. I am not focusing on design right now, merely content! Below is the Code Sleep Shred logo content I brewed up in my mind.

This design is intended for t-shirts, which will eventually segway to buttons / stickers. Although, the swag would only be for personal promotion, I hope a few readers will indulge.

The Concept

Code, Sleep, Shred defines who I am. By day I code away at WordPress projects. By night I am tinkering with the latest distro’s on my servers or locally on uBuntu. Next thing you know, I’m shredding epic powder at local mountains. Note: the wildcard at the end of ./shred* – not only does shred represent my passionate obsession for snowboarding, it’s also an analogy for other types of shredding; shred on my skateboard, shred tires, shred papers, shred babies, etc.

The goal of CodeSleepShred.com is to present who I am. Regardless of my interests or who the reader is and why they ended up on my blog. If they find it resourceful under the #nerdcore categories, great! Although one might enjoy my personal interests.

Thank you for your time, and I hope you discover useful information from this blog.

Read More

Will The Next Macbook Air Have The Intel Ivy Bridge Processor?

With Intel’s latest announcement of 22nm 3-D transistors, the Ivy Bridge processor has been the talk of the blogosphere. In late 2010, the latest generation of Macbook Air released but never received an i-series chip. This June, what will be announced at Apple World Wide Developers Conference? We can speculate the new iPhone 5, or more realistically the iPhone 4G. Will Apple announce the next generation Macbook Air which utilizes an i-series chip? 32nm, 28nm, or 22nm technology? Will it be Sandy Bridge or Ivy Bridge?

One thing is for sure, I’ve been eyeballing this laptop for the past month. I think I will wait until June for any big announcement. I’d love to have the opportunity to load uBuntu 11.04 onto it for testing purposes. I’ll be camping at the local Mac store to get a hold of it!

Read More