This is a Cloud Server

September 28, 2011

New "Cloud" Server

I've recently switched over to hosting my sites on a Rackspace Cloud Server. I should save a lot of money on hosting. I have the 2nd configuration from the bottom, at about $0.03 per hour! It's sweet. The management console is awesome. My old host would only allow 10 subdomains across all of my domains, this management interface is just like, "limits? what's that?"

So I've got everything set up, after figuring out that CentOS automatically firewalls port 80, and everything's working. I'll get givit.me moved over tomorrow. Check out that site!! It's gonna be the bomb when everyone's posting their shit on there.

Cheaper for Baby's Sake

I'm moving to cheaper everything. Before I was just like "Meh... whatever" but Amanda and I are having a baby!! I have to save up some cash and lower my spending overall! We're due April 26th!! It's exciting!

Piano

Piano lessons are going good. I have bouts where I suck, but right now I'm getting pretty good, and I'm understanding the stuff he's teaching me. I'm going the jazz route. He wants to have me be in the recital this year. He's a new teacher, and I've been taking lessons for 3 years and it was never even suggested that I be in the recital... I don't know... I would be a nervous wreck the night before.

Comments

Website is Back Up

July 17, 2011

As you can see.  Very simple, no images, but the bells and whistles are there.  I wrote it up over a weekend, probably 6-7 hours total, converting the original mysql database over to mongodb, and writing some quick code in node.js.

There's only one table, posts, so it was easy.  There is a mechanism for me to edit the posts, and add new ones, but it's very crude!

Take it easy. Peace.

Comments

I need to work on this site

August 26, 2010

But I want to test this thing out first:



Updates since last post: I'm engaged to be married to my love Amanda on 11/13/2010!!! I have an iPad, I fixed my lawn up a little, and I am golfing tomorrow and Saturday. Plus I play StarCraft II a lot with Zatko. Well, not enough.

Tags site news
Comments

Heading to Jamaica!

June 24, 2008

Zatko, Amanda, Jared, Kris, and some other dudes and gals, including parents, are going down to Jamaica tomorrow at 7:25 AM! We'll be arriving somewhere where a bus can take us to Sandals at Ocho Rios by bus presumably. We'll probably be at our hotel by 1pm hopefully. I have to be at the airport at about 4:30am officially, but might be getting there by 5am. There will be an butt ass ton of pictures when I get back. Probably on my facebook profile and I'll link them here. I'm long overdue for a vacation. Peace.

Tags site news
Comments

We make a cute couple

March 30, 2008

Don't we?

For the past two days my brothers and I have been working on my lawn. It's exhausting. It'll be awesome when it's done. I'll have pictures up in about a month.

Tags site news
Comments

Two new songs, Kodie looks funny

March 13, 2008

These two new songs could be said to be written for Kodie, since one was before I went to pick her up at the Vet, and the second one when I got her home and all fed (2 full cans of soft meaty dog food!).

The first one, a Mother Fing Jam in G, can be downloaded here. It shows why I love my new found experience of fingerpicking, and also hammering on two notes at the same time with two different fingers on two very different strings. You just have to put on headphones and listen to it to tell where I'm talking about. Otherwise, it's just I hear a rhythm in my head and play along.

The second one, Long Jam, here, starts off finding a rhythm to play along with, then plays around in D for a while.

Kodie got her whole bottom row of teeth pulled :( The front though, none of her big teeth. These looked real bad in the past week or so, and I noticed two of them, at least, were really loose. So they're all gone. She's fine though. They said in a few weeks, if I want I can go back to the hard food, if Kodie will eat that stuff still! I gave her some soft food, and it was like meat with gravy. Two full cans, and she just ate it up. She was starving so we'll see how she is tomorrow. If she's still excited about getting food, then I actually have to learn how to portion it for her! Usually when the bowl's empty I fill it and it won't be empty for about a day or so. She's very good about eating that food because she doesn't like it :) It's only when necessary. But I bet I could keep filling her bowl up with this soft, meaty, gravy covered food and she'll just keep eating it.

I watched the HBO show "In Treatment" tonight and really liked it. I was like "I should probably watch that show, it's on a couch, and there's no room for bad acting, so it's probably excellent or really shitty". Then as I was thinking that, it came on. It was probably an "On Next" thing. It's on HBO. It was excellent, I must say. Might watch it some more.

