iCoreTech Research Labs Just a placeholder

23Nov/0910

Installing MySQL Ruby Gem in Snow Leopard Server

Snow Leopard Server doesn't come with MySQL client and library files.
In order to get them we need to download a package, for Snow Leopard Server 10.6.2:
http://www.opensource.apple.com/other/MySQL-49.binaries.tar.gz (71.2MB)

The main entry page should be http://www.opensource.apple.com/release/mac-os-x-1062/ but I cannot find the package there, getting the url was guess work from reading an Apple support page: http://support.apple.com/kb/TA25017

What we are doing is to uncompress a archive directly in our root.
Once you get the file you should decompress it unless your browser already did for you.
Since Safari did it for me I'm having MySQL-49.binaries.tar in my Downloads folder.

Open up a terminal.

cd Downloads
sudo tar -xvf MySQL-49.binaries.tar -C / # use -zxvf if you still have the .tar.gz file

We should have the required libraries in order to install the MySQL Ruby Gem.

You may have already read the previous articles about MySQL and Ruby, however the procedure is different:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql

This should give you a working installation of MySQL Gem.

23Nov/090

Hosting Git repositories through WebDAV on Snow Leopard Server

This will be quick and dirty; the necessity comes from a particular source code that I can't trust to host online to a third party vendor/provider.

I have a Snow Leopard Server, so I will make use of the tools provided, there's little information about the subject, so here it is.

Also I choose WebDAV since my SSH is blinded to the outside world, in order to access it I require a VPN connection, but since I want to share some repo to the outside world, WebDAV comes handy.

I host my repositories in a subdomain, so before anything, open up your DNS Server Admin section and start editing by adding your new shiny hostname as you please by adding a new record there.
I assume you are using a subdomain along the lines of repositories.yourdomain.com; you don't have to do this step if using an ip address, this is up to you.

Login into your server through ssh or the way you like and create a repositories index directory somewhere.
In my particular setup I have this structure for my websites:

/Sites/kain/mydomain.com/[www, macruby, etc]

So go where you like and create a directory, I'll use repositories

mkdir /Sites/kain/mydomain.com/repositories

Assign this directory to the _www user

chown -R _www:_www /Sites/kain/mydomain.com/repositories
cd /Sites/kain/mydomain.com/repositories

Start creating a new directory that will host the git repository:

mkdir myproject.git

After that go in the Web section, and create (or copy) a new website.

Relevant General setup:
Host name: repositories.yourdomain.com
Web folder: /Sites/kain/mydomain.com/repositories

Relevant Options setup:
Folder listing: enabled (not really necessary but useful for testing what you see in index later)
WebDAV: enabled
Rest disabled

Relevant Realm setup:
create a new realm by clicking the plus sign
Realm name: myproject
Authentication: Basic (will try Digest/Kerberos in future)
Select Location for the select widget instead of Folder and write

/myproject.git

In the right section now add your users that will have access, after that change their permissions.
Since my repos are private I only keep the users that have write access there by setting their permissions to Browse and Read/Write WebDAV, None for Everyone.

Relevant Logging setup:
enable logging as you please

Relevant Security setup:
I choose to use SSL for this tutorial, so you are going to use a certificate and port 443.

Save and close Server Admin.

Let's go back to our SSH server session.
Enter your project directory and exec those commands:

cd /Sites/kain/mydomain.com/repositories/myproject.git
sudo git init --bare
sudo chown -R _www:_www .
sudo mv hooks/post-update.sample hooks/post-update
sudo git update-server-info

Now switch to your client.

Edit your ~/.netrc file with those informations:

machine repositories.mydomain.com
login myusername
password mypassword

Enter your project dir and exec those commands:

cd myproject
git config --global http.sslVerify false # If you don't own a valid SSL certificate on your server, skip --global to enable this option only for this project
git init # gitify the directory
git add . # add files to git repo
git commit -m "hi" # first commit
git remote add origin https://repositories.mydomain.com/myproject.git/ # end slash is important
git push origin master --force -v

Now edit this file, always in your project root dir:

mate .git/config

And add

[branch "master"]
	 remote = origin
	 merge = refs/heads/master

This way you can do git push and git pull normally.

Done.

22Nov/090

AudioBox.fm

Hi readers,
I'm putting together a new project, dubbed audiobox.fm.

It's in active development; if you feel you can leave your email or follow the project on Twitter to be notified when doors open for beta stage.

I'm going to limit the initial access to the app, so hurry :)

Cheers.

Tagged as: No Comments
16Nov/091

My ToolBox

Being a computer junkie I usually use a certain number of tools, ranging from productivity to my amusement. Here's a generic list.

Hardware
MacBookPro5,1 Intel Core 2 Duo 2,53 GHz 4 GB RAM
Time Capsule 1TB
Random Logitech Mouse

Development
TextMate
Safari
Firefox
Xcode and Interface Builder
Terminal.app
Navicat Premium
phpMyAdmin
phpPgAdmin
Sequel Pro
Parallels 5
GitX

System Utilities
Server Admin and Workgroup Manager
Angry IP Scanner
SuperDuper!
DiskWarrior
WhatSize

Imaging
Adobe Photoshop CS3
Skitch

Video
VLC
ReduxEncoder
IShowU HD
HandBrake

Networking
ForkLift
Tweetie
Skype
Transmission
X-Chat Aqua
Adium

Music
iTunes
CoverSutra
XLD
Mp3/Tag Studio (on Parallels) plus various home-made tools

Everyday Apps
Mail.app
Disco
AppCleaner
RAR Expander

Still something is missing, but you get the picture.

Filed under: Tips 1 Comment
5Nov/09Off

About ripping articles

My apologies, the Cappuccino series articles has been suspended indefinitely. I won't go into details, so don't ask.

Also sorry if it sounds cryptic to you.

1Nov/092

Install id3lib-ruby on Snow Leopard

We are going to use MacPorts for this.

Install the prerequisite:

sudo port install id3lib

And install the 64-bit gem:

env ARCHFLAGS="-arch x86_64" gem install id3lib-ruby

Test:

16:53 ~ $ irb
>> require 'id3lib'
=> true