In the past I have had some problems with shared hosting services mainly due to the speed and limited functionality that was offered through their control panel interfaces. This one in particular used that famous cPanel garbage that got popular when most administrators didn’t know a lick about using Linux. A few years ago there was this whole “cloud” term that was passed around like the town slut. What this basically means is distributed, always-on, fault-tolerant, all those terms that your rockstar network engineer has thrown at you but really doesn’t know anything about. What it gives us neophyte administrators is a cheap, virtual Linux server that we can configure to our own liking.
This meant that I was no longer tethered to the limitations of the infrastructure provided by the website. My previous host got swallowed up by Rackspace and went to shit. A few months ago someone told me about Linnode as it is a local Jersey business, so I started to check them out, and finally bit the bullet today and started the migration process from my old host to this brand spanking-new piece of iron. It took me about an hour and a half to get the blog post that you’re reading up and going. Not too shabby.
I’d like to reminisce for a moment: I remember way back when I had to work with someone that was paying hundreds of dollars a month for hosting to get ten megabytes and a subdomain for their account to start a video game portal in the late nineties. These bastards were being charged, by the subdomain, some absurd amount by the web host to set up a few DNS records. Now, mind you, it took sometimes several days for DNS to propagate across the Internet back then. I was able to accomplish this feat in the matter of about fifteen minutes, and ironically enough, the last machine that I had access to to actually receive the DNS update was my previous virtual host. Bastards.
So if you’re going to take the leap to virtual cloud hosting, give Jersey some love and set it up on Linnode.com, and by clicking on that link you’ll give me a free credit for $20 if you sign up for three months. Not going to lie, I completely wrote this post to hopefully get two or three of you poor schmucks to get me a month of free hosting. But hell, I’m going to be posting more set up information regarding my LAMP stack in the upcoming day or so. Free consulting as far as I am concerned.
As always, go fuck yourself.