Comments

Dogs are the best

March 12, 2008

I was sick Monday and Tuesday, but when I went downstairs after two days of bed ridden disgustingness, I noticed my dog wasn't eating anything, hadn't eaten for two days. While I would have been flattered if she stopped eating because I was sick, I know they're smarter than that :P I tried to give her her favorite treat and she turned it down.

Today (Wed the 12th) I was fine on maybe taking one more day off to fully recover, but I had to get the dog to the Vet, and I might as well go to work after that. I was feeling like total garbage up until about 2:30, though, and then from about 3:15 onto the end of the day. Took Kodie to the Vet at 9 or shortly after, was in work by 9:45. I missed the phone calls from the Vet because this is how delirious I was all day: we're in sort of a lunch meeting at work, and I'm like "Hmm, if my phone goes off... blah blah, should I check to see if it's on? Nah it's fine"... 2:30 rolls around and I'm like "Man, they still haven't called me..." The office closes at 3 and opens again at 6. I check my pockets... no phone! No idea. It was in the car. I may have even been delirious about Kodie not eating for 2 days since I was totally out of it for 1. But just her energy level, it was soooo low, and if you know Kodie, you know she's nothing but energy most of the time. You *can* calm her down, but usually she does much more stupid and funny things when she's all crazy :)

It's like, of course Vets can say "Oh we have to check for everything" and charge you for it all... but it's not even that expensive. But you can tell that Kodie has some bad teeth and might not be eating because it hurts her. But the Vet's gonna do blood tests, spool tests, all this stuff, might as well. And you can't say "I think it's just because of her teeth", even though in the end you may be right... because us lay people don't know.

I know I can't say that because in my profession, it is also best to be thorough. I know sometimes I can see the answer WAAAY before I even begin looking into code, lots of times I can tell you the exact file the problem is in, and almost never can I tell you what line it's on. Sometimes I boggle my own mind on how quick I come across some of these answers.

Just that it's probably way less expensive to find a problem with your pet relatively soon after a scheduled appointment so you don't have to get all the tests again :)

She'll be fine though. She may never be able to eat hard food again, but I'm sure the Vet will tell me what kind of food to give her. They called me at like 7 and said I could pick her up after giving me the lowdown on her condition and how none of the tests they've done led to anything (no kidding!?). They said I can take her home or leave her overnight because she has another thing tomorrow. Leave her overnight?! Yeah right. They tell me she can't eat any food, even though I took her there because she hadn't eaten any food for two days. Plus, the lady doctor assistant was like "I gave her some of the i/d food (some sort of dietary food for dogs), and she ate it right up" And I was like "That's good! Was it soft?" And she's like "Yeah, it was soft". But I get Kodie home and they gave me this 3/4 full tin of that food and told me not to feed her because she's having a procedure done tomorrow to her teeth. I'm like "Ok. No problem"... Yeah right. She's gotta be starving, so I give her almost all of the can of food. There's hardly any left :) But now she seems real good. She had so much energy tonight out with the neighbor's dog, it was great :)

Tags site news
Comments

Sorry for the Atom Spam

March 3, 2008

There's probably two subscribers to my feed, and one of them yelled at me :p But Google Reader should be back to business now, shortly after showing 400+ new items from this website. Atom has an ID that it uses, and Google Reader apparently keeps track of your read items by that ID and doesn't care about the date at all, evidently. So, new items showed up back to the beginning of this website.

So, will there be 400+ new items every time I post? No. It has all those IDs now, which are new and changed, and unless I change them, they won't show up again.

I can't just write a post apologizing though. I have to talk about the new cool thing that I'm working on here at home. I've talked about it before but apparently, wasn't able to carry through with it. Reasons were mainly that my laptop proved to be way to slow after the initial "wow" factor of installing Ubuntu. (My reaction now would be more "Wow, FreeBSD on a ThinkPad RULES!") The thing I'm talking about is my seamless integration between front end Javascript and backend Java. I wrote about it here. But I've made a few changes.

First, instead of the backend generating XML, it'll just read XML and spit out results in JSON. I'm kind of partial to that technology because of the name... it just kicks ass. I got my first foray into JSON last week at work. Initially, our backend PHP was just returning a few things, like 3, for the front end Javascript to parse and spit into HTML on the website. What the final requirements called for was way more complex, and I didn't want to have to come up with some naming scheme, because it would just get so ugly. Some things were related to each other but not to everything. It would be something like this:

