Archive for the ‘in-english’ Category
Debian get-together in NYC this next 1234567890
So, Biella already posted a reminder, and I'm doing it again on my blog, here.
Attention New York City Debianistas,
The astrological confluence of 1234567890[0], the impending release of
Lenny[1], and the odd sighting of a horned mythical beast that
cryptozoologists are calling a 'new FTP-master-assistant/slave' being
sighted in the mist off the shores of the East River[2] will result in
all emacs users to transcend and all vim users to be transponded to
their respective motherships, which are scheduled for near-orbit on that
night.
You will only be taken if you have a sip of beer on the 13th, before
6:31:30pm at the Pacific Standard[3].
If you come late, you may suffer nano for all eternity.
Micah
ps. All nano users will be Left Behind™ to tend to the servers that we
did not bring with us on the Rapture® rickshaw.
ps. lets keep the the post-apocalyptic space editor battle that will
erupt between the S.S. Church of Emacs, and the H.R.H VIMperator
mothership for later, and drink with revelry together now.
0. `date -d '@1234567890'`
1. http://lists.debian.org/debian-devel-announce/2009/02/msg00000.html
2. http://lists.debian.org/debian-devel-announce/2009/01/msg00004.html
3. http://www.pacificstandardbrooklyn.com
Don't be late, it's at 1234567890!
lib/active_record/base.rb:2808:in `attributes_with_quotes': undefined method `each' for true:TrueClass (NoMethodError)
OK, hopefully this might help someone some time somewhere. If you are getting the error on the title, it's mainly because you are using a changed method on your ActiveRecord model.
I was working with an ActiveRecord model that handles an string with quotes, so when trying to save the model, that exception was raised. The problem is that ActiveRecord uses a changed method internally for all attributes that were modified. When you are using a changed method yourself, you are overwriting it, hence the error. In my case:
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2808:in `attributes_with_quotes': undefined method `each' for true:TrueClass (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2706:in `update_without_lock'
Solution, just get rid of your changed method and rename it something else.
Also helpful information, here.
MySpace, San Francisco and the future
Raquel and I came to San Francisco for a couple of days during this week, mainly to attend the MySpace DevJam. It was a great experience to get to know the west coast as we hadn't have the chance to come over. We also had the opportunity to meet with my great friend Marco Manzo, who is working for Leap Frog in the Bay Area.
On the MySpace side, I'm glad to see that some real and good improvements are being made to open the platform as much as possible. I think this is crucial to them, in order to re-gain the market that they have been losing over to Facebook. They are making great effort by following the Open Social 0.8 spec and working together for the upcoming 0.9 release. Offerpal is also doing good, with an attractive business model for virtual economy. Props to them who organized the little get-together. Also, it's going to be interesting to see how things go with the newly introduced OpenSocial markup language (OSML) and its integration into the MySpace platform. Some of the new interesting features are also notifications and the activities report. I'm looking forward to toy around with it later.
Anyway, we didn't tour that much of San Francisco, since we were also working most of Thursday and Friday. We visited the Mission district, which feels a little bit like the hood I was probably supposed to grow up into, but never did. It feels a little bit like the multicultural harmonic Mexico that we all would like to have, it really makes a lot of sense why a lot of Mexican people come either legally or illegally to these towns. I also bought some bread on a Mexican bakery, had tortas and ate a bit of jícama con chile on a fruit stand; most of the people is friendly, unlike real Mexico
We also went to the Golden Gate bridge, which is an amazing piece of technology, it's just amazing. Pictures will be uploaded to our Flickr photostream.
Finally, I'd like to point at how amazed I am right now. I'm currently sitting on a plane, but I'm not saving this blog post to publish it later, I'm fucking online on-flight! This is amazingly possible thanks to Gogo, which is a company that it's enabling these services for some American Airlines flights, and other airlines apparently (see their Wikipedia page too). Apparently, they have some sort of land towers where they send some kind of signal to only some equipped planes. And it's quite cheap, 12 or 13 bucks for the service; given that this is a 6-hr flight, it's totally worth it. If your laptop's battery dies, you can still use your portable handheld device or other computer even. The speed? It's pretty shitty on upload, but it's decent on download, it just kinds of reminds me of a regular aDSL connection in Mexico. I just wish planes would give people the ability to plug themselves into electricity, that'd kick ass too.
Whoops, a bit of turbulence now
And now Apache2::EmbedMP3 for your songs collections!
After I spent time working on Apache2::EmbedFLV, I thought it was a good idea to do the same for audio files, specifically MP3 files.
So now that you have your MP3 files on your web server and they are accessible to the world, you may want to show them with an embedded audio player. Well, Apache2::EmbedMP3 is exactly for you!
EmbedMP3 uses the fabulous WP Audio Player, a small, elegant, GPL Flash audio player, similarly to how Apache2::EmbedFLV uses Flowplayer. The interesting thing about EmbedMP3 is that you can display more interesting data on the template such as song name, artist, album, year and also lyrics, which was an interesting feature I added. In this fashion, it's very easy to just drop a whole bunch of files into a directory and all be served with the custom interface.
You have to instruct Apache2:
<Files ~ "\.mp3$">
SetHandler modperl
PerlSetVar wpaudioplayer /audio-player/player.swf
PerlSetVar wpaudioplayer_js /audio-player/wpaudioplayer.js
PerlResponseHandler Apache2::EmbedMP3
</Files>
And that's it. Take a look at the documentation to see how to point it to specific locations for WP Audio Player, template file, etc.
You can see the hack in action at http://dev.axiombox.com/~david/mp3. If it struggles a bit by buffering, it's because that's directly from my home Internet connection, so give it a small break
And, as I suggested the Radiohead video with EmbedFLV, I suggest now this Black Eyed Peas song, Like That, it's very catchy and I love it
Go get the code at the Git repo or at CPAN (once it's updated and published).
Quick feed aggregation with Vitacilina
Vitacilina, ¡ah, qué buena medicina!
A few months ago. Maybe more than a year, I started hacking on Vitacilina, which was meant to be the replacement for Planet on all countries Planeta Linux supports. I was doing well, I even hosted the code back then in Google Code. Later, I forgot about it, but I'd always been wanting to replace Planet with some homebrew solution for the Planeta Linux community. Anyway, that hasn't happened yet. However, I did start using Vitacilina for my own needs on a local sandbox for my employer and it used to work pretty well. I've been hacking it to fit very specific requirements, though.
Anyway, I thought it was a good moment to release it publicly, just because it was all hidden there. So, I didn't implement the changes I did for my employer (because they were very specific for our products) but I did clean it up and wrote some documentation.
Now, what exactly is Vitacilina? Well, it's a feed aggregator. It's written in Perl (it's a Perl module) and it uses YAML to get its list of feeds and names and Template Toolkit to format and dump the output, it was efficient for me because it was very easy for me to create dumps:
use Vitacilina;
my $v = Vitacilina->new(
config => "config.yml",
template => "template.tt",
output => "output.html",
);
$v->render;
And that's it. I used to create YAML files on the fly to create new Vitacilina objects and render them according to some data.
The config file would look something like this:
http://myserver.com/myfeed:
name: Some Cool Feed
http://feeds.feedburner.com/InfinitePigTheorem:
name: David Moreno
And the template file:
[% FOREACH p IN data %]
<a href="[% p.permalink %]">[% p.title %]</a>
by <a href="[% p.channelUrl %]">[% p.author %]</a>
[% END %]
In that way, it's very simple, quick and easy to do aggregations. I just love TT, why wouldn't I?
So go grab Vitacilina at CPAN. Also, the Git repo is at github.com/damog/vitacilina.
However… I started to hack on a similar more ambitious project called rFeed, that it's more of a framework than a simple library, which is why I stopped further Vitacilina development. I'll talk about rFeed later when the time comes.
More Git tips?
Make sure you add the just launched git ready blog to your feed reader. Made by qrush. Audience applauds!
Introducing Apache2::EmbedFLV – Exposing FLVs with Flowplayer and a customized interface
Situation
You have a bunch of Flash videos, FLV files. Every once in a while you dump new files on your publicly accessible Apache directory. You would like to give your users the ability to play those FLVs within a webpage you provide, instead of just serving them the files for a direct download. Maybe you want this for all FLVs, not only an specific directory.
Solution
<Files ~ "\.flv$">
SetHandler modperl
PerlResponseHandler Apache2::EmbedFLV
</Files>
So now, all your FLV files will be served through Apache2::EmbedFLV on mod_perl with a neat interface you can define yourself, and using the very nice and GPL'ed Flowplayer.
Apache2::EmbedFLV uses a default template, but you can define your own with:
<Files ~ "\.flv$">
SetHandler modperl
PerlSetVar template /path/to/your/template.tt
PerlResponseHandler Apache2::EmbedFLV
</Files>
Also, Apache2::EmbedFLV expects to find Flowplayer (flowplayer.swf and flowplayer.controls.swf) on http://your.server.com/flowplayer.swf, the root of your server. So you can do something like this to make it work:
Alias /flowplayer.swf /home/web/flowplayer/flowplayer.swf
Alias /flowplayer.controls.swf /home/web/flowplayer/flowplayer.controls.swf
Or, you just define the flowplayer variable:
<Files ~ "\.flv$">
SetHandler modperl
# relative to the document root
PerlSetVar flowplayer /swf/flowplayer.swf
# or absolute:
PerlSetVar flowplayer http://my.other.server/was/hacked/flowplayer.swf
PerlResponseHandler Apache2::EmbedFLV
</Files>
Action!
You can see it in action at http://axiombox.com/apache2-embedflv/flv.
This Radiohead video is particularly cool
Getting it
- More information at its homepage, http://axiombox.com/apache2-embedflv
- CPAN module.
- Git repository, as usual, on GitHub.
UPDATE: Oops! Fixed link to Flowplayer's website! flowplayer.org. Thanks to those who noticed and let me knew.
FeatherCast: Apache Software Foundation /unofficial/ podcast
I recently stumbled upon FeatherCast, a nice little project made by Rich Bowen and David Reid, the former, a recognized documenter within the Apache community, author of a few books on the webserver, mainly the Apache Cookbook. FeatherCast is an unofficial podcast; its primary goal is supporting the Apache Software Foundation community. I've found it to be greatly interesting, modern and up to date; more recently, bringing lights to some of the content and people, for instance, featured on ApacheCon, which took place in New Orleans, LA, late last year.
Great effort, great initiative: Subscribe and support FeatherCast!
MacBook Pro
As I tweeted yesterday, I received my new MacBook Pro. I was a bit skeptical on choosing this computer being a Linux user/developer for quite some time now. I thought it was worth giving it a try anyway. Besides, I still use my old Powerbook; as my home server since I've always liked the Mac hardware.
For the time being, I'm not running Debian in it, but I will install it sooner or later, for now, I've reached some stability and productivity on the current setup, I'm running MacPorts, which brings all the nice open source goodies to Leopard, Vimperator, TwitVim and all sort of terminal scripts to make Terminal.app more delightful to work with. We'll see how it goes.
Hard obstacles that I've found so far that were a pain to deal with:
- More than one Ruby and RubyGems installation (the base system, and the MacPorts installation).
- MySQL on MacOS (specially hard if you are trying to make all work from MacPorts).
- Getting used to "Spaces". I like one row with up to eight or ten columns. Apparently, you can only have up to four column spaces.
- GNOME-Terminal vs Terminal.app.
- CA certificates to make Mutt (or fetchmail) work properly with SSL (post to come).
- MacOS' postfix.
All of this is obviously workaroundable, but being a Linux dork it sometimes takes more time
TwitVim: Nice Twitter client
I do like Twitter. For quite some time now I've been trying to find a Twitter client that I'd really like. I've tried, lots of them, Twhirl, Twitux, microblog-purple (which I started to dislike since I'm not IMing that much anymore and it can become extremely annoying if not blocked), TweetDeck, etc. All of them don't seem to fill my own needs and preferences. Even when Twitter used to support IM, I came up with probably the best solution I've used so far, GTalk on Bitlbee, so I could easily use Irssi with it. I have also been suggested to use Twidge but direct command-line IO is probably not the best for me. I want to have it a console emulator window, maybe screened in a remote server, running all the time, auto-updating, unobstrusive.
Given this, I started to hack on my own personal client using ncurses. Sadly, my lack of deep knowledge of the not-too-intuitive ncurses API made me abort the project. Maybe some day I could retake it. Shame.
Anyway, within the last week, I found and have been using TwitVim. I like Vim: It's my editor of choice for most of my projects. And TwitVim is a really nice project supporting a lot of interesting features:
There you can see how, on a non-obstrusive way, you can have it running. Since it's built on Vim, you can also do some key mappings so that you don't have to type all the commands. And it has all sorts of really cool and interesting features, like if the cursor is on a given line, \r will start a reply, or other binding will start a direct message, etc.
Here's a picture of my own timeline:
Once you have installed it, take a look at the extensive and detailed documentation with:
:help TwitVim
However, the only downside is that it doesn't auto-refresh. But you can map a key for quick update:
:nnoremap <F8> :FriendsTwitter<cr>
What Twitter clients do you like and use?






