Reading page metadata using jSoup in ColdFusion
The ability to query a web page for metadata is one of the main features I use for creating content here. ColdFusion (and the jSoup ColdBox module) makes the task trivial.
I am using the jSoup connect() method to read the document although it is also possible to pull in the HTML using cfhttp. The code will follow redirects and overrides the user agent to avoid potential filters. I have noticed some web application firewalls will reject the request, I assume that could be because they block spider requests from my VPS provider (Digital Ocean). The same request works fine when run locally.
The next step is iterating through the meta properties to pull out the opengraph and twitter metadata which is then returned to the caller so that data may be acted upon.
Although this example is specific to ColdBox, it should be easily portable to a non-ColdBox app.
Renegade Forums September wrap up
It is hard to believe September is almost over. I will be AFK next week, so the month is a wrap. I did manage to get a a few things done these last few weeks:
The next major piece to tackle will be adding in the ability to edit a post. Once that is done it will be time to tackle user registration.
6 oz. hot sausage, cubed 3 tbsp butter 1 tbsp oil 1 cup minced onion 1/3 cup diced red bell pepper 1/4 tsp cayenne Kernels from 7 ears of corn 1/2 cup chicken broth Salt & pepper to taste
Brown sausage in a large skillet. Remove from pan and set aside. In the same skillet with sausage grease, heat 2 tbsp butter and oil over medium heat. Add onion, pepper and cayenne and saute until softened. Add corn to the skillet and cook and stir for 3 min. Add broth, increase heat to high and boil until broth has evaporated. Stir in remaining 1 tbsp butter. Season to taste with salt and pepper. Makes four large servings
Rob's red beans and rice
Red beans and rice is an emblematic dish of Louisiana Creole cuisine traditionally made on Mondays with Kidney beans, vegetables, spices and pork bones as left over from Sunday dinner, cooked together slowly in a pot and served over rice. Meats such as ham, sausage, and tasso ham are also frequently used in the dish.
Red beans and rice is hands down one of my favorite creole dishes. It can also be made on a budget and it tastes great to boot. Ready to try your hand? Here is what you will need:
Cook time: about 3 hours
First you will want to soak your beans over night to soften them up. Drain the beans, put them in your pot and add approximately 6 cups of water along with the bouillon cubes to add a little salt and flavor. Now is a good time to add the onion powder, garlic powder and the two bay leaves.
Set on the stove and put on medium heat. You are not trying to cook it fast, we are aiming for “low and slow.”
Next, prepare the andouille sausage by cutting the links in to small chunks. It should come already fully cooked, but I like to place it in a skillet on medium heat to brown it a bit and get some of the juices out. Once browned, in to the bean pot it goes.
Now it is time to cook down the vegetables in the freshly vacated skillet to allow the onions, bell pepper, and celery to soak up some of the andouille flavor. Cook them down until the onions and celery start to clarify. Once done, put your vegetables in the pot.
Once everything is in the pot the real work begins. The first two hours will be stirring the pot every 20 minutes or so. The beans will want to settle to the bottom of the pot and will burn if you are not careful. I use a big cooking spoon to stir from the bottom. At this point I will use the big cooking spoon to mash some of the beans against the side of the pot to help thicken things up. Be sure to add water as required.
The final hour will be stirring frequently to make sure the beans do not burn. Things should be pretty thick now, you can add water to thin it if needed.
Serve over rice.
This is one of my favorite recipes and tastes great, but it tastes even better the next day!
Renegade Forums September Update
September has finally arrived, Count Chocula is on the store shelves, and hopefully the fall weather will soon arrive.
I have slowly been adding new features, but life comes at you fast; There have been doctor visits, health scares, surgeries, and recoveries in August. That is not to say that nothing has gotten done, it has just been at a much slower rate and many of the added features are things most people will never see. Here is the short list:
The initial sitemap code I deployed a few weeks back was failing validation. Those issues have now been fixed and the search engines are now happy.
User permissions have been added to the system. It is easy to setup role based permissions per user now although right now it is very rudimentary.
The forum admin now has the ability to create forums which is a step in the right direction, before I would manually have to add each forum to the database. The process automatically grants moderation permissions and subscribes the owner to the newly created forum.
More updates to follow!