"What is my name?:Jason,Steve,Albert:Jason:True: Jason,80%:Steve,5%,Albert:15%,2000,Elite"

This is like a quiz or trivia, where the question was "What is my name?", the possible answers "Jason,Steve,Albert" comma separated, the correct answer "Jason", whether that person got it write "True", and finally the percentages that other people guessed, the total points for that user "2000", and their ranking "Elite". And that's not even all of it. It has to include the next question, and all of those possible answers. Painful. So instead, this is what it looks like:

{
"LastQuestion" : {
"Text" : "What is my name?",
etc
},
"User" : {
"Points" : "2000",
etc
},
"AnswerPercentages" : {
"Jason" : "80",
etc
}
}


Much easier to maintain, much easier to read, much MUCH easier for the front end to parse! This can be parsed like this... assume your callback function is called "callback" and is passed whatever is returned from the server, e.g. the JSON code above:

function callback(data){
var obj = eval(data);
alert(obj.LastQuestion.Text); // will alert "What is my name?"
}


Yup, it's that easy.

Next affair... I'll need, and will build over time, a large Javascript library for building out websites with the data returned from the server. Tables, forms, etc. This will generally be a pain in the ass and is attributed to me delaying this project for as long as possible. Ugh.

If I get tired of that, then something's gotta give, and I'll either stop this crazy experiment or go crazy writing Javascript for hours and hours. Thank God for FireBug.

Comments

Hello URL Rewriting!

March 1, 2008

After about an hour of programming, I have my URLs in a search engine friendly format! This has many other benefits as well:

For instance, I don't have to know the ID of the news I want to link to, just the title. So, I can make a link to a news item I have previously written by typing in the title in a format that it expects. For the news item titled "The Guitar Player", the link will be "the-guitar-player". Click here to test.

Also, if I want, I can modify my "text writer" component in JSF, to search for strings like "[[The Guitar Player]]", and to write out the url, namely "/news/the-guitar-player". Or I'd have to make it "[[News|The Guitar Player]]" if I want to add more dynamic linking, say for photos, downloads, comments, etc. This is much like a Wiki works. It can be a "news wiki" or a "wiki blog" or something ridiculous like that.

Also, after I save this, it will probably write out all of the news in my atom.xml file... it might take a while, there'll be 454 news items! That's ok though. I'll probably have to delegate that task to a new thread, so I can get to adding more news right away.

Categories are changed for rewriting purposes. "Labels" have not been updated yet. I have to make a new page because a "Label" object can pertain to Downloads and Pictures, so I have to list results for each, or modify the URL rewrite filter to accept "/picture/label/me" and "/download/label/music" to list pictures of me and my music downloads, respectively.

I don't run Apache HTTPD, so I had to write the URL rewriter all in Java for Tomcat. It wasn't too bad. Regular Expressions are neat.

The meat:

String url = ((HttpServletRequest)req).getRequestURL().toString().replace(HttpUtil.getBaseUrl((HttpServletRequest)req), "");

if (rewriteConfig.ignoreUrl(url)){
chain.doFilter(req, resp);
}
else {
String location = rewriteConfig.getLocation(url);
String rewriteUrl = rewriteConfig.getUrl(location, url.replaceAll("/" + location + "/", ""));

if (rewriteUrl != null){
RequestDispatcher dispatcher = req.getRequestDispatcher(rewriteUrl);
dispatcher.forward(req, resp); // forward the request
}
else {
chain.doFilter(req, resp);
}
}