I do not plan to make a frequent habit of this, but I had to try out the WordPress application for Android. The last time I remember using the mobile version was posting via an email sent to a special address that was set up for the blog. That particular medium for blogging wasn’t half bad, but I found that formatting was less than stellar.
You can often tell that I do not go back and edit ny posts unless there is some kind of obvious oversight. Previously, I had cats like Daniel Boston and Kenny Katzgrau for that jazz, it wasn’t my job in those days, and I don’t really care for it now. Kudos to those two for taking my midnight ramblings and making them legible for newspaper print.
Lately I have been trying to get back to my roots as a writer, and entrepreneur, because I feel connected much more to those industries than where I see myself now. Ideally they would both intersect, with some code and software involved, but sometimes that’s not what is in the cards for you.
I would love to be able to provide wisdom to today’s youth with the coined phrase of “take the road less travelled,” but I prefer to tell them to make money, get drunk, and party like a fucking rockstar. If anyone complains, screw them, you only live once, and be sure to write their asses off when you make your fortune.
Just remember that your fortune and legacy doesn’t always need to be valued by your monetary worth.
Sent from my Android.
When I was younger I spent a year or so not-so-admirably trying to learn how to play the saxophone. Like many people at that ripe age there were many other things on our mind: playing with friends outside, video games, and basically anything other than the prescribed homework-esque music. I can’t remember actually ever understanding music, like most things in my life I think I probably guessed and slid through the class, but for some time I have always wanted to learn how to play music. I don’t want to study music, in fact, I hate looking at it. It hurts my brain much in the same way that mathematics does, but that does not mean that I lack respect for music (and mathematics, for that matter).
When I first touched Guitar Hero I thought it was very fun. My roommate and I spent hours upon hours staying up, not doing our class work, and battling each other with the game rifts. But it wasn’t like playing a real guitar. I’ve strummed my digits, fumbled with the frets, but was never able to spend the time to actually learn how to play. This is where Rocksmith enters the picture.
This past Thanksgiving I drove down to Virgina to spend it with an old friend. We headed out that night and checked out Best Buy in hopes to figure out if we wanted to spend our hard earned money on some Black Friday swag when we first ran across Rocksmith. If that store in Reston, VA wasn’t able to find an Xbox 360 controller I probably wouldn’t have taken the red pill. My buddy, Drew, has been a guitar player for years and he was quite impressed with the game. Rocksmith is what Guitar Hero should have been. You plug in your guitar to the console, and strum along to the song with the actual notes, thereby learning how to play the song on the guitar. It is genius. Futhermore, Rocksmith includes video tutorials, a digital amp, and downloadable content to keep you rocking along for perpetually.
The game tracks your progress and will dynamically make the songs harder when your skill level increases (or easier when it decreases). This means that you will always be challenged, but not enough to get discouraged and put the instrument down when you can’t feel that you accomplished something. Additional game modes allow you to master individual verses of the song, replay them at a slower speed, and even rock out to a friend that has purchased the game. Unfortunately, as far as we were able to tell, it does not include Xbox 360 (or Playstation Network) support for multiplayer, so your buddy has to actually come over to jam.
I’ve only been playing the game for a few days but I already know much, much more about playing the guitar than a did a few days ago. The obvious initial cost is a bit more steep than your normal video game if you don’t own a guitar, but there are two avenues you can go: the bundle that includes a guitar (PS3) [~$200]; just the game if you already have your axe (PS3).
Since Drew and I stumbled upon an awesome Gamestop sale on the game, we were able to get it for about $25 dollars off the retail price, which allowed me to save about $40 off the price of the bundle when I went to Guitar Center to buy the instrument. But obviously if you already have a guitar, or are able to purchase one second hand, it would still be cheaper just to get the game in the box. It should work with any six string guitar, and future downloadable content to the game promise a setting for bass rifts. This was my late birthday present to myself, and I’ve been enjoying it for a few days now. I hope you’re able to enjoy it, too!
For the past year or so I have been using nginx as a proxy in front of my Apache instances on the server that runs this blog, and a few other websites that I manage. The virtual machine itself is running an older LTS version of Ubuntu, and most of the applications on here are a traditional LAMP setup with a few C/C++ testing tools scattered around. For the most part it is operating as web server with a small work load. But as I’ve been adding a few more services running in the background I have noticed a little slowdown with WordPress.
There are some obvious advantages to this set up: Nginx can serve up all of the static content very, very quickly without having to send it down to the Apache instances to process. This frees up those daemons to only serve application logic, which in this case is the WordPress PHP application, but would work for nearly anything that you have set up with it. I will give you a quick example of the configuration that I have set up for this site.
This is the main configuration file for the Nginx application. Most of the commands here I have plucked from various tutorials across the internet, specifically dealing with the gzip settings, and as you can see there are a few connection and process related settings. These can all be tweaked at your desire, but I find that they work best on my low load cloud virtual server. The information to note here is the location of the proxy server (127.0.0.1:8080) that the requests will be sent to, as well as some folders for errors, logs, etc. These are all standard with the Nginx installation from aptitude and should be modified to suite you. Note the section where we include any scripts that are in /etc/nginx/sites-enabled/* which is similar to the set up of the Apache portion of the LAMP stack.
/etc/nginx/nginx.conf
user op; worker_processes 2; error_log logs/error.log warn; #error_log logs/error.log notice; #error_log logs/error.log info; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; gzip on; gzip_http_version 1.0; gzip_comp_level 2; gzip_min_length 1100; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; gzip_buffers 16 8k; gzip_disable "MSIE [1-6].(?!.*SV1)"; gzip_vary on; include /etc/nginx/sites-enabled/*; server { listen 80 default; access_log logs/host.access.log main; error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location / { include /etc/nginx/proxy.conf; proxy_pass http://127.0.0.1:8080; } } }
This configuration file sets up the particular domain inside of the Nginx proxy. It covers both the fully qualified domain name and the alias, and provides the root directory for serving up the static content. If there is content that you do not want to be served up (e.g. you have a public folder) make sure to point this only to your assets directory. We set up the path for logs to be written to (you’ll have to mkdir -p those directories) as well. The real gem here is the regular expression that specifies what static content will not get fielded off to the apache daemons. Obviously you can make any corrections here that you see fit. When you are done set up a symbolic link in /etc/nginx/sites-enabled/
/etc/nginx/sites-available/thoughtlessbanter.com
server { server_name www.thoughtlessbanter.com thoughtlessbanter.com; root /path/to/thoughtlessbanter.com/; access_log /var/log/nginx/thoughtlessbanter.com/access.log; error_log /var/log/nginx/thoughtlessbanter.com/error.log warn; location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ { access_log off; expires 30d; } location / { include /etc/nginx/proxy.conf; proxy_pass http://127.0.0.1:8080; } }
This little tidbit is necessary to send over the header information from the HTTP client to the Apache daemon. These proxy settings, with this configuration set up, will affect every single web request, so be careful with what you modify here. There are additional parameters involving the maximum size of a payload, send, connect, and read timeouts, etc. These can all be looked up with a quick Google search and modified freely.
/etc/nginx/proxy.conf
proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Last you’ll need to modify your virtual host for all of the websites to now accept the connection on the new port, 8080, which is were Nginx will proxy the requests to. Be sure to set the server alias for both the fully qualified domain, and the shortened one. I am not an Apache configuration guru here, so some of the other options may not be applicable, but they seem to do the job for me. Most of my domains are further configured appropriately in the .htaccess in the document root directory.
/etc/apache2/sites-available/thoughtlessbanter.com
<VirtualHost *:8080> ServerAdmin jb@thunkbrightly.com ServerName thoughtlessbanter.com ServerAlias www.thoughtlessbanter.com DocumentRoot /path/to/thoughtlessbanter.com <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /path/to/thoughtlessbanter.com> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/thoughtlessbanter.com-error.log CustomLog /var/log/apache2/access.log combined </VirtualHost>
When you have made all of the changes feel free to restart the services and test your website. Once all the instances are bounced you should be able to point the browser to the location and still bring up your website. If you check the logs located in /var/log/nginx/
Let me know what you think. I’m sure I’ve made a few mistakes.
The last time that I touched C# was about four years ago. I had just finished my first semester at NJIT as a sophomore transfer, and I took a summer course with Daniel Boston where we developed a payment gateway for the Vector newspaper. Since neither of us had ever used any of the .NET languages, and one of our requirements was that this had to run on a Windows server, we figured it would be a very good learning experience. We taught ourselves the ASP.NET and C# syntax in only six weeks, working tirelessly during the nights over Skype (we both had summer jobs), to complete our project on time and present it to the class. Needless to say, we succeeded, but got burned a few times by how much a pain in the ass ASP.NET was back then.
A couple of weeks ago I had the opportunity to get familiar with one of our developer tools at my day job, which is written with C# and WPF, and I have to say that I am quite impressed. Microsoft has identified a key point in the application development pipeline, and as far as I can tell, made a valiant attempt at solving it: the user interface should not be tied directly to the application (business) logic, and using WPF with XAML you give designers the ability to modify the layout of the application through the use of themes. This approach is very similar to how the web development process, through the use of HTML and CSS, allows for web designers to not affect the application logic that sits in the “backend.”
I haven’t yet spent enough time with WPF 4.0, but from what I can tell this is the way to be developing all future Windows-based applications. After a little searching it unfortunately looks like that the team behind Mono will not be supporting WPF in the near future. It would be nice to be able to use XAML and C# to quickly develop cross-platform applications which would use the native API for each platform. That means Aqua for Windows (Vista/7), Cocoa for Mac OS X and either Gnome or KDE for Linux/Solaris/Unix. Not to mention each time that I get a chance to use Visual Studio I feel like any other software development IDE pales in comparison, but I have felt that way for awhile now.
If you’re interested in getting your hands into WPF 4.0, XAML, and the whole caboodle, head on over to Amazon.com and pick up Adam Nathan’s WPF 4: Unleashed which is the first programming book that I have seen that has high quality, full color, code samples. You won’t be disappointed!
A few months ago I got an apartment on my own, without a roommate, and found myself in quite a pickle: the only furniture that I owned as a living room coffee set, a few chairs that I acquired from the Zinkk Inc office, and some randomly assorted Ikea pieces. After putting out my desperate (not really) call to family (and friends) I started to search around for some local bargins because let’s face it, why the fuck was I going to spend a lot of money on things to sit on in an apartment that I am barely at?
I did a little searching on Etsy and found there were a couple of desks that I fancied, some badgering and trips to the local hardware store later I had a plan for a desk. I consider myself a very minimalistic person when it comes to furniture, sure it needs to look good, but ultimately all I care about is that it gets the fucking job done.
The choice was to build it with three eight food pieces of pine, and stain it to match as closely as possible to my living room set, since the desk would be at the center of the situation going on up in there. The legs were built from steel piping which was linked together with various elbows, unions, and fasteners, after being sanded down and painted with some rustoleum. Three two-inch holes were cut into the back of the desk to throw down some computer wires to allow the table to be flush up against the wall. A cross bar the length of the table would be used for stability.
After the success of the table I started to get drunk with power, and began dreaming up various shelving units, platform beds, that can be relatively easily be made with wood, steel piping, and a little bit of elbow grease. But before filling out an application for the Home Depot contracter’s credit card there was something else that I wanted to try to get done with the scrap I had lying around.
A little over a year ago I sniped an auction on eBay and procured a traffic light for relatively cheap. At one point I was going to hack it with an ardunio unit, but after moving once or twice I thought it would be a lot better to turn this bad boy into a lamp. The only problem is that it weighs quite a considerable amount, and the stand itself would have to be quite beefy. While thinking out the table design the lamp stand was a natural second choice for the next project.
The planning stages are still underway, but I figured it would be approached in the same fashion: going to the hardware store, looking for some cool shit to throw together, and beginning the sanding, painting and piping. The only difficultly here is obviously the whole electricity thing, but I am pretty sure that I got that covered.
Next up something to plop my fat ass down onto and watch Netflix, play some video games, and pound away at the keyboard on. A good buddy of mine suggested buying a LoveSac SuperSac which is essentially a memory foam bean bag chair. That’s right, a 100 pound, 6 foot wide, bean bag chair. It is damn comfortable. As you can tell, my choice of a chair caused a lot of commotion on that website called Facebook.
The chair is micro-leather, which really means fake fucking leather that they can sell at a premium but is much easier to clean, and came packed into several different packages. You literally had to tear open the packaging, toss around the memory foam, and stuff the casing with this burlap sack full of lumpy foam. It was a huge pain in the ass, but in the end proved to be an perfect addition to the man-cave.
It definitely pays to have a little creativity (and a father with a garage full of power tools) and an open mind when you are looking at furnishing an apartment. This type of furniture probably does not suit everyone, but I have a particular taste which I think is highlighted quite well with the steel piping and stained wood finish. If the lamp goes as well as I hope my future projects will likely include a shelving unit for the kitchen to extend my “pantry,” and I’ve already started looking at new ways to improve on the design of table (union screw locks, larger lengths of pipe). If anyone is interested I’m available for hire provided you have some beer and food.
A few days ago to the sweet, sweet melodies of Billy Joel, I woke up in the wee hours of the morning to code up a very crude C web server. Of course, I tried to pass it off as a C++ implementation, but in reality I was pulling the wool over your eyes – the only C++ was used to build error messages, and the actual message to send down to the client. Not to mention it was a very crude, basic, implementation of socket handling in C. Nothing fancy.
Yesterday I was talking with some kind folks at the re:build 2011 conference in Indianapolis, and it got me to thinking that there aren’t enough examples of C++ applications talking to the web. You know, actual C++, using the boost libraries and what not. So this morning, after grabbing my amazing breakfast burrito at Henry’s in downtown Indianapolis I scoured the Internet and re-wrote my example application in Boost.Asio.
The code is much simpler, straight forward, and just damned better to look at. As always it is up and available at my Github account for consumption. If you’re interested in seeing the actual difference in implementations than go no further than right here.
I have a few more ideas on web services written in C++, but that’s for another day. Let me know if you have any questions. As always, enjoy the code and report any bugs.






