pushing all git remote repositories

I’m now working on a project that is hosted on github AND rubyforge. And lazy as I am, I don’t want to do:

git push origin
git push rubyforge

That’s why I create a handy shortcut for it and placed it in my ~/.bashrc:

function git-push-all() {
for remote in `git remote`; do
git push $remote
done
}

What it does: it lists all remote repositories linked to that git project and pushes them all. Usage:

git-push-all

Don’t get confused with “git-push –all”! That’s something completely different!

Interactive/inline editor in irb

I saw the MountainWest Ruby conference video: code generation: safety scissors of metaprogramming. And the speaker (Giles Bowkett) used vi from inside irb. And I’ve never liked Vi, but using an editor from within irb is nice! Especially if you’re testing a big chunk of code.

So I began crawling the Internet for how he did this and I found the utility_belt gem. The utility belt contains the file I needed. So I installed the gem, edited my .irbrc and now I can use nano/gedit (or any other editor) from withing IRB!

These were the steps:

gem install utility_belt

My .irbrc:

require 'utility_belt/interactive_editor'
module InteractiveEditing
def nano
edit_interactively(:nano)
end
end

Now to use nano in irb, just type: nano

And the bonus: a nice screencast that shows this feature in action. I tried to edit it with pitivi. But that really sucked. After I finally found it out how I could cut pieces I tried to save it and the whole program crashed. “apt-get remove pitivi”!

40 different layouts

Nice: blog.html.it/layoutgala

Conky

Grof taalgebruikIf I browse some random “post your screenshots here” thread, I always think by myself: “I should install Conky one time, It looks godverdomme nice”. So I apt-get install conky. And what a dissapointment. It doesn’t work out of the box. You have to make and edit a conkyrc file. Just downloading some random .conkyrc doesn’t work because it isn’t geared towards your system. *Sigh* Just wished everything was apt ‘n run.

Resizing images from within Gnome

I take a fairly amount of pictures. Some months more than others. And sometimes I want to share them with relatives/friends. And everyone is using hotmail or some other crappy e-mail provider. So I want to keep the file size to a minimum. Well, then you need to batch resize the photos. What to use? If you search on google, they come up with all these cwazy shell scripts. That’s not what I want!

So I did an apt-cache search, and voila: nautilus-image-converter
Mhhh…. what’s that? After a search on google I found some promissing screenshots. so I did an:

sudo apt-get install nautilus-image-converter

Restarted Gnome and…. resized my images with two mouseclicks! Nais….
Did not have to configure, edit, google, et cetera anything. I just worked™

autoconnecting wlan on startup without gnome / network

Wirelesnas AntenI usually boot up my ubuntu box with gnome, but sometimes I want to play UT (on a bare x server) or I just want to use my laptop as a server. In those cases I don’t boot into Gnome but into the terminal. But the problem is Gnome manages my wireless network card. So no Gnome, no connection.

Some months ago I started searching for a solution for this. I found several options like guessnet, whereami, et cetera. I first tried whereami. But that wasn’t a success. I required to much configuration and didn’t really felt polished at all.

I stumbled upon guessnet last week. I found it in a thread on ubuntuforums. I installed it and after some fiddling with it, I couldn’t get it to work properly. I asked some questions on the forum (nobody answered). So I had to solve it myself. After some trial and error, I managed to come up with a working configuration.

Sorry about the indenting not working. It’s this stupid highlighting plugin that does not behave properly.

My original “/etc/network/interfaces”:

auto lo
iface lo inet loopback

My working config:

auto lo
iface lo inet loopback

auto wlan0
mapping wlan0
script guessnet-ifupdown
map default: none
map autofilter: true #Look for wlan0- interfaces
map timeout: 9
map init-time: 9 #For slow drivers
map verbose: true
map debug: true

iface wlan0-home inet dhcp
test wireless essid USR5464
wireless-essid USR5464

iface wlan0-tim inet dhcp
test wireless essid Tim_online closed
wpa-psk 234243242342424
wpa-key-mgmt WPA-PSK
wpa-proto WPA
wpa-ssid Tim_online

#If all else fails: pick an open network
iface wlan0-open inet dhcp
test wireless open
wireless-essid any
wireless-mode auto

In the configuration above, the Tim_online network uses wpa security. WPA2 is available too if you want to. Just search the net for it. The interface sections are ordinary /etc/network/interfaces configurations. Except for the “test” statement. This is guessnet specific.

I installed the newer package from Debian unstable. Just to make sure it wouldn’t work due to some obscure bug.

The only drawback is that the network applet in Gnome doesn’t show the wireless connection anymore. So I can’t see what network I’m connected to. For that I have to fire up the terminal (iwconfig).

If you have some questions about it: just leave a comment.

Aaahhh

30 April was queens day (?) and 1 may was labourday /  Ascension Day. So I didn’t have to go to work. But when I came home (I live 100km from my work or so) I noticed I forgot to pack the adapter of my notebook. I had 1,5 hours of power left. So I checked my mail and hibernated it. *Sigh* two days without hacking any software… And to make things worse. I now have my adapter back, but I was stupid enough to rip the coax to pieces. After work, first stop: hardware store! I must have Internet tonight!

2.5.1 image uploader bug

I recently upgrade my WordPress installation to 2.5.1 and this annoying bug showed up. After some reading I installed the no-flash-uploader plugin. This plugin disables the faulty (flash) component and replaces it with a traditional uploader. So now I can upload my files again. But it is rather annoying. And I think more people would agree with me.

Blog themes

I’m not a designer _at_all_ but this post on designing a blog theme is very nice. I really like the copyblogger theme I have now. But maybe I’ll try and create something myself. Because a unique theme for a blog is so much nicer.

Also here a post on typography and five principles of effective web design.

com_resize on wordpress plugins

Because I expect a huge, huge demand of my com_resize plugin, I have put it on the wordpress site :)

Now I hope it gets approved.