url is the requestUrl stripped of the host. This is so I can make it work on dev (http://localhost:8080/jtccom) and production (http://www.jasontconnell.com/).

This filter is called for every request, so I have an "ignore" map set up. This tests if the URL contains a ".", since every rewritten url will only contain numbers, letters, and the occasional "/" or "-". This is a HashMap for quick lookups. So, it won't attempt to rewrite calls to "/js/someFile.js".

The "location" part of the request is "/x/", so for news it will be "/news/". The location is "news". This is so I only have to loop through rewrite patterns for news, not for everything.

The pattern is written as "([0-9a-z-]+)/?" so if I pass in the whole URL (without the host), "/news/my-news-title", it won't match, so that's what the next line does, removes "/news/" so it's just "my-news-title". The getURL function returns the rewritten URL, so like "/news.jsf?title=my-news-title". I created a new unique column for News, and my "DaoWeb" interface has a "ChangeListener" property, so if I create a news or change it's title, it updates the "TitleKey" in this case. Pictures are just forwarded by their picture id for now, so
"/picture/23" as an example.

Coming soon: News by date span! /news/2008 for all news in 2008. /news/2008/03 for all news in March 2008! /news/2008/03/23 for all news on my birthday this year!!

Tune in for more updates. I'm cranking now, and Java is like riding a bike. I also fixed a few bugs.

Comments

2008 Predictions and Resolutions

January 2, 2008

I have seen a lot of 2008 predictions in the areas of business and technology, so I thought I'd add some that I was disappointed to not see.

#1. There will be a huge boost of business in the area of personal defensive equipment against big cats. Due to the zoo mauling a few weeks ago by a tiger (lion? forget), this will be estimated as a major threat that could happen to anyone anywhere. Marketers will try to push this on anybody who just lives in the same city a zoo is located. Items will include a steak hook that can be worn on the back with sirloin steaks that should be changed every four weeks. Also, a big ball of yarn with sedatives soaked in should be the second top selling item.

#2. Cricket will overtake baseball as the popular "innings" and "runs" based game in the USA. Look for major league franchises to start popping up in major cities throughout the country by around March. Philadelphia will have a team, called "The Philadelphia Phickets" which many Philadelphians will just call "f%@# its", which wouldn't be unheard of with the popularity of the acronym for "First Union Center" before it changed to the Wachovia Center, raising its popularity tremendously in Philly. Also, MLB All Stars like Chase Utley and Jimmy Rollins will become addicts to the wicket and the 'silly point' and ultimately switch professions.

#3. 30s and 40s style blues will be the thing in 2008. Young kids and old will throw in their Robert Johnson and John Lee Hooker albums, some will learn guitar, some will learn harp, all will learn soul, and we'll see around 300 new bands all performing Mississippi River Delta blues into a can recorded onto a phonograph. Eight track digital recording will see a huge dip in profits. As will any electricity based recording equipment and even instruments. Old acoustic guitars are the new gold.

#4. The internet will show its age. People will find a new way to communicate... speaking. Merchants will find a new way to hawk their wares... mainly I see door to door sales (with sales men or women knocking on your door to sell you things and let you try them out before buying) as the main means of income this year. This will inevitably force people to places they haven't been in a long time: outdoors, in order to avoid all of the interruptions during their personal communication time. This will lead to the next method of sale: markets. Also, as a side effect, people will stand by merchant booths and tell you what they think of products that they are selling. This will lead to a kind of "social networking" as I like to call it. People will say "Hey, do you want to be my friend?" Then they will exchange pictures and addresses, and each are welcome to stop by any time. As long as you're not one of those door to door salespeople, you are welcome. To show other people who they're friends with, they'll have a bulletin board of their friends' pictures, along with their addresses and interests, which will no doubt lead to some extra trips to their house by the salespeople, if they are deemed to be in the target market.

So now for some resolutions. Yeah, I never follow them. But this year, I won't either. So, I can basically set any goal and be guaranteed it won't be met.

#1. Make a million dollars. This is pretty easy. I just have to work six to eight jobs simultaneously. Actually, closer to 14 but I figure the interest I can gain from all the extra dough might be enough to put me over the edge.

#2. Make a million friends. If I do this, I can probably ask each of them to give me a dollar and then I'll have two in the bag.

#3. Make a million songs. If I do #2 and make a song about each of them, I can charge them each a dollar for their song so they feel like they're getting something for their money, accomplishing these first three at once.

#4. Make a million enemies. Let's see, I can do #2, make a song for each of them, charge them each a dollar and tell each one of them after they paid me that I gave everyone else their song for free. Then call them a sucker and laugh at them.

#5. Start a war. Do the first three, then make a million enemies that weren't once or are my friends, and start nasty rumors about both sides. My friend Jim once got arrested for inciting a riot, this would definitely win bragging rights.

#6. Travel to outer space. With a million dollars I'm sure I can hook up with one of those X Prize teams and book a flight.

#7. Quit drinking. Ok, that one's ridiculous.

So, pretty reasonable. Let me know what you think in the comments.

Tags site news
Comments