In the world of gaming, the right hardware can make all the difference. However, it’s a common misconception that creating a high-performance gaming rig requires a bottomless budget. That’s where building a custom gaming PC on a budget comes into play.
Continue reading Building a Custom Gaming PC on a Budget: Tips and TricksNothing to do this weekend? Here’s ideas for a weekend project.
There’s nothing worse
Build a Raspberry Pi Buggy – One of the milestones of hobby robotics is a vehicle that is controlled with a Raspberry Pi.
Build an air quality monitor – Great way to get started with Sensors and detecting the world around you.
How to Set Up a Safe and Free VPN on Android – You know to use a VPN on your computer over public wifi, but we should all be doing the same with our phones as well.
So try your hand at building something or just try and make your phone a little bit safer on the open internet.
-DH
Updating all your Docker images in one swoop.
I’ve been playing around with Docker a lot recently, and one thing that seems to be lacking is a way to update all of your downloaded images in an “apt-get upgrade” fashion. I know this isn’t usually needed in most cases, but in a home use case for Docker most of the time, you can upgrade everything in one go and not worry about it. So I wrote some quick one-line scripts in Bash and PowerShell that can be used to update all your docker images. Continue reading Updating all your Docker images in one swoop.
Running a Home Virtual Server – Part 2: Contemplating Containers
Ok, so it’s been awhile since I put up the last part. So long that I actually ended up looking at some other hypervisor options, and still ended up going with Proxmox. I’ve also made it slightly more robust by running two host machines in a cluster configuration. I not running many virtual machines right now, but the ones that I do run are mostly OpenVZ containers from TurnkeyLinux.org, which Proxmox has a built-in integration to download templates straight from them. There are also other OpenVZ templates from Proxmox for a few standard linux server OSes, but the Turnkey Linux ones seem better at being kept up to date. Below the fold is a short list of what I’m currently running and a few that I plan on setting up at some point. Continue reading Running a Home Virtual Server – Part 2: Contemplating Containers
Bash scripts based on running processes
At work, our ERP system is built on Oracle running on a clustered Linux (Red Hat Enterprise) environment. Since this is a high availability/failover setup the processes running our development databases can be on either server for any number of reasons. I wanted to make installing code a bit easier on the server so I made some bash scripts to partially automate the install for me. Not wanting to get errors when it tries to install code on the wrong server, I found this little command to determine if the database is running on a server and thus let the script go on with the install.
ps -U oracle -u oracle u | grep -q pmon_dev2
Lets break this down into each part. The first part, ps -U oracle -u oracle u
, gets the currently running processes running as “oracle” (first “-U” for real and second “-u” for effective ID) in a user-oriented format (last “u”). This is similar to an example in the MAN page for PS and I just replaced the usernames to fit my case. The pipe (“|”) takes the output from the left side, the PS command in this case, and uses it as input for the right side. The second part, grep -q pmon_dev2
, searches for “pmon_dev2” in the output from PS, the “-q” option suppresses output and exits successfully if any match is found.
So I just put this at the beginning of my script:
if ! ps -U oracle -u oracle u |grep -q pmon_dev2
then
echo "DEV2 not running"
exit 1
fi
This exits the script right away if the database isn’t running on the server. If it is, then the script goes on to get the latest code from source control run the code install and exit. If you can do this with no user input, then you can setup a CRON job to run the script to automatically get any updates.
[googleplusauthor]
We Interrupt Your Regular Broadcast to Bring You This Important Message.
After spending most of this week working with and debugging approximately 8,000 lines of PL/SQL contained in two packages, I want to mention “Refactoring” by Martin Fowler. It’s one of the few books I had to buy in college and have kept since then. If your code smells, clean it up… That is all.
Now back to your regularly scheduled programming.
[googleplusauthor]
I’m important enough for my own Google Doodle!
While I may not be the most famous person around (I’m still due about 14 and a half minutes), Google still thinks I’m important enough to make me my very own Google Doodle. Let’s just ignore the fact that they know my Birthday from Google+ and I’m always logged in to a Gmail or Google Calendar account… It’s my Doodle.
[googleplusauthor]