July 2008
4 posts
New Blog!
Heads up everyone. I’m moving my main blog back to www.matschaffer.com.
Tumblr has been pretty good to me, but I got frustrated the lack of comments and difficulty posting code snippets. This will likely be my last post to tumblr, so please update your feedreaders and bookmarks accordingly.
Thanks! -Mat
Scalability is not your problem, getting people to give a shit is.
– I’m Going To Scale My Foot Up Your Ass - Ted Dziuba (awesome article overall)
Tim Bray at CIM
Tim Bray came to talk to us at CIM. I was extremely gratified when he started the talk by essentially telling us all to at least learn Rails. I guess it’s time for me to do that rails brownbag.
We got a recording for posterity too. Thought I don’t get the impressions we’ll be permitted to release it. :(
Karaoke singer attacked after starting song →
Yet more reason to have private karaoke boxes. See http://www.yakitoriboy-japas.com for more information.
June 2008
6 posts
Subversion 1.5 Release Notes: Merge Tracking
→
Here’s one to file under about-frickin-time
Be transparent. Share your work constantly. Solicit feedback. Appreciate...
– iBanjo » Blog Archive » Programmer Insecurity
Here’s the first problem. The new KDE launcher is a gynecologist interface:...
– KDE 4 UI critique
Removing things accidentally committed to git
So a few days ago I accidentally checked a bunch of my mp3s into the git repo for matschaffer.com. This blew out the size of .git and made clones a pain. So I wanted to remove it. I got some help from “jast” in the git IRC channel which set me straight.
In this case I had committed and pushed the mp3s, then committed one more change after that. So the bad commit was HEAD^^, but I...
Obsolete technology band - Hack a Day →
That last video is from this article. All the videos are worth a look.
May 2008
6 posts
Changing passwords on OS X disk images...
I couldn’t find this one in google too easily so hopefully this’ll help people out in the future. If you’ve created an encrypted disk images with Apple’s Disk Utility and need to change the password you can do it with:
hdiutil chpass /path/to/image/file
It’ll prompt you for the old password, then the new password twice.
Using SSH key authentication in Capistrano
This just took me 15 minutes too long to figure out, so here’s how to do it.
set :ssh_options, :keys => '/full/path/to/id_rsa'
Put it in ~/.caprc if you have any other developers on the project so they can set up their own stuff.
Capistrano passes :ssh_options nearly verbatim to Net::SSH. So if you need reference on other possible options, check out docs for Net::SSH.start.
It can be anything from “having a great day!” to “conquering...
– Plaxo Pulse - Events
Faking independent subqueries in MySQL
So one of my associates laid this little gem on me yesterday that kinda floored me.
Say you have a query that counts the number of members in a group that looks like this:
select count(*) as members from users where id in (select user_id from memberships where group_id = 1);
You may know that this query can take a long time as the number of rows in the users table grows. Why? Take a look at...
March 2008
12 posts
Damien Katz: What Sucks About Erlang →
Harsh. But I can’t imagine an author more appropriate for an article like this.
SmartSleep →
Annoyed at your Mac’s sleep behavior? Try this.
MacPorts + mod_python == boo
It seriously just took me post of the night that in order to install mod_python in macports and have it work properly you have to also install py25-hashlib. Still not quite working, but at least it’s not just crashing out anymore. I’m on OS X Leopard. I get the feeling Tiger would have the same issue so long as you’re on MacPorts 1.600.
Source:...
Git servers for the rest of us
I’m sure you’ve heard about the cool new kid on the source code management block: git
There’s lots of good info already out there about how to install git on your machine. My good buddies over at Kinetic Web Solutions even put up a nice set of commands to get it installed. First hint: it doesn’t involve MacPorts.
But before I really use something, I need to know how...
February 2008
2 posts
I love the intertubes
telnet://towel.blinkenlights.nl/
If your .profile is getting too long
I was getting sick of my bash profile being really long today. There was a bunch of old cruft in there, and some of the stuff was getting hard to find. So I tried this:
for LIB in "$HOME/.shell.d/"*.conf; do
source "$LIB"
done
And so far it’s working pretty well. Now I just make a set of blah.conf files in .shell.d. I can divide them up however I want and it all just works. ...
January 2008
1 post
It would be cool if...
…there were an app for OS X that used the isight and face detection to know when I’m not at my computer.
December 2007
8 posts
if you are spending more time writing code, than thinking about what code you...
– Developing at the speed of thought
Building a climbing wall at the top of the stairs... →
VectorMagic
| Precision Bitmap to... →
November 2007
2 posts
gem_server on Leopard
Folks are starting to report that gem_server is indeed missing on the regular OS X Leopard installation. Supposedly it exists on the server edition. But that’s no reason to worry. You can simply create your own using the following #! /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby require 'rubygems/server' Gem::Server.run ARGV Place it at /usr/bin/gem_server, give it...
October 2007
3 posts
99 Bottles of Beer | Language LOLCODE →
i LOLed
Ahh... Japan.
Made at http://www.uniqlo.jp/uniqlock/.
Seam Carving for Content-Aware Image Resizing →
This is really flippin’ cool!
September 2007
4 posts
Building CouchDB on OS X
Update: Congrats to the CouchDB team on some major work to the build system! With the help of some folks in #couchdb I got the new build installed on OS X.
Install MacPorts Run the following:
sudo port install erlang
sudo port install icu
sudo port install subversion
sudo port install automake
export PATH="/opt/local/bin:$PATH" # Ensures MacPorts automake gets used rather the OS X version
svn...
Limit the team to 8-10 people because communication [is] hard. They are called...
– Amazon Architecture | High Scalability
Neat shell tricks
First, I really enjoyed Andy Libby’s post about some of his favorite command line tricks. Great stuff!
It also got me hunting for some new tricks. Here’s what I’ve found so far:
Substitution with ‘^’
$ /etc/init.d/httpd stop
$ ^stop^start #executes /etc/init.d/httpd start
Using CDPATH to get at common directories
$ export CDPATH="/usr"
$ cd bin # goes to...
Okay... at least the 'curb' gem is better.
Curl::Easy.perform(url) do |curl|
curl.multipart_form_post = true
file_field = Curl::PostField.file('File', file)
file_field.content_type = 'application/xml'
curl.http_post(file_field)
end
August 2007
4 posts
OMG Multipart file uploads in Ruby are ugly
Maybe my google-fu just failed me, but this is the best I can dig up for using Ruby’s Net::HTTP to make a multipart post for uploading files to a webapp. Eww…
require 'open-uri'
require 'net/http'
require 'cgi'
def post( query, headers={} )
Net::HTTP.start( "www.yourserver.com", 80 ) { |h|
h.post( "/cgi-bin/your_script.rb", query, headers )
}
end
class Param
...
Independents Hall » Let’s walk through through... →
Independents Hall has a home! Congratulations to Alex and Bart for pulling this all together. Very exciting to see this kind of talent and initiative in Philadelphia!