Log in

No account? Create an account
Ryan's Journal [entries|friends|calendar]

[ userinfo | livejournal userinfo ]
[ calendar | livejournal calendar ]

gnus for mail with automatic smtp selection [05 Mar 2008|11:45am]

Yesterday I spent some time setting up gnus for mail.

While I'm happy to be using emacs for composition, and I'm ok with the gnus user interface, it seems really *slow*. Also, I haven't figured out how to get gnus to periodically check for mail/news without me switching to it and hitting 'g'. So my gmail tray thinger lights up, I switch to gnus, then have to M-g on nnimap+gmail:INBOX, which takes more than just a second. And loading each mail is quite pokey as well.

So I'm considering going back to the setup I had in college, basically mutt+emacsclient.

But since mutt doesn't natively support smtp, that means trying to figure out how to configure postfix to appropriately relay my mail based on the sender. Which is apparently doable but will probably eat several hours unless it only takes five minutes. Lazyweb, if you could point me at a working config that doesn't use sendmail, I'll probably switch to that MTA and cargo cult it.

Speaking of choosing an smtp server based on the sender, I actually got gnus doing precisely what I want, with this bit of fun:

There be elisp here ...Collapse )

With this setup, replying or composing while I'm looking at an IMAP folder automatically uses that from address, and then my advice automatically swaps out the correct smtp params. I should really have a list of them or something but I'm not invested enough in gnus for mail yet to take the time.

1 comment|post comment

Free sofa-bed (Seattle area) [27 Feb 2008|03:00pm]
I need to get rid of my sofa-bed. I've had it since college. It's not the latest fashion, and it's spectacularly heavy. But it's free. I'll probably post it to craigslist later today.
post comment

Red Hat Liberation Fonts [24 Feb 2008|08:32pm]
I love Red Hat's Liberation Fonts. They are a wonder of clarity. The monotype is way better than DejaVu, and a bit better (and FREEer) than Consolas. The only issue is that it's not as good as DejaVu at the l/1 difference. And for some reason O and 0 look the almost exactly the same. But the cleanness of the font wins me over nonetheless. They're not in the default ubuntu repositories or anything, so grab them and check them out if you haven't seen them.

Update: In comments, codeman38 pointed out that there are newer better versions of the Liberation fonts. See Red Hat Bug 427791, which contains an attachment with a tarball, couple of rpms, and zip file with the new versions of fonts.
2 comments|post comment

If you want something done right, you have to pay people ... [15 Feb 2008|01:03pm]
LucyHonestly. I mean, I think it's great that the animal shelter is staffed by volunteers. And I sympathize with the shelter's desire to combat the feline overpopulation problem. But, really:

Wed Afternoon: We select a cat (Lucy). We're told she's scheduled for surgery on Friday, so we can pick her up Saturday.

Wed Evening: We get a phone call. They're going to bump Lucy's surgery up so that we can pick her up on Friday. We're overjoyed.

Thurs Evening: We get a phone call. The vet couldn't fit Lucy in, so she's going to go with her original slot. We can pick her up Saturday. We're disappointed, but that was the original deal, so whatever.

Fri Morning: We get a phone call. Somebody forgot to take away Lucy's food, so she can't undergo anesthesia. No chance of surgery over the weekend. Now we can't pick her up until TUESDAY.

At this point, please, can we just get the cat? We'll sign a contract saying we'll have her spayed as soon as possible. Sheesh.
post comment

Free Safari through my local library? [13 Feb 2008|03:44pm]
It appears that if one has a Snohomish-Island county library card, one can access O'Reilly Safari for free through the library website.

At least, that's how I'm interpreting this.

The library membership eligibility requirements seem fairly liberal, but I don't quite understand who is or isn't.

In any case, I've applied for a card, so I hope to be getting one in the mail soon. Since I do live in Snohomish county, I'm hoping my chances of approval are high.
post comment

CFBs [06 Feb 2008|02:05pm]
I like GE HELICAL bulbs.

I hate "Conserv-Energy" bulbs.

The GE ones come on right away and are almost instantly bright. The Conserv-Energy bulbs have that annoying delay when you flip the switch and take a long time to come to full brightness.

post comment

Public Service Announcement [29 Jan 2008|11:55am]
Do not ever use Microsoft Publisher to send email.

