RSS LJ

May 27, 2010

HOWTO: set up a transparent squid proxy on an Ubuntu desktop box (, )

by fluffy at 5:11 PM
Here is a simple procedure for setting up a simple transparent proxy to conduct basic network testing of some connected device, when your desktop box is running Ubuntu Linux.

  1. Disable NetworkManager with sudo update-rc.d NetworkManager remove; killall nm-applet
  2. Set up your network cards explicitly in /etc/network/interfaces (this isn't hard, but NetworkManager's duty in life is to crap on this configuration, it seems) and do a sudo /etc/init.d/networking restart
  3. Install dhcp3-server and squid, and configure them as appropriate. Most important is to change the squid.conf line like
    http_port 3128
    to
    http_port 3128 transparent
  4. Use FireHOL for the actual iptables configuration, because life is too short to screw around with iptables scripts and tutorials that don't specify where said scripts go if you want things to actually, you know, work. My /etc/firehol/firehol.conf file is like this:
    version 5
    
    transparent_proxy 80 3128 proxy
    
    interface eth0 outside
    	policy accept
    	server http accept
    	server ssh accept
    	server https accept
    	client all accept
    
    interface eth1 inside
    	policy accept
    
    router nat inface eth1 outface eth0
    	masquerade
    	route all accept
  5. Angrily post this article to your blog because seriously why does Ubuntu documentation have to suck so bad
The (only) downside to FireHOL, aside from its website being a bit difficult to figure out and its documentation being hard to navigate, is there's no way (so far as I can tell) to specify which interfaces get the transparent proxy, so you can't restrict it to a certain set of clients on the lan side. So if you're doing this to, say, test how transparent proxies affect cantankerous embedded devices, you're going to have to accept it also screwing around with your desktop's web browser. C'est la vie.

Jewel of India ()

by fluffy at 7:15 AM
Oh yeah, I'm in this week's Song Fight, as part of The Orange Collective. I played cello.

May 26, 2010

Put a swing on it (, , )

by fluffy at 8:12 AM
The Swinger is a simple Python app which uses a music-analysis web service to automatically convert any straight-rhythmed song to a swing rhythm. Of course, my music tends to be a bit weird in the rhythmic department, so I decided to try a few of my songs through this.

I especially like what it did to Baby, Be Quiet — it completely changed the song's character. Run Faster didn't fare as well (although it gets better once the guitars kick in). &counting actually worked pretty well; it's a bit ironic that it had an easier time with the beat on that than with some of my other songs. And of course, Sometimes It's Hard To Keep Yourself Moving was conventional enough that it worked out.

I did try a few other songs, which just became unlistenable (due to stretch artifacts) and didn't even get any rhythmic modifications (such as Sorry To Inform You and Double Take).

May 21, 2010

Lactobacillus and Bifidobacterium: My heroes! (, )

by fluffy at 7:59 AM
I used to eat a lot of active-culture yogurt, but I fell out of the habit a few months ago. But it turns out that it may have been doing more for me than I thought.

So I bought a whole bunch of active-culture yogurt on Tuesday and have been eating two servings a day (one for breakfast, one after dinner) and my ulcer symptoms have already all but disappeared.

So three cheers for this critter and its partner (who, sadly, does not come in a plushie, but looks similarly nondescript).

I think I might start culturing my own yogurt, too. It's fairly easy to do and somewhat cheaper than buying the active-culture stuff at the store.

May 17, 2010

American healthcare is Kafka-esque ()

by fluffy at 3:27 PM
So in addition to the whole "insurance wanted me on an unsuitable medication because they didn't want to pay another $15 for the suitable one" issue, I'm still having ulcer problems which are apparently independent of the GERD, so since I had today off anyway I made an appointment with my doctor, who did nothing but referred me to another doctor, a gastroenterologist, who could do an endoscopy and a biopsy. (Even though this two-minute conversation could have happened on the phone, I still had to come in and pay a $20 copay.)

The gastroenterologist's secretary wasn't very enunciative and she was impatient with me when I didn't just predict what information she wanted from me. Then she said that he's only at the office that I would see him at two hours a week (and was very impatient about that, and apparently assumed I was going to debate her on it), and the doctor insists on seeing every new patient with an office visit before doing any procedures. So I asked when I could make an appointment for. The first one in my local office would be June 16, a month from now. So I asked about the other location, and rather than volunteer information about appointments, required me to ask about specific days. I said I preferred afternoon appointments, and she said that would restrict it to only Mondays, and the next Monday appointment would be June 14.

Maybe I should call my primary care physician again and ask him to just put me on antibiotics for H. Pylori and see if it works, because I'd much rather take potentially-unnecessary antibiotics for two weeks than to have to wait a month to find out that it'll take another unknown amount of time before I can even get a basic diagnosis, my stomach hurting the whole time.

Recordings posted (, )

by fluffy at 12:45 PM
Sadly, this is the best performance I've had so far, I think. Note to self for next time: practice Sometimes It's Hard To Keep Yourself Moving without looking at the guitar neck, because the microphone is in the way and it's hard to play barre chords by feel.

Also, stop rushing.

Technology gripes from my trip (, , )

by fluffy at 9:54 AM
As great as technology was for my road trip (giving me a lot of flexibility and ad-hoc decision making without a lot of preparation), where my road tech of choice fell flat, it caused a lot of aggravation which seems like it would be pretty easy to make better.

Most of these are related to the Google Nexus One, but I have a couple of iPod issues too.

May 16, 2010

Long Beach was a success (, , , )

by fluffy at 8:15 AM
  • Took 101 on the way down. Kept regretting taking that instead of 1. Then I hit LA and traffic got terrible but I repeat myself. I think the extra time for 1 would have made the final part that much more annoying.
  • Thursday night went to Tokyo Wako, which is a terrible, terrible restaurant. I was hoping for some simple sushi but everything there was best characterized as "too much of everything." Both rolls I got (one spider roll, one unagi roll — helpfully called "eel roll" instead for us poor Americans) were loaded up with avocado and disgustingly-sweet teriyaki sauce, and the pieces were too large to fit in my mouth and fell apart and so on. It's basically a local chain version of Benihana. NOT RECOMMENDED.
  • Friday I went to the aquarium, which was nice, except that it happened to be the same day that a lot of LA elementary schools were taking a field trip, so I had a hard time taking any pictures or reading the signs or enjoying a nice quiet day at the aquarium. So, not very nice.
  • Went to Zephyr, had half a grilled tofu sandwich (which was good but I didn't have much of an appetite before my set and after my set it was too late for me to eat anything per GERD treatment protocol), and had a great performance after a couple of false starts. Unfortunately, the stream crapped out just as I was getting good (or at least, I like to think so, but I haven't listened to the recordings yet). Got most of the musicians in the crowd to join me for a rousing chorus of Night Terrors, which was a wonderful trainwreck (in a good way).
  • Saturday, wandered around the area near the hotel before going to a barbecue at Ross Durand's house. I showed up early (because traffic was way better than expected), and met his family, and slowly other Song Fight people trickled in, although the two who I really wanted to see again (MintyHandy and Johnny Cashpoint) couldn't make it due to bad circumstances. But that's okay. Got the next fight's title from Spud over the phone, and Alex (of the Seamus Collective) wrote an absolutely brilliant song, which we recorded in bluegrass style. I played cello. We're probably going to collaborate on improving parts of it over the next several days pre-submission (Ross wasn't feeling comfortable enough with his dulcimer playing to record it along with us, for example, and I'd like to record a separate cello part for the bridge and maybe some vocal harmonies) but even as recorded live it was wonderful. I got video, which I will post after the fight goes live.
  • This morning, woke up at 5 AM and couldn't fall back to sleep. At 7 AM a badly-organized gay pride parade circled around the lagoon by the Hyatt. There were maybe 20 people in it, and their chant was: "What do we want? JUSTICE! When do we want it? NOW!" and of course it was not in a place that it would be seen or heard by anyone except tired out-of-towners.
  • Now I'm just trying to figure out if I want to take 101 back (semi-pretty drive, but I've already seen it), or 1 (very pretty but also a grueling endurance test), or I-5 (a little faster than 101, boring). Will definitely be stopping at Chris's on the way in any case.

