For reference. This technique (removing whitespace characters at the end of a line on save) is really useful in Eclipse, and Michael Jackson’s TextMate Macro: Remove Trailing Space and Save does the trick in an excellent fashion.
One of my most popular posts still seems to be “Apparently you can get scammed using PayPal and Gmail“, in which I received my first scam attempt from a Gmail address. The comments on this post typically are people who have avoided being scammed out of their goods, but a number of people recently are asking how the process actually works and why something’s a scam.
First of all, if the offer is too good to be true, there’s something wrong. Nobody in their right mind is going to willingly add an extra $100 upfront for shipping. People using Craigslist and Kijiji are universally cheap and will offer pennies on the dollar for your merchandise, or worse yet try to “trade” you. If you see an offer that comes in for more than you’re asking for, or adds an exorbitant amount for inconvenience, you’re getting greedy and stupid.
Second, nothing is ever final with PayPal. There are countless horror stories online, but let’s just be clear for people who think PayPal offers any seller peace of mind:
- If you sell an item and use PayPal for the transaction, and don’t ship with a tracking number, the buyer can just claim they never received the merchandise. PayPal will always side with the buyer and return the funds from your account to theirs.
- If you do use a tracking number, the buyer can lodge a complaint and claim that the item is not as described. Supposedly they are required to return the item to you, but PayPal will just return the funds to their account.
- In the event of any issue with the transaction, the buyer always wins.
Oh, wait, you say. But what if I immediately withdraw the funds from my account once the buyer has paid me? Then PayPal can’t do anything?
Actually, they can. PayPal will put your account into a negative balance and any funds you add or receive will first go towards that negative amount. If you keep a negative balance for over 30 days, they will send you to collections and close your account. This will eventually appear on your credit report and you will be constantly hounded to repay the negative balance. It doesn’t matter that you were scammed out of your money; you’ll have to dispute the payment and likely take the matter to court to have it resolved.
PayPal is not seller-friendly. The only reason people use it on eBay is that it’s the only allowed payment choice in many circumstances, and the high-volume sellers do a pretty good job of staying in PayPal’s good graces. If you’re selling 1000 items and 10 people defraud you, you still have a 99% success rate and it’s really just the cost of doing business. The same scenario doesn’t apply for a single seller selling a single item, especially if there are other signs of sketchy behaviour before the transaction.
I decided that I didn’t really feel like trying to manually upgrade ChintzyCMS to the latest version, so my personal site is now back running WordPress. I wasn’t interested in migrating comments, so if you’ve said something witty in the past you’ll need to look forward for new material.
There were a few tools that helped in the PostgreSQL to MySQL and import process. I’m still a bit upset that WordPress doesn’t support Postgres natively, but such is life.
- First, I used phppgadmin to export the posts table as XML, which gives a <column> and <row> style output from the table. I deleted the header and column description tags from the beginning and end of the file.
- Using the guide at WordPress Codex – Importing Content, I performed the following search and replace operations based on the Importing from [X]HTML instructions:
- For each column tag that needed to be replaced, I searched for the regex
and replaced it with the appropriate tag pair, such as
- For each column that didn’t have an equivalent match in the WordPress database, I searched for the same regex and replaced it with an empty string.
- I saved the resulting file out as posts.xml.
- Using the UNIX tr utility described here, I removed all newline characters in the file:
tr -d '\n' < posts.xml > posts_no_newline.xml
I then was able to import the posts_no_newline.xml file using the WordPress RSS Importer plugin.
There are still some posts that contain remnants from an ASCII to UTF-8 conversion (the new MySQL database stores content in UTF-8) which I’ll likely fix programmatically; when that happens, I’ll update with how that was performed.
Is it laziness? Use of a subpar e-mail application? A hurry to “get the last word” and scrolling way too far in the input box?
Tune in this week for answers to these questions and more in an exciting expose on the subject, “Why do certain computer scientists still fail at email threading?”
Also, bicyclists should have to carry insurance.
Want to market a product to the average douchebag? First, pick a brand that gives him exclusivity – something purportedly elite but still found at the grocery store. Products like Axe, or services such as oxygen bars cater to segments of society like the “bro” in a wonderful way. If you can sell air through a tube or the idea of two chicks getting up in your grill over musky porpoise-hork cologne, I’m all for it.
One of the concepts along the same line I’ve never really considered is novelty bottled water. Both Kayla and I agree that the best possible type of water is freezing cold, straight out of a garden hose.
Sure, some people don’t want to drink tap water directly. Some cities chlorinate the crap out of it, and I’ve lived in two places with piping that dispensed more rust than anything drinkable. A Brita filter always seemed to resolve the taste. I’ve never seen the need for anything more than that. Bottled water is a nice option for camping, but my brand of choice is whatever’s on sale that week.
Along these lines, Kayla suggested an experiment this evening. She’d recently heard about Voss water from “some douchebag in a movie.” In complete contradiction with this remark, she then purchased a $2.50 bottle of Voss at Zehrs for some god-forsaken reason. Likely because it had a pretty bottle or something.
The point ended up being: could we tell the expensive water from the tap or Brita-filtered stuff, and did it subjectively taste better?
Here were the conditions:
- We would try three kinds of water – tap, Brita and Voss – and try to guess which was which.
- All water was served at the same temperature out of the same type of glass.
- Each glass was labelled on the bottom using masking tape. The glasses were then three-card-Monty’d by the opposite participant while our back was turned.
- Drink the water, guess the type. When all three guesses were in, turn over the cups and check what was in each.
Pretty anti-climactic, really. Whether it was just luck, both Kayla and I were easily able to guess the correct type of water in all three of our glasses within the first sip or two.
Oh, hell, you probably don’t want to read any of these. Voss was kind of flat, Brita was kind of mineral-y, and the tap water was kind of flavourful.
The cats tried all the choices and were more impressed that they could get their paws all the way to the bottom of the glasses, nearly knocking several of them off the table. I had some Growers 1927 Dry Premium Cider and enjoyed that much more than the water, and I’d much rather conduct a cider-tasting experiment next time. Kayla gave up interest in the experiment halfway through and turned to her 3DS and Zelda for entertainment.
I recently built a new desktop system and chose an Asus P8P67 motherboard. After getting the system up and running, I noticed that it would intermittently freeze – perhaps the most enraging thing that can happen when setting up a brand new machine. Checking and replacing the usual suspect hardware yielded no results, but the Internet came to my rescue and helped get things stable.
In summary, if you have a P8P67 motherboard (this should apply to all variants, including the Pro and Deluxe), try manually clocking the RAM to 1066MHz if you are experiencing freezes. My memory is rated for 1333MHz but just would not operate properly on the board at this speed. The stalls manifest intermittently; they will happen anywhere from two minutes to ten hours after boot. The display stays on, but peripherals don’t respond – this fix won’t work if your end result is a blue screen of death. Your Memtest results should also show no errors.
Later suggestions include setting the memory speed configuration to XMP, not AUTO – I haven’t tried this yet as I’d rather not jinx my current functional setup.
And now for a bit of personal focus, since I’m up on Saturday morning with a pain in my jaw. More on that later.
I’m currently writing from a hotel room in Paris, France – specifically at Citea Porte de Charenton – where I’m staying for a week with Kayla. The hotel and trip were selected based on a great deal from Travelzoo, but purchased through Expedia.ca when the original Air Transat Vacations site “ran out of stock” and refused to sell us two tickets at the advertised $792/person price.
On Mondays in Paris, nearly all the national museums, monuments and attractions are closed, so we’ve opted to take a day and stick around the hotel – eating cheese, baguette and having some wine. Tomorrow’s trip will be to the Catacombs, which completes the set of standard tourist activities I had wanted to finish.
Myths and Misconceptions
I’d heard some different misconceptions and stereotypes before going to France, and would like to debunk some of them now:
Beer and wine are cheaper than Coke.
This isn’t really true. In all the restaurants and tourist areas we visited, Coke was generally 1.50 to 2.60 while a 33cl (330ml) can of Heineken was closer to 3 Euro. Wine, at grocery and convenience stores, is more competitively priced.
Parisian service personnel are snooty, especially if you can’t order in French.
Everyone we encountered in restaurants and tourist areas were more than accommodating, even when it was clear we had no idea what they were saying. Simple phrases such as “merci” and “bonjour/bonsoir” went a long way towards showing that we were at least making an attempt with the language. Many know a significant amount of English and will help with ordering.
Awesome Things to Do and Helpful Tips
Here are some of the things that stood out to me as great experiences. If you’re considering a trip to Paris, I’d highly suggest you check out the following.
For dinner one evening, we went to La Petite Hostellerie, which offers traditional French cuisine and a fixed-price (10 or 16 Euro) menu including appetizer, entree and dessert. Kayla and I both enjoyed the onion soup and “boeuf bourguignon“, a stew with beef braised in red wine. The service was friendly and excellent, and the food was quite stellar. Definite recommendation.
I’d also suggest a Paris Visite pass with zones 1-3 for the length of your stay. You’ll likely have to inquire at your hotel which metro station you should buy the pass at the first time; not all of them have attendants. With the Paris Visite pass you’ll also get a map with all the metro and RER (express train) stops – it’s pretty easy to plan just using it. Some metro trains also require you to push a button or raise a lever to open the doors when entering or exiting; they don’t all open automatically.
The Eiffel Tower can have ridiculous lines for the elevator to the second level. If you’re up to it, locate the ticket counter for the stairs entrance and walk up – you can still buy a pass for the elevator to the top once you’re up there.
Ask at your hotel where the nearest supermarket is. It’s much cheaper to make sandwiches with a baguette, cheese and sliced meat than eat out all the time. This way, you won’t end up like our first day: wandering around, looking for a cafe or restaurant with reasonable prices at 2:40PM, and realizing only later the following: 1) that many places are closed or close their kitchen after 2:30PM until they start serving dinner at 5PM; and 2) the phrase “7J/7 service non-stop” means that yes, the restaurant is open seven days a week, but is not open 24/7; they just don’t close between lunch and dinner. Check their hours and note that if they close at 10PM, they might be out of most food by 9.
This was the source of much grief on our first day, where we were exceedingly tired and hungry and managed to miss both lunch and dinner times. We were lucky and located 2-minute microwavable meals in the hotel vending machine, which held us over until we got to the supermarket the next day.
When picking attractions to visit, check for the following:
- Location: Can you combine several spots one after another? While the metro comes incredibly frequently, the 14 lines are incredibly extensive and it may take longer to get between destinations than you might think.
- Price: Pick spots that offer student/reduced rate tickets, or free admission on certain days and times. You don’t necessarily need an ISIC or similar – just a student card from your university or college generally works.
- Hours: Some attractions will be open until a certain time, but restrict entry up to an hour before that. Plan accordingly, especially if you’re already running late.
I may post some photos, but they’re probably not anything you can’t find on Flickr already. Hope this helps!
We’re moving our client sites and other activities away from Dreamhost to Linode, and one of the features that’s really nice is how the WordPress auto-update mechanism works. While it’s a neat trick to be able to upgrade an application from within itself, the design of PHP/Apache/WordPress requires either FTP access (boo!) or for WordPress’ files to be owned by the web server user (not always practical, especially in a low-memory VPS environment.)
Once again, Something Awful comes to the rescue with instructions on setting appropriate user permissions and making a wp-config.php change. It’s summarized in Geoff’s weblog – essentially certain wp-content directories become owned by www-data, and a new constant (FS_METHOD = ‘direct’) gets defined in wp-config.php.
I’ve written a terrible Python utility to automate this, called wpfix.py. It’s run from the command line as root, and takes a path to a WordPress installation. It will perform all the permission changes and edit the wp-config.php file for you. If it can’t, it will at least fix the permissions and let you know the change to make.
This weekend, I ended up picking up a nasty cold – whether it was from Oktoberfest, or just a residual thing floating around. In any event I’m being blamed for spreading it to my roommates, and I feel like utter crap. There’s nothing like needing to blow your nose every five minutes to really kill productivity. I have the option of working from home, at least, so that I don’t enrage and infect other people at the office. I do have several non-prescription cold medications to try out, though, so why not document them?
Sudafed Cold & Cough
Sudafed is one of the original medications containing pseudoephedrine, which is the active decongestant ingredient. The Wikipedia article discusses some potential various meth-making uses, but frankly when I have a cold I want the most potent drug possible so that I can either get some rest, or get on with my day. In short, the Sudafed PE variants are terrible, as they have a less-effective ingredient – they should probably be called Placebo Edition.
Reading the various product descriptions, the Cold & Cough and non-PE Decongestant give you the most active chemicals for your purchase. Cold & Cough also contains 30mg of dextromethorphan, which allegedly suppresses coughing. If you’re looking for strictly pseudoephedrine, the Decongestant-style has 120mg in time-release format.
Unfortunately, Sudafed did not come through as promised yesterday afternoon. After taking one pill, I continued to be stuffed up and generally watery-eyed, with the occasional dry cough. There was an improvement in my general attitude and energy level, but not the level of expected relief.
Benylin 1 All-in-One Cold and Flu Caplets
Upon a recommendation from Dave last year, Benylin caplets have become a regular product in my medicine stash. Like Sudafed, the product contains pseudoephedrine and dextromethorphan but in half the amounts. Thus, you can take two caplets every six hours safely – which gives you an extra 500mg of acetaminophen and 200mg of guaifenesin (which encourages phlegm to get out.)
I took two of these this morning, after a night of terrible sleep and general stuffiness, and within fifteen minutes I was up and working with much-reduced congestion. The effects of the guaifenesin are definitely noticeable – when I cough, it’s a cough with a purpose. These would certainly be my first choice of pills to start warding off a cold or to generally perk up during the day.
Vicks DayQuil LiquiCaps
Left over from a previous cold, I’d never actually tried these pills before. They contain dextromethorphan, but not the pseudoephedrine – instead replacing it with the non-meth-convertible and less effective phenylephrine.
Unfortunately, the medicine had little effect. After two pills yesterday morning things kept going downhill and I seemed to get even more congested. My attitude and temper was also pretty poor due to being sick. I wouldn’t really recommend them unless you respond properly to phenylephrine – clearly I don’t.
From actively examining the ingredients in these products, Sudafed and Benylin should both be nearly equally effective from a medical standpoint. For me, the extra acetaminophen and guaifenesin in Benylin is the key ingredient to turning a general unmotivated, “sick” feeling into reduced pain, less congestion and a better attitude. As I’ve been writing, I’m nearly back to feeling normal, which is really all I can ask for. Some things I will try if this cold continues:
- Cough and cold syrup generally contains more active ingredients, and DayQuil/NyQuil are competitive here. Theoretically it should also take effect more quickly, and might have the advantage of soothing the throat at the same time.
- Generic drugs (eg: Life brand) might be very competitive if you can match the amounts of chemicals to the name brands. Essentially I want to try for 30+mg of dextromethorphan and 60+mg of pseudoephedrine in each dose, combined with 500-1000mg of acetaminophen.
- Taking anything with guaifenesin before bed isn’t well-advised; even if there is a cough suppressant at play, you’ll still be dealing with phlegm and enraging anyone else in the bed or the next room with nasty-sounding hacking.
- Remembering to get to a pharmacy instead of a convenience store – they’ll generally have better prices and more of a selection (extra strength vs. regular.)