This may seem obvious, but today I got some emails from a college recruiter that were honestly the most reprehensible emails I've ever gotten. The text/plain was empty. The HTML bit was just an embedded image; the sole content of the image was awful 1992 no-anti-aliasing pixelated text. Not copy/paste friendly. Not search friendly. Not reading friendly.

Anyway, I emailed him back and got a perfectly normal email back. Apparently others had hassled him before me. But I got him to tell me what travesty of a software product produce such a heinous item. In its defense, I'm sure Publisher meant well, allowing your mom to email her "Cat of the Month" newsletter, which had exactly the same crazy multi-column layout as the print version. I wonder if he was exploiting some kind of "mail merge" feature or something.
4 comments|post comment

$@ [22 Jan 2008|06:24pm]
If you've ever written a bash shell function, and you don't know the difference between $@ and "$@", you'd better go look it up, because you have some bugs to fix.
post comment

Firefox: spell check any field [22 Jan 2008|12:31am]
I hadn't noticed, but by default Firefox only spell checks "long" text fields.

You can of course configure firefox to spellcheck all text fields
1 comment|post comment

(iswitchb-mode 1) [20 Jan 2008|04:58pm]
Oh, emacs users, tell me you already know about iswitchb. How did this escape my notice for 8 years?
2 comments|post comment

Settlers of Catan and Expansions Pieces Manifest [20 Jan 2008|02:16pm]
I have created a google spreadsheet which is a manifest for all the pieces required for Settlers of Catan, Seafarers of Catan, and Cities & Knights of Catan, including each of their 5-6 player expansions.

Settlers of Catan and Expansions Pieces Manifest
2 comments|post comment

really small usb thumbdrive [18 Jan 2008|03:05pm]
Check out my awesomely tiny PQI i810 thumb drive. It has significantly reduced the amount of pocket volume I must devote to flash memory.
post comment

[18 Dec 2007|11:23am]
It turns out that nobody wrote the automated test to check if Vista provided users with a compelling reason to upgrade from XP.

-- Joel Spolsky
2 comments|post comment

www.ryan.test ??? [03 Dec 2007|06:48pm]
Hey, so when I typo something and the reload fails on my Catalyst dev server, it goes down. No big deal.

I use the URI "http://ryan.test" for my development server -- test being a nice reserved TLD and everything. I just pop in the hosts file and I'm good to go.

The problem is, when firefox can't connect to ryan.test, it's decides it would be a really great idea to automatically try 'www.ryan.test'.

It drives me nuts, because it changes the URI in the location bar, then I'm just hosed.

Searching for things like "auto", "www", "prepend", "guess", "stupid", in about:config isn't helping me.

Anybody know how to turn it off?
3 comments|post comment

James Berardinelli's ReelViews [03 Dec 2007|04:53pm]
Looks like James Berardinelli's ReelViews got google-jacked by some ad-squatting site.

Just doing my part to try to reweight the real site.

Anybody know what recourse a site has in this case? How are you supposed to notify google?
post comment

dot hash files from emacs [03 Dec 2007|04:51pm]
Something keeps dropping files beginning with ".#". I suspect emacs. They're actually like weird inode links or something. I think when I go to save a file that's currently being read or something it moves the current copy to the .# file and then it goes away when the pending read is done. But it leaves a .# turd in the directory, which is a problem for Catalyst.

Anybody know what this is about and how to configure it? It's amazingly difficult to search for this problem. And google isn't helpful with 'emacs "dot hash"'.
4 comments|post comment

man renders incorrectly over SSH under CentOS/RHEL [26 Nov 2007|01:09pm]
Platform: RHEL/CentOS
Symptom: Gibberish instead of <> around http://www.gnu.org in `man groff`.
Reason: LANG=en_US.UTF-8
Fix: Set LANG=en_US in /etc/sysconfig/i18n

My story ...Collapse )

I was surprised a simple googling didn't solve this issue. Maybe I'm just bad at searching. Maybe everyone who runs Red Hat already knows about this. Anyway, maybe this will help a future traveler. I imagine this has to do with something weird my friend chose during the CentOS setup, since apparently serverbeach was smart enough not to do the same thing. :-) But I have no clue at this point how to avoid this during setup, only how to fix it afterwards.
post comment

RESTful mitigations to CSRF? [23 Nov 2007|04:31pm]
I've been thinking a lot about URI-design and content-negotiation in general and REST in particular with regards to the new service I'm working on.

The RESTafarians argue that any session-based mechanisms on top of HTTP (i.e. cookies) are evil. They argue in favor of HTTP-based authentication using the standard WWW-Authenticate and Authorization headers. Etc etc.

What I'm wondering is how this all jibes with "Cross Site Request Forgery" attacks. A CSRF is basically where another site tricks a user into taking an action on your site, exploiting the fact that they're already logged in. REST-based verb purity helps with some issues (e.g., since REST enforces idempotent GET, tricking a browser into following an <img> or <script> src can never be dangerous). Browser same-origin policies generally mitigate information disclosure since someone else's javascript can't XHR to my service and eval the response. However, it's still easy for a phisher to use script or just skulduggery to elicit a POST from the user agent to a site of their choice, as most users will click through any "cross site" post warnings. Since POSTs are explicitly for altering state, REST doesn't help us there. The user agents tend to treat the Authorization header a lot like Cookies, which is to say that your unwitting request will include your auth data provided you had already authenticated during this session.

The usual mitigation for blocking cross-site POST requests is to require the inclusion of a session identifier (usually just the value of your session cookie) in the POST data. Here's the rub, of course. RESTfully speaking, HTTP should be stateless, obviating the existence of any such identifier. Including any kind of session/nonce in the actual POST data destroys its repeatability as a valid request -- this is the point -- but breaks one of the core tenets of REST, as I understand them.

So here's my question: Is there a RESTful mitigation for cross-site request forgery, or is this a deal breaker for pure REST-style implementations?

I mean, I can still use RESTful concepts like proper verbs, content negotiation, etc, but I'm going to need to rely on a session cookie if I don't want a wide open vulnerability in my service, right?
7 comments|post comment

Aglio e Olio [02 Nov 2007|11:00pm]
If you believe, as I do, that there's rarely such a thing as too much garlic (I'm looking right at you greedyalgorithm), then you should try this recipe for Aglio e Olio, or Pasta with Garlic and Oil. As specified below, it will serve 4-6. I cut it down to serve one by simply dividing everything by 4. :-)


1 pound spaghetti
table salt (see note above)
6 tablespoons extra-virgin olive oil
1/4 cup minced garlic (about 30 small, 20 medium, 10 large, or 5 extra large cloves) from 1 to 2 heads
3/4 teaspoon red pepper flakes
3 tablespoons chopped fresh parsley leaves
2 teaspoons lemon juice from 1 lemon
1/2 cup Parmesan cheese , coarsely grated (optional)

1. Adjust oven rack to lower-middle position, set large heatproof serving bowl on rack and heat oven to 200 degrees. Bring 4 quarts water to rolling boil, covered, in large Dutch oven or stockpot. Add pasta and 1 1/2 teaspoons table salt to boiling water, stir to separate pasta, cover, and cook until al dente; reserve 1/3 cup pasta cooking water and drain pasta.

2. While water is heating, combine 3 tablespoons oil, 3 tablespoons garlic, and 1/2 teaspoon table salt or sea salt flakes in heavy-bottomed nonstick 10-inch skillet; cook over low heat, stirring constantly, until garlic foams and is sticky and straw-colored, 10 to 12 minutes. Off heat, add remaining tablespoon raw garlic, red pepper flakes, parsley, lemon juice, and 2 tablespoons pasta cooking water to skillet and stir well to keep garlic from clumping.

3. Transfer drained pasta to warm serving bowl; add remaining 3 tablespoons olive oil and remaining reserved pasta cooking water and toss to coat. Add garlic mixture and 3/4 teaspoon table salt or 1 teaspoon sea salt flakes to pasta; toss well to combine. Serve immediately, sprinkling individual bowls with portion of Parmesan, if desired.
1 comment|post comment

Mr. Jack [25 Oct 2007|05:43pm]
New game, strictly two player: Mr. Jack.

Got it at crowemojo's suggestion. Haven't played it yet.

Update: angel_grrl did not care for it. I'm still forming an opinion.
5 comments|post comment

[ viewing | 20 entries back ]
[ go | earlier/later ]