This is just ridiculous that I have to check 5 weather apps to try to figure out how hot it is.
This was the temperature last night at 9:52pm in Burbank, California:
My guess was that it was around 74 – 76 degrees.
When I need to upload large .sql file (greater than 10 MB) into MySQL using phpMyAdmin, it frequently times out.
The annoying the solution is to split the SQL file into several smaller file, but text editors will hang up if the file is too large, and if you aren’t careful you can break the whole script.
That is why I like David Pratt’s solution. It worked great.
1. If you have phpMyAdmin installed in CPanel, you need to login to your server using your root password. Navigation to the folder:
2. There, create a directory “upload”.
3. Next, look for config.php and change the line:
$cfg['UploadDir'] = '';
$cfg['UploadDir'] = 'upload';
4. Save the file, and upload your .sql script into that upload directory.
5. Now when you go to the import tab in your phpMyAdmin, you will have a new option under “File to Import”, called “Or web server upload directory”.
6. Select the file you uploaded from the drop down menu.
Almost 10 months ago, I purchased my first Mac. Because a lot more of my website work was less Microsoft and more Open Source, it made more sense. I also wanted to learn iPhone / iPad development which is impossible without a Mac.
For an employed Windows developer, it was scary, confusing and exhilarating. There were so many questions swimming in my head:
Was I going to be able to perform my normal job?
Would it take long to learn OS X?
Would I have to purchase a lot of software?
Would I like it?
Am I throwing my money away?
By far, the biggest problem was the money. Everyone knows that Mac’s are expensive, and I wasn’t willing to spend $3,000 on a device I may land out hating.
The first step was to figure out how I would move my files, mail and programs to the Mac, if i was able to find one. This is what I found:
As a developer, I need a more beefy machine than the average computer user. I had grown accustomed to a 17″ laptop, but because this was an experiment, I wasn’t going to spend money on that. I had to have a laptop, so that eliminated the iMac’s and the lower end Macbook.
So, I definitely needed a Macbook Pro, but couldn’t afford to purchase one new.
I went to craisgslist.org and started using this query to find what I needed:
In short, it is looking in Los Angeles for a Macbook Pro, but asking it to not return any listings that mention “13.3”, “13”, “wanted”, “air”, “hp”, “jbl”, “trade” and “white”. I also specified to only see listings between $600 and $1400. This narrowed the results down enough for me to look through every day. I added it to my Google Reader so that I would receive notifications the instant one appeared.
In under a week, I found a listing for a late 2008 model, just prior to the current Unibody model, with software and Applecare warranty for $1,000. I called and offered to come over immediately with $900 cash and he agreed. He was suprised I was willing to do this at 8 pm at night, but I knew if this mac wasn’t “too good to be true”, I would lose it by the next day.
I didn’t know how to figure out if I was buying a good machine or not. I didn’t even know how to login to a Mac, or how to look at the processor. Luckily the seller’s roommate was able to answer my questions.
The main place to look was in “About This Mac” which you access by clicking the Apple logo located in the upper left of the screen. This showed me the processor and memory, and then when I clicked “More Info…”, I found the Battery Cycle Count which told me how many times it had been charged. This number was ridiculously low, confirming the story that he never used the laptop.
He also said he had purchased a 3 year warranty from Apple, but I couldn’t confirm that there. I had his address, so I decided to buy it and go to the Apple store the next day, which did confirm the warranty.
Lastly, the Mac came with a hard cover ($60 – $80), a bag, and software discs of Microsoft Office and Final Cut Pro. I found that many used Mac ads claim that it comes with lots of commercial software, but they rarely come with the discs – usually meaning that they are pirated. Having the original discs with license keys proved to me they were original.
I sold Final Cut Pro on eBay for about $150, which I used to upgrade the RAM from 2 gigs to 4, and allowed me to purchase some additional software.
With everything out the door, I got a 1 year old Macbook Pro with 2.5 Ghz Core 2 Duo with 4 Gigs of RAM, Microsoft Office, Bag, Case and a 2 year Applecare Warranty for about $800.
It IS possible to buy a solid Macbook Pro for under $1,000 – I did it. You just have to have your wits about you and be aware of anything that smells shady. In my case, I got the seller talking and learned that he received the Macbook for the Film School he paid a lot of tuition to attend. He soon learned he didn’t want to be a Film Maker, and therefore never used the Mac.
In the next part of Switching to the Mac, I will discuss learning OS X and the software I decided to buy.
There are three viable options if you want to leverage WordPress as your Content Management System, yet want to offer your users a way to interact in a forum.
bbPress is a very lean forum solution for WordPress written by Automatic. It is a great idea for a quick and dirty forum that works. Theming works similarly to WordPress – so if you enjoy writing themes in WordPress, this will be easy.
I had to install it in a subdirectory. Trying to install it in the same directory as WordPress causes a battle over index.php since they both need it.
Latest Discussion For WordPress – This will allow you to see the forum posts in your wordpress sidebar
If you can’t get to the bbPress Admin Site after integration, just delete the following keys in your bbPress database that refer to the WordPress database.
After spending several hours trying to figure out how I broke the bbPress Admin Site, I gave up and just installed bbPress into the WordPress database.
phpBB is a much more robust (bloated) forum. And the integration is done with one major plugin, WP-United.
You must follow directions exactly. There are about 30 files you need to edit, and if you zone out and start watching ESPN, it isn’t going to end happy for you.
There are over 20 code changes you need to make in the phpBB files, and the instructions sometimes say “replace”, “add before” and “add after”. It is easy to overlook these and add your code after a line instead of before.
Once it is installed, you can use various Template Tags in your WordPress theme to show forum posts and statistics.
Theming is also really nice – there are files you can edit just like bbPress. You just need to learn some of the phpBB conventions they use in the HTML.
vBulletin is extremely robust, but so much so that it is really hard to figure out where to configure various settings. But because of the large user community, a simple google or vBulletin forum search will tell you where to look.
vBulletin is not free like phpBB or bbPress, but you do get what you pay for. You get free Technical Support, and for a little more money you can even get free telephone support.
You can view an online demo on their site before you purchase, and if you buy it and change your mind, you can get your money back within 30 days.
The major benefit with vBulletin is that it opens the door for you to start charging for paid membership. vBulletin integrates with many payment providers and can charge one time or recurring.
vBulletin-Wordpress Bridge: This will map vBulletin user groups to WordPress user groups and allow single sign on. Just make sure you follow the instructions and go to fast. (Do the test post before you go and turn it on all the way.)
Simple vB Login – This gives us our login form on the WordPress side.
If you want to access the vBulletin user, you need to put “global $vbulletin;” in the login_inc.php and possibly the header.php of your theme.
Hidepost (custom) – The normal Hidepost plugin allows you to hide content from various user groups. I changed hidepost to look at $vbulletin user instead of wordpress user (although you may not always have to do that).
If you buy domains through Godaddy, but host the website and mail somewhere else, chances are you had to edit your DNS settings.
Up until a few weeks ago I had been doing it wrong. It was working, for the most part, but some things like reverse dns lookups would fail, and strange errors would sometimes crop up.
When you buy your domain through Godaddy, find your way into Total DNS Control. You will see a page similar to this:
Scary, that’s for sure.
Now, before we can edit this, you need to know where your website is going to be hosted. So if you are hosting at Hostgator.com for example, you would sign up with them and they would give you the IP Address to use for your site.
Armed with that IP Address, you can start editing your DNS Record. Keep in mind that this is not gospel – your mileage may vary. This works for me everytime when I point to a website I am setting up in CPanel and also need to manage the mail. If you want your mail through Godaddy, then you do not want to make these changes.
Your DNS should now look like this:
I just stumbled on a nasty, nasty ASP bug that took about 7 years for me to see.
The problem happens when using cookies and querystrings with the same name. A page on the site reads in a variable from the querystring and sets a cookie with the same name to its value, e.g.:
strSrc = Request.QueryString(“A”)
Response.Cookies(“A”) = strSource
Response.Cookies(“A”).Expires = Now + (2 * 30)
However, if the variable name in the query string is different from the capitalization of the cookie name (e.g page.asp?a=xxx) then a new cookie gets set with the name matching the captialization of the
So if you run the page multiple ways, a=123 and A=123, two different cookies are set EVEN THOUGH YOUR CODE SAYS Response.Cookies(“A”) = strSource!
Attempting to read the cookie value back then returns both values. Reading the cookie value via Request.ServerVariables(“HTTP_COOKIE”) shows both values.
If your code is looking for the “A” cookie later on and there are two cookes there, you will only see the “A” one, which may not be the one you want.
Sometime last week, I stopped being able to get access to the internet while at work. I could get an IP address from DHCP, but couldn’t get any traffic past our firewall/gateway.
I thought it was DHCP server, and was ready to buy a new one as it is 5 years old. But then I noticed in my ipconfig /all that I had two gateways: 0.0.0.0, and then on the second line, my correct gateway, 192.168.1.1. I had never seen two gateways listed, and almost scanned right over it.
I confirmed that no matter if I set the IP manually, or dynamically, I couldn’t get rid of the 0.0.0.0 gateway.
I called my friend, the who knows all the technical nitty gritty in the TCP world.
We fired a command prompt and I printed my computer’s current route table by writing “route print”:
You can clearly see the two lines showing 0.0.0.0. According to him, there should only be one line. So we deleted them both:
This left us at:
So then we added the correct one back in:
I did one more “route print” to make sure it took:
And viola, I have internet access!
I am watching a programming presentation from the Myspace tech team right now. They are going over their stats and was blown away by the numbers (as of April 2007):
This problem has nagged at me for years. Here is a batch command to delete files on a Windows 2003 machine.
Forfiles -pC:\backup -s -m*.* -d-5 -c "cmd /c del /q @path"
This will delete all files in my backup directory older than 5 days. To test it first, use this:
Forfiles -pC:\backup -s -m*.* -d-5 -c "cmd /C Echo 0x22@Path\@File0x22"
This will print out each file that you will be deleting.
uhhh…where do I login?