Git: adduser developers development groupadd Linux mac os x repo shared ssh
by bseanvt
1 comment
Setting Up Users, Permissions and Groups for SSH Access to a Shared Git Repository
If you are having permission problems using git, such as
error: insufficient permission for adding an object to repository database ./objects
There are a couple thing you can do to remedy the situation, before moving to a full on git server like gitosis.
Create your users and add them to a group. Create (if you haven’t already) your git repo on the server and change permission and ownship and set the git config sharedRepository to true.
Here are all the commands, quick and dirty!
adduser sean adduser jackson groupadd developers adduser sean developers adduser jackson developers mkdir -p /git/dev/app.git cd /git/dev/app.git git --bare init vim description #edit this file (mac os x complains otherwise) chmod -R g+ws * chgrp -R developers * git repo-config core.sharedRepository true
Found from: http://mapopa.blogspot.com/2009/10/git-insufficient-permission-for-adding.html
Documentation: api dictionary Documentation jquery mac os x Rails yui
by bseanvt
leave a comment
Ruby on Rails, jQuery and YUI API Docs Available as Mac OS X Dictionary Binaries
I came across an awesome tool this morning. Priit Haamer has chunked Ruby on Rails, jQuery, and some of YUI documentation into native Mac OS X dictionary binaries. This lets you search those API docs from Spotlight, TextMate, any application that uses the dictionary app!
I have tested the Ruby on Rails API within TextMate. Hover over any function and hit ctl+cmd+d and a little popup will give you a glimpse at the API docs. Seems like a nice alternative to ACK or the normal TextMate function lookup.
More information and installation instructions are available at Priit’s site http://www.priithaamer.com/blog
Here is a nice video of the tool
Disk Usage Information on Mac OS X
Get disk usage information about the Desktop
$ du -h -d 0 Desktop 14G Desktop
Information about how much free space is available on computer
$ df -lh Filesystem Size Used Avail Capacity Mounted on /dev/disk0s2 111Gi 109Gi 2.3Gi 98% /
You can read more about the flags with the man pages
$ man du $ man df
This is my 100th post!!!
Programming: development environment installation java mac os x scala twitter
by bseanvt
1 comment
Installing Scala on Mac OS X Leopard
I followed the instructions from here http://arvinderkang.com/2009/09/01/installing-scala-on-snow-leopard/ but I used version 2.7.6 (rather than .5) I installed scala under /usr/local/scala so I had to include it to my path. Type
vim .bash_profile export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/scala/scala-2.7.6.final/bin:$PATH"
Now to download and install…
curl -O http://www.scala-lang.org/downloads/distrib/files/scala-2.7.6.final-installer.jar sudo java -jar scala-2.7.6.final-installer.jar
This will launch an installer. Just follow the instructions and when it asks for the destination folder, remember that it’s in /usr/local/scala
Simple as pie!
Fixing MySQL for Rails 2.2 Development on Mac OS X
Oh what trouble Rails 2.2 and MySQL (on Mac OS X) can be. Rails, as of version >= 2.2, no longer comes bundled with the MySQL adapter. This means you’ll need to install it yourself, but it appears that the gem for installing it is also broken.
This will fail
gem install mysql
What you need to do is tell the gem which MySQL to use. I installed MySQL with mac ports, http://macports.org , so I need to specify this when I run the installation command.
gem install mysql -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
Check out an earlier post explaining how to install MySQL with mac ports http://seanbehan.com/programming/installing-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient/
You’re not out of the woods yet. Rails needs to know the location of the socket it uses to connect to the MySQL server. I created a symbolic link to the location Rails normally looks for this socket. You could specify the location of the socket in the config/database.yml file, however, then you’ll need to do this with each of your applications.
ln -s /private/tmp/mysql.sock /opt/local/var/run/mysql5/mysqld.sock
If there is an easier way to get MySQL back for Rails on Mac OS X please let me know. I’d love a quick fix to this problem.
Installing Sphinx Search Engine on Mac OS X… or ld: library not found for -lmysqlclient
If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and therefore, it will spit out the error message because it can’t find the correct libraries.
ld: library not found for -lmysqlclient
There is a quick solution to the problem -upgrade mysql! You’ll need Mac Ports installed, available at
http://macports.org/
Run the command
sudo port install mysql5
This will not destroy any existing data from your previous MySQL installation. The mac port installation will take a while, and it will appear as if it is just hanging. It’s not. It just takes a while. I clocked it at 15 minutes on a relatively fast network connection. Drink a cappuccino!
After you have the upgrade you’ll need to download Sphinx available at:
http://sphinxsearch.com/downloads.html (latest stable) and build the Sphinx engine from source like so:
wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz tar xzvf sphinx-0.9.8.1.tar.gz cd sphinx-0.9.8.1/ ./configure --with-mysql-libs=/opt/local/lib/mysql5/mysql/ --with-mysql-includes=/opt/local/include/mysql5/mysql/ make sudo make install
Much thanks to this post b/c I spent forever trying to get the bundled version of MySQL linked properly:
http://www.fozworks.com/2008/9/5/rake-installation-of-sphinx-in-mac-osx