May 14, 2010

Watch me humiliate myself LIVE (, )

by fluffy at 4:16 PM
So I'm in Long Beach to perform in a concert. Here is where it will be broadcast. Be horrified as you discover what I really look like, and how much worse I am at playing live than in the studio!

May 8, 2010

Gig next week (, )

by fluffy at 2:13 PM
I've neglected to mention it here, but for those in the LA area, I'm doing a gig at the Zephyr Vegetarian Cafe in Long Beach next Friday (May 14th) along with a few other Song Fight folks, including and especially the inimitable Johnny Cashpoint. The show starts at 7. Be there, or don't.

May 2, 2010

How not to treat GERD (, )

by fluffy at 7:10 AM
Cheap Italian food at 8 PM, followed by some caffeinated peppermints during a long midnight drive home.

Also it turns out that being woken up by a sharp pain at 5:30 AM feels a lot like dying. Enough so that I called 911 and they thought it was necessary for me to go to the hospital, and I had my first ambulance ride ever. My vital signs were fine, and my BP was actually elevated at first (but eventually returned to normal). The doctor on-call (Dr. Chandra, who is not an ostrich) asked me about my history with GERD and established that it was probably just last night's dinner, which was a party for a friend. At dinner I had a feeling it would cause something like this, but I wasn't really thinking straight, and I was afraid of major complications so that helped to fuel my panic that kept me from just going back to sleep.

Well, that and I was feeling drained and numb and hazy and I was shivering like crazy despite my apartment being a rather warm 71°F.

Anyway, I'm sure the real pain will be when I get the bill from my insurance.

Do android chefs grill electric mutton? (, )

by fluffy at 12:29 AM
So, now that I have a nicely-rebuilt balcony, I decided to get an electric grill. (California fire codes ban the use of charcoal, propane, or other combustible-source grills within 10 feet of a combustible wall of a multi-unit building.) There are a few models that I was looking at, but based on what I read online, the Weber Q 140 seemed like the best bet. Of course, all the online purchase options would have cost just as much as just buying it locally, so I decided to go to Bed Bath and Beyond to buy it.

BB&B didn't have the Weber in stock, but they did have the Sanyo HPS-SG3 on sale for only $40 (same as Amazon's price, although obviously I had to pay sales tax this way), and the helpful sales associate who pointed me to it spoke very highly of it (and apparently America's Test Kitchen reviewed it very favorably), so I decided to buy that instead.

It is basically just a heating element integrated into a cooking surface (in an extremely well-designed manner), a plastic (but also well-designed) stand, and a metal drip tray. I don't expect the plastic stand to really hold up very well, though. I'm already thinking of making some sort of metal stand for it (maybe by adapting a cheap charcoal grill ) that would allow me to also put a lid on it (some of the Amazon reviews recommend using an aluminum baking pan as a makeshift lid, but I'd be worried about that melting the plastic base immediately) which would then also make it suitable for smokier cooking.

At the very least, this electric grill and a Stovetop Smoker together cost less than even the cheapest electric grill+smoker I could find (and most of them cost at least twice that).

I will be sure to keep people apprised as soon as I have a chance to actually cook with this thing (which will not happen until I get a sufficiently-large patio table and an extension cord).

I also realize how silly it is to take an item that is supposed to bring an outdoor cooking technique indoors and then immediately try to make it an outdoor thing.

May 1, 2010

The world's cheapest iPod/iPhone stand ()

by fluffy at 10:06 AM
A post on Matt Haughey's blog reminded me that I never shared my secret to making an excellent and cheap iPod/iPhone holder.

Materials:

  • One large metal paperclip
  • (Optional) Some insulation taken off of some wire or a bit of shrink wrap or whatever (or use an insulated paper clip)
Procedure:
  1. Bend the paperclip to look like this:
  2. Insert iPhone/iPod/whatever: