December 26th, 2009 by Miguel M. Almeida

I always loved the locate and updatedb because its speed against find and Mac OS X always had the both commands... until Leopard. I don't know why, Apple maintained the locate, but removed the updatedb... what the #@!&? For years I couldn't use locate anymore because of this! Today I accidently discovered how to "update the db"! You just have to run this (intuitive) command:
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Tags: leopard, locate, mac, os x, snow leopard, updatedb
Posted in Mac OS X | 2 Comments »
May 18th, 2009 by Miguel M. Almeida
A few weeks ago I downloaded Safari 4. After a few minutes of using it I had to uninstall it. Apple took the wrong way about a lot of new features.
Without a workaround I will have to switch back to the (slow) Firefox. So I've decided to wait, wondering Apple will develop an option to turn all this annoying features off...
Read the rest of this entry »
Tags: disable, how to, howto, os x, remove, safari, safari 4
Posted in Mac OS X | 5 Comments »
April 22nd, 2008 by Miguel M. Almeida
My first post on seven geek wonders talks about using SSH as a tunnel. It can be useful when used along a SOCKS server. But.. to be honest, it is really boring to tunnel every single connection. Even with the -D 1080 it sucks, because you need to configure your program to use the tunnel.
What about a transparent tunnel? ;)
Read the rest of this entry »
Tags: bsd, how to, howto, linux, mac, os x, proxy, server, socks, ssh, transparent, tunnel, unix
Posted in Uncategorized | 5 Comments »
April 21st, 2008 by Miguel M. Almeida
Writing simple polygons with OpenGL is nice when you're starting with OpenGL, but when you want something useful and nice will need to import models from Maya, 3D Studio Max or other kind of 3D modeling programs. I'll explain here how to import a model to be used on your C++ code, using Xcode on my case.
Read the rest of this entry »
Tags: 3d studio max, glm, import, load, maya, OpenGL, os x, osx, studio max, xcode
Posted in Mac OS X, OpenGL | 7 Comments »
April 21st, 2008 by Miguel M. Almeida
Well, my Computer Graphics course is getting complicated. My teacher is asking me to draw a 3D terrain based on a flat b&w image. Of course I don't need to do this from scratch! I may use a cool set of libraries called DevIL.
A friend of mine, Bruno Gomes, wrote a small text (in portuguese) explaining how to compile it on OS X. It is a little bit tricky, because a small bug. I've translated this how to and I'm posting it here, step by step.
Read the rest of this entry »
Tags: devil, how to, howto, OpenGL, os x, tutorial, xcode
Posted in Mac OS X, OpenGL | 18 Comments »
March 28th, 2008 by Nuno Rafael Rocha
Are you working and suddenly the front row starts to work alone? Or are you listening iTunes and the music stops or jumps to the next song? Do you start hearing laughs at the back of the room? Well, your are being a victim of a practical joke from somebody that have an apple remote control. To avoid this pranks I found an option that pair your apple remote control with your computer.
This is a simple process but it's in a hidden place.
Read the rest of this entry »
Tags: apple remote, Mac OS X, pair, remote control
Posted in Mac OS X | 5 Comments »
March 27th, 2008 by Miguel M. Almeida

Today I've upgraded to Leopard. Everything was working fine until I tried to connect to my university's wireless network. This network uses an 802.1X authentication protocol, but Leopard doesn't like it. And... where's Internet Connect?! Well, here it is! It just arrived from Tiger :)
Tags: 802.1X, connect, disconnect, disconnects, internet, internet connect, leopard, os x, osx, tiger
Posted in Uncategorized | 4 Comments »
March 25th, 2008 by Nuno Rafael Rocha

Do you have a mac and you want to start programming OpenGL?Do you want to use a POWERFUL tool? Well, in this post I will show you how to run OpenGL on XCode :D
Read the rest of this entry »
Tags: Mac OS X, OpenGL, xcode
Posted in Mac OS X | 4 Comments »
January 31st, 2008 by Miguel M. Almeida
I'm going insane every time I develop for the web. I use Safari and Firefox and everything goes well, until, finally, I decide to open the page in IE! It's all completely screwed up and I need a lot of extra hours to solve every single problem.
- the resized images are pixelized,
- images have a border by default,
- the height's values aren't correctly respected,
- the CSS's background images aren't well cached,
- the PNG's transparency doesn't work,
- ...and many, many, many, many other things.
I only see an explanation: Microsoft have a specialized bug's department to _develop_ this bugs, calling them "features".
To solve this problem, I've made a simple php function:
Read the rest of this entry »
Tags: bug, css, explorer, fix, how, how to, ie, ie6, ie7, internet, internet explorer, javascript, php, png, problem, to, transparency, transparent, workaround
Posted in Uncategorized | 1 Comment »
January 5th, 2008 by Miguel M. Almeida

A few moths ago I wanted to limit the connections of each ip of my network. I'm using OpenWRT running on a Linksys WRT54G and tried to use rules like this:
$ iptables -A FORWARD -s 192.168.1.2 -p tcp -m connlimit --connlimit-above 10 -j DROP
but I get the error "No chain/target/match by that name" because the module isn't installed. After a Google's research I didn't found a compiled module ready to download, but forums telling how to compile this. That's what I've made, but it took me a lot of time because I had compile a custom build with a patched kernel (using Netfilter's patch-o-matic for connlimit). So I've decided to share the results.
Read the rest of this entry »
Tags: , 0.9, 1.3.3, 1.3.7, 1.3.8, 7.09, bcm947, bcm953, broadcom, build, compile, complied, connections, connlimit, conntrack, crosscompile, custombuild, iptables, kamikaze, kernel, limit, linksys, linux, mips, mipsel, netfilter, openwrt, p-o-m, patch, patch-o-matic, shaper, tc, traffic, unix, whiterussian, wrt, WRT54G, wrt54gl, wrt54gs
Posted in WRT54G | 4 Comments »
December 28th, 2007 by Miguel M. Almeida

Finding a good bash scripting tutorial or manual is not that easy. Today I've found this one, very good, on linuxreviews.org, so I've decided to post it here too. Thank you very much to the writers.
Read the rest of this entry »
Tags: bash, linux, manual, script, scripting, sh, tutorial, unix
Posted in Mac OS X, Unix tricks | 1 Comment »
December 23rd, 2007 by Miguel M. Almeida
The Mac OS X Leopard's menu bar in the newest macs is different than in the oldest ones.
With the appropriate OpenGL capabilities it is translucent:

...but, without them, it is solid:

Having a translucent menu bar is nice in a screenshot, but using it every day is really bad.
Many people use a tricky hack, using a white or black stripe in the background.
Here's another hack, more simple and useful, to disable this beautiful, but annoying feature...
Read the rest of this entry »
Tags: 10.5, bar, disable, gray, hack, leopard, mac, menu, menu bar, menubar, os x, solid, translucent, transparent, turn off, white
Posted in Mac OS X | 4 Comments »
November 22nd, 2007 by Miguel M. Almeida

If you access an SSH server frequently, for shell usage or scp, probably you're tired of writing your password each time you want to access it. You can be authenticated without a password if you "tell the server who you are".
To do that SSH uses a public/private keys system. You just have to store your private key on your computer and put your public key in the SSH server.
Read the rest of this entry »
Tags: auth, authentication, authorized_keys, bash, ds, key, keys, linux, mac, os x, password, rsa, scp, ssh, ssh-keygen, sshd, terminal, unix
Posted in Mac OS X, Unix tricks, WRT54G | 2 Comments »
November 9th, 2007 by Mário Filipe Pinhal

If you are interested in having a version control management system for some set of files, a subversion (SVN) repository is the right thing for you. What I did and will explain further, was to use the "internal actions" of a SVN server repository to automatically update a web folder in the same server, so that when changes are committed to your svn server it automatically "replicates" and your website is instantly updated with the committed changes. In addition, i also found a way so that you can be notified via e-mail each time your repository is updated, to keep you track of the changes of the repository if its a shared one (as it was in my case).
Read the rest of this entry »
Tags: Apache, control version, cvs, email, email notification, http, httpd, mail, php, repository, script, send email, server, subversion, svn, unix, web server
Posted in Apache, Unix tricks | 8 Comments »
November 9th, 2007 by Miguel M. Almeida

When I want to send a heavy file to someone I can't use e-mail because the e-mail servers usually don't allow me to send big files. So, I've created a folder in my domain, where I upload my heavy files. Then, I only have to send the URL of the file in the e-mail message. Simple. But... I have another problem: when the file is a photo, a movie, a music, a pdf, a text, etc. it is displayed, instead of downloaded. How can I force the download of this folder files? I will explain here how to configure apache do to that.
Read the rest of this entry »
Tags: Apache, download, file, foced, force, htaccess, linux, mod_rewrite, pho5, php, php3, php4, rewrite, RewriteBase, RewriteEngine, unix
Posted in Apache, Unix tricks | 1 Comment »
November 4th, 2007 by Miguel M. Almeida

This month I bought one of the new iPod nano (3rd generation), also known as The Fatty.
Unfortunately, after a few hours, I realised the screen was a little bit tilted. At the first day I just though I was paranoid, but after a few days I found I'm not the only one seeing it tilted. So, I went to the shop again and I realized that ALL the iPods nano in ALL the stores had the same tilted screen. All of them, really!
I've made some calls to the Apple Support service, but Apple didn't recognized the problem. In a high quality product with so much high quality details this isn't acceptable... and it's very annoying!
Read the rest of this entry »
Tags: 3 gen, 3G, 3rd gen, apple, bug, fatty, ipod, nano, portugal, problem, screen, shift, shifted, tilt, tilted
Posted in Points of view, Reviews | 21 Comments »
November 1st, 2007 by Miguel M. Almeida

If you have a PowerBook or iBook with iScroll2 and installed the new OS X 10.5 known as Leopard, probably you scream each time you try to use the two fringers scroll!
Apparently iScroll doesn't work with Leopard. In fact it works! It simply doesn't start automatically.
Read the rest of this entry »
Tags: 10.5, iscroll, iscroll2, leopard, mac, not working, os x, two fingers scroll
Posted in Mac OS X | 35 Comments »
October 29th, 2007 by Miguel M. Almeida
The most expected feature of the new Mac OS X 10.5 (Leopard) is Time Machine. And, belive me, it is phenomenal (as Steve Jobs would say).
At the beginning it is a bit hard to understand how it really works, but in fact it is really easy and cool!
Read the rest of this entry »
Tags: how works, leopard, mac, os x, time machine
Posted in Mac OS X, Reviews | 2 Comments »
October 26th, 2007 by Miguel M. Almeida

My laptop's CD-ROM drive is broken and I want to install Ubuntu without CD. Is that possible? Fortunately yes!
After a quick google search I found a very cool software called UNetbootin.
Read the rest of this entry »
Tags: cd, fedora, install, iso, linux, ubuntu, unetbootin, unix, without cd, without drive
Posted in Unix tricks | No Comments »
October 25th, 2007 by Miguel M. Almeida

My ADSL modem is connected to a router Linksys WRT54GL running the Tomato firmaware, but it could be DD-WRT or even OpenWRT.
I want the router to make the PPPoE connection, instead of the modem, but there's a problem with this configuration: I can't access the modem configuration.
Read the rest of this entry »
Tags: access, behind, dd, dd-wrt, ddwrt, firewall, how to, howto, iptables, linksys, modem, open wrt, openwrt, router, rule, rules, script, tomato, tunnel, wrt 54 g, WRT54G
Posted in WRT54G | 1 Comment »
October 25th, 2007 by Miguel M. Almeida

As I told on my first post, my university's wi-fi network only allows me to access the Internet using an HTTP proxy and a SOCKS server for some services, like SSH.
I need to configure my ssh client to use this server, but it doesn't have a simple configuration embed. So, we have to do a little trick, using the SSH Proxy Command.
Read the rest of this entry »
Tags: how to, howto, mac, os x, proxy, server, sock, socks, ssh, terminal
Posted in Unix tricks | 1 Comment »
October 25th, 2007 by Miguel M. Almeida

In the 80's we had real terminal monitors with all that horrible green apperence. Later, we had black & white monitors, but now we have really beautiful colors available in our monitors. Why still using the old fashioned ugly terminal?
Read the rest of this entry »
Tags: bash, color, colors, coloured, how to, howto, leopard, linux, os x, terminal, tiger, unix
Posted in Unix tricks | No Comments »
October 25th, 2007 by Miguel M. Almeida

Argh! Here I'm again connected to my university's wi-fi network, which only allows me to use HTTP through a proxy and SSH. Rules of the BOF :\ So, why not using the SSH as a tunnel, allowing me to connect to anywere in the "real world"? That's what I'm going to describe here, in 4 practical cases.
Read the rest of this entry »
Tags: , how to, howto, leopard, linux, mac, os x, port forward, port forwarding, proxy, redirect, secure, server, socks, ssh, tiger, tunnel, tunneler, unix
Posted in Mac OS X, Unix tricks | 5 Comments »