sudo killall -HUP mDNSResponder
Nerd - Developer - Entrepreneur
sudo killall -HUP mDNSResponder
Since installing OS X Lion, I noticed that all my local websites (developing on MAMP) would take 5 seconds to load up. When tracing it back, I found that it was actually doing a long DNS lookup, failing, then falling back to the /etc/hosts file.
To fix this, you need to add the IPV6 value to every hosts entry in /etc/hosts
e.g.
127.0.0.1 www.ballistiq.local fe80::1%lo0 www.ballistiq.local
Requests will be instantaneous after that.
This recipe took a little bit of work to pull off but came out surprisingly well. I found this to be very tasty.
~6 small eggplants
1/2 cup long-grain or jasmine rice
1/4 cup olive oil
3 tablespoons pine nuts
1 large onion, finely chopped
2 garlic cloves, finely chopped
2 cups chicken stock
1 (14 1/2-ounce) can diced tomatoes in juice
3/4 pound beef or lamb chunks
1 teaspoon ground allspice
lemon juice
3 tablespoons chopped flat-leaf parsley
Preheat oven to ~350 degrees.
Hollow out each eggplant with a melon-ball cutter, working from bottom end and leaving about 1/3 inch eggplant flesh along interior walls.
Rinse rice in a sieve under cold water until water runs clear. Drain well.
Heat oil in skillet. Fry pine nuts until golden. Put pine nuts in bowl. Fry onion and garlic until golden. Transfer to bowl with pine nuts. Put stock, tomatoes, 1/2 teaspoon salt, 1/4 teaspoon pepper in skillet and simmer while stuffing the eggplant.
In a giant bowl, mix rice, meat, allspice, 1/2 teaspoon salt, 1/2 teaspoon pepper, onion/pine nuts mixture. Mix mix mix.
Stuff eggplants with mixture.
Put eggplants in baking dish. Mix the stuffing that you took out of the eggplant into the sauteed tomatoes and transfer to the baking dish along with the eggplants. Bake for 25 minutes, turn over, bake for another 25 minutes. Sprinkle lemon sauce and parsley over the dish. Ready to serve. This is spectacular.
This is very tasty and unfortunately most of the health benefits of the vegetables are completely wiped out by the honey.
2 tablespoons extra-virgin olive oil
1 pound carrots (about 4 large), peeled, cut into 3×1/4×1/4-inch sticks
1 pound large parsnips, peeled, halved lengthwise, cored, cut into 3×1/4×1/4-inch sticks
Coarse kosher salt
2 tablespoons (1/4 stick) butter
1 tablespoon chopped fresh rosemary
1 1/2 tablespoons honey (such as heather, chestnut, or wildflower)
Heat oil in large skillet over medium-high heat. Add carrots and parsnips. Sprinkle with coarse kosher salt and pepper. Sauté until vegetables are beginning to brown at edges, about 12 minutes. DO AHEAD: Can be made 1 day ahead. Cover and chill.
Add butter, rosemary, and honey to vegetables. Toss over medium heat until heated through and vegetables are glazed, about 5 minutes. Season to taste with more salt and pepper, if desired.
This has to be one of my favourite recipes of all time.
2 egg, beaten
1/4 pound dry bread crumbs
4 skinless, boneless chicken breast halves
1-1/2 (16 ounce) jars spaghetti sauce
1/4 pound shredded mozzarella cheese
1/2 cup grated Parmesan cheese
Preheat oven to 350 degrees F (175 degrees C). Lightly grease a medium baking sheet.
Pour egg into a small shallow bowl. Place bread crumbs in a separate shallow bowl. Dip chicken into egg, then into the bread crumbs. Place coated chicken on the prepared baking sheet and bake in the preheated oven for 40 minutes, or until no longer pink and juices run clear.
Pour 1/2 of the spaghetti sauce into a 7×11 inch baking dish. Place chicken over sauce, and cover with remaining sauce. Sprinkle mozzarella and Parmesan cheeses on top and return to the preheated oven for 20 minutes.
I’ve been experimenting with making bak kut teh – basically pork rib soup. It’s super yummy. I finally got it down tonight.
Ingredients (serves 2)
Cut the pork ribs into individual pieces. Throw into boiling water. Throw in everything. Cover, cook for 1 hour. If you lose water while cooking, just add more. No biggie. This is not a precise dish.
Give each person a bowl of soup with pork ribs.
Serve with steamed rice. Make soy sauce available to put in the soup or rice.
The above is super easy and very very tasty.
Since I installed Ubuntu 11.10, my Sound Blaster X-Fi sound card stutters and doesn’t play back sound. The way to fix this is to open terminal and run “ubuntu-bug”. That’s it. Plays back fine until next reboot.
Ridiculous bug.
One of my new year resolutions in 2012 is to try a new recipe every weekend. I decided this weekend to try a steak on mushrooms with red wine sauce. I found this recipe on Epicurious and adapted it to stuff I could easily buy at the local grocery store. I also made a caesar salad from scratch. This serves as a reminder to myself so that I can cook the same thing again.
One of the biggest frustrations that I have as a professional web developer is Internet Explorer – more specifically IE8, which is currently refusing to die because it is “good enough but not quite”. Here we are, trying to move forward with new technology on HTML5 standards that work across most modern browsers, except things don’t look or work quite right in IE8. Corporations still give out computers to employees with IE8 pre-installed. Enough is enough. Let’s make 2012 the year that we, as a body of web professionals, begin to retire IE8.
From now on, every site that I deliver for clients will have, by default, an IE8nomore header (or variant), which will only show up when a user with IE8 or less browses to the site. If a client specifically wants me to support IE8, they will need to pay extra for it. It’s that simple. Clients need to be educated that IE8 is just bad software. If they have the chance to tell you that a site you created doesn’t work in IE8, you’re too late. You need to put the header in by default so that when they, or their colleagues browse to your site, they immediately see that their browser is outdated. It’s psychological. They need to upgrade. You don’t need to lower your standards.
If you’re a professional web developer, make it your resolution. Let’s rid the world of standard-less browsers. Let’s nail IE8 and please be done with it.
IE8nomore header
IE6nomore header (the original)
If you’re using Ruby on Rails, you’ll likely use the will_paginate plugin. If you use Twitter’s Bootstrap CSS framework as well, you’ll notice that the pagination is all messed up. This gist fixes it:
# application_helper.rb # https://gist.github.com/1205828 # Based on https://gist.github.com/1182136 class BootstrapLinkRenderer < ::WillPaginate::ViewHelpers::LinkRenderer protected def html_container(html) tag :div, tag(:ul, html), container_attributes end def page_number(page) tag :li, link(page, page, :rel => rel_value(page)), :class => ('active' if page == current_page) end def gap tag :li, link(super, '#'), :class => 'disabled' end def previous_or_next_page(page, text, classname) tag :li, link(text, page || '#'), :class => [classname[0..3], classname, ('disabled' unless page)].join(' ') end end def page_navigation_links(pages) will_paginate(pages, :class => 'pagination', :inner_window => 2, :outer_window => 0, :renderer => BootstrapLinkRenderer, :previous_label => '←'.html_safe, :next_label => '→'.html_safe) end