Get rid of those pesky ._ files in webdav on osx

Posted by Joel Jensen Fri, 23 May 2008 13:55:10 GMT

I’m doing alot of development for Honda using plone. A good way of editing files on plone is to connect to the server by tunneling webdav through ssh and mounting the webdav server via the finder. Trouble is, OSX creates a ._filename file for every file you touch or edit, It doesn’t break plone, but looks ugly.

The solution for this is:

Open up a terminal session
type:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
hit return
reboot

If you dont like this solution, Cyberduck works well. It works with:

  • FTP
  • FTPS (FTP/SSL)
  • SFTP
  • WebDAV
  • WebDAV ( http/ssl)
  • Amazon S3 Simple Storage Service

AND it’s opensource. If you like it, give the developers some money.

CocoaMySQL, a good FREE Open Mysql GUI for OSX

Posted by Joel Jensen Fri, 23 May 2008 08:33:25 GMT

The last version 0.75b of Cocoa-MySQL had a bug, if there was a decimal data-type in a row of returned data, and you altered any portion of that row, the decimal column would be overwritten with 999999.99.

There is a new version that fixes this feature

DOWNLOAD FROM HERE

It’s beta and not widely publicized, but here it is.

Blog spam

Posted by Joel Jensen Sat, 22 Mar 2008 06:56:03 GMT

My site was comment spammed by Russians recently.

I started noticing the sites load speed. It was bad, sometimes timing out. I thought that my brother, who shares this server and has a very popular game site on it may be the cause. I checked the logs and was wrong. Comment spammers had found the AJAX comments on the blog. I have disabled the comments, deleted about 70000 comment spams. but spammers now think comments are open and are submitting about 1 comment a second. Problem was, the site takes more than 1 second to load since its served by DSL. I played around with firewall rules to make them go away, but settled on an apache “Deny from all” stanza for the trackbacks directory.

Sorry for no comments, they will return with handy dandy captcha’s when the spammers get the message.

apt-get search

Posted by Joel Jensen Wed, 05 Mar 2008 11:29:26 GMT

No thats not the command, but google will find it. Here are some ubuntu commands for package management.

#here is how to search apt-get for a package
sudo apt-cache search SEARCHSTRING

#here is how to see whats on your system
sudo dpkg -l | grep SEARCHSTRING

#here is how to install something
sudo apt-get install PACKAGENAME

DONE

MacFUSE and symbolic links

Posted by Joel Jensen Thu, 21 Feb 2008 10:00:43 GMT

I’m using a nifty tool from google called MacFUSE, It lets you mount a computer over ssh just like a drive, In fact the other computer shows up on my desktop as a drive. I had some difficulty with symbolic links in the remote system when launching from the gui. Heres the workaround.

Get a copy of MacFuse and install

Use Terminal # run the following line only once, It sets up a needed symbolic link sudo ln -s /Applications/sshfs.app/Contents/Resources/sshfs-static /usr/local/bin/sshfs

mkdir /Volumes/10.10.55.110
sshfs root@10.10.55.110:/ /Volumes/10.10.55.110 -o ping_diskarb -o reconnect -o jail_symlinks -o volname=10.10.55.110

DONE

Set up Ubuntu server 7.10 gusty Ruby on Rails and Webmin

Posted by Joel Jensen Thu, 24 Jan 2008 15:31:07 GMT

Download and install ubuntu 32bit ( trust me ) 7.10 server

Install, when it asks select LAMP installation

Answer questions and install, it takes about 30 minutes

When finished login and run from command line:

Follow these instructions:

Taken from: ssh webmin and ip configuration Configuring Static ip address in Ubuntu server

Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change that to a static IP address for this you need to edit Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP address 172.19.0.10):

sudo vi /etc/network/interfaces

and enter the following save the file and exit

The primary network interface

auto eth0
iface eth0 inet static
address 172.19.0.10
netmask 255.255.255.0
network 172.19.0.0
broadcast 172.19.0.255
gateway 172.19.0.1

Now you need to restart your network services using the following command

sudo /etc/init.d/networking restart

You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.

sudo vi /etc/resolv.conf

You need to add look something like this

search domain.com

nameserver xxx.xxx.xxx.xxx

Install SSH Server

If you want to access your server remotely through SSH you need to install SSH server for this you need to run the following command

sudo apt-get install ssh openssh-server

You will be prompted to insert the installation CD again and this will complete SSH server in your Gutsy lamp server.This is really simple and easy server installation for new users and who wants a quick server.

Installing Webmin in Ubuntu Gutsy Gibbon

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

You can install webmin for your server web interface to configure apache,mysql servers.Now we will see how to install webmin in Ubuntu 7.10

Preparing your system

First you need to install the following packages

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

Now download the latest webmin using the following command

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.370_all.deb

Now we have webmin1.370all.deb package install this package using the following command

sudo dpkg -i webmin_1.370_all.deb

This will complete the installation.

Ubuntu in particular don’t allow logins by the root user by default. However, the user created at system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo capability to login with full root privileges.

Now you need to open your web browser and enter the following

https://your-server-ip:10000/

Install Subversion tools

sudo apt-get install subversion

Installing rails

Taken from: Here

sudo apt-get install ruby rdoc irb libyaml-ruby libzlib-ruby ri libopenssl-ruby
wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz
tar xzvf rubygems-1.0.1.tgz
cd rubygems-1.0.1
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system
sudo gem install rails
sudo apt-get install build-essential ruby1.8-dev
sudo gem install mongrel
sudo apt-get install mysql-client mysql-admin mysql-query-browser 
sudo apt-get install libmysqlclient15-dev
sudo gem install mysql
sudo apt-get install sqlite3 swig libsqlite3-ruby libsqlite3-dev
sudo gem install sqlite3-ruby
echo "export RUBYOPT=rubygems" >> ~/.profile
rails path/to/your/app

Install ImageMagick

sudo apt-get install imagemagick
sudo apt-get install libmagick9-dev
sudo gem install rmagick -v 1.15.12

Add Modules to Apache

cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/headers.load
sudo ln -s ../mods-available/deflate.conf
sudo ln -s ../mods-available/deflate.load
sudo ln -s ../mods-available/proxy_ajp.load
sudo ln -s ../mods-available/proxy_balancer.load
sudo ln -s ../mods-available/proxy.conf
sudo ln -s ../mods-available/proxy_connect.load
sudo ln -s ../mods-available/proxy_ftp.load
sudo ln -s ../mods-available/proxy_http.load
sudo ln -s ../mods-available/proxy.load
sudo ln -s ../mods-available/rewrite.load

Set up apache

Add a www folder to your home directory

mkdir ~/www

Add this to your apache config file, at the end

/etc/apache2/sites-enabled/000-default

<VirtualHost * >
    ServerName YOUR-SERVER-NAME.com
    CustomLog /var/log/apache2/YOUR-SERVER-NAME.log combined
    DocumentRoot /home/YOUR-USERNAME/www/current/public
    <Directory "/home/YOUR-USERNAME/www/current/public">
            Options FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
    </Directory>
    RewriteEngine On   
    RewriteRule /html / [L,P,QSA]
    # Don't do forward proxying  
    # Enable reverse proxying
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    # RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
    # RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    # RewriteRule ^.*$ /system/maintenance.html [L]
    RewriteRule ^/$ /index.html [QSA] 
    RewriteRule ^([^.]+)$ $1.html [QSA]
    # Redirect all non-static requests to cluster
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
    RewriteRule .* http://127.0.0.1:3000%{REQUEST_URI} [L,P,QSA]

    # Deflate
    AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/xml application/xhtml+xml text/javascript 
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</VirtualHost>

Set up ssl here

Restart Apache

sudo /etc/init.d/apache2

Prepare site for rails

From your development machine, where you are working on the new rails site.

Install capistrano if you havent

gem install capistrano

Capify your site, if you haven’t cd #{rails_root} capify .

Install Subversion

Instructions here

Add your site to subversion, if you havent already

cd {RAILS_ROOT}
cd ..
svn mkdir http://YOUR-SITE.COM/svn/repos/RAILS-PROJECT-NAME -m'adding project'
svn mkdir http://YOUR-SITE.COM/svn/repos/RAILS-PROJECT-NAME/trunk -m'adding project'
svn mkdir http://YOUR-SITE.COM/svn/repos/RAILS-PROJECT-NAME/branches -m'adding project'
svn mkdir http://YOUR-SITE.COM/svn/repos/RAILS-PROJECT-NAME/tags -m'adding project'
svn add . http://YOUR-SITE.COM/svn/repos/RAILS-PROJECT-NAME/trunk -m'adding project'

Edit the {RAILS_ROOT}/config/deploy.rb cap deploy

DONE

Make a CD iso Image in OSX

Posted by Joel Jensen Sun, 20 Jan 2008 14:23:21 GMT

Insert CD/DVD source

GUI method OSX

  • Go to /Applications/Utilities/Disk Utility
  • Select the cd SESSION, it’s the cd icon that is indented One level, click info, note the Disk Identifier of the disc, something like disk1s1
  • Note: you can click “New Image” to make an image of the cd at this point.
  • Select Image Format of DVD/CD Master from the dropdown.
  • Make the image.
  • Then rename the extension to .iso.

GUI windows I found a nifty windows program Infrarecorder that copies cds and makes images.

Command line method OSX:

Note: the disk1s1 part comes from Disk Utility ( see above ).

diskutil unmountDisk /dev/disk1s1
dd if=/dev/disk1s1 of=file.iso bs=2048
# you now have an iso.

Speed up jruby

Posted by Joel Jensen Thu, 03 Jan 2008 21:08:44 GMT

This is just a note for myself.

I heard this at a Ruby.MN meeting where Charlie Nutter spoke

If you disable object space when you kick off jruby, it really speeds it up.

jruby -J-server -O your-file-name.rb
(-J-server uses the "server" JVM and -O disables ObjectSpace)

Roles based authentication for rails

Posted by Joel Jensen Sat, 29 Dec 2007 16:18:29 GMT

This plugin works well.

Role Requirement

Shure e5c vs UltimateEars super.fi.5 pro 1

Posted by Joel Jensen Mon, 24 Dec 2007 20:56:10 GMT

super.fi.5.proe5c

Super-Fly super.fi.5

Christmas gifts have been opened. Now I can write a review. I gave my brother some super.fi.5 pro earphones for Christmas. I A/B tested against my shure e5c’s. I paid $365 for the Shure’s; I need to be around people sometimes while working, so I gravitated towards coffee shops, and camped out with my laptop. The sound of the roaster or grinder started to get to me so I bought the Shures to dull the din. They worked very well, and after 3 years of ownership I’m positive they have paid for themselves in productivity increase. Ear plugs would have worked too, but silence is boring.

The fit

Both are canalphones. Both come with a wide fit kit ( 4 different sets of silicone and foam eartips ) I found the Shure darker light weight silicone eartips to be the most comfortable amongst the Shures. The super.fi.5 pro have eartips made of the same material as the Shure. The tips are quite comfortable as well. The Ultimate Ears tips are better secured to the earphone, this is a big deal. They won’t slip off. My Shures have a friction fit for the ear tip. The tip sometimes just slides off the Shures.

The Shure fits flush, actually in the ear, they look like hearing aids. The Ultimate Ears I likened to having baby carrots stuffed in my ears. I looked like Uhura on Star Trek. They look like earbuds, not hearing aids.

Both have a flexible wire that wraps around the ear to secure the canalphone. Just like Secret Service agents. the Ultimate ear wins here. The wire is smaller in gauge and more comfortable. The wire is so light that it doesn’t transmit the sound of the wire rubbing against the skin to your ears.

The cord on the Shure’s is 2 feet longer than the UE’s. If you are using the canalphones for an ipod in your pocket, both work, but the Ultimate Ears have the advantage, less cord to get caught on stuff. If you are using these on a laptop, The Shure’s have the advantage, the cord can comfortably fit behind the back, and snake up to the plug.

The price

This is weird, the Ultimate Ears are WAY WAY cheaper. The retail for the UE’s are $250 ( I found mine for significantly less ). The retail for the Shure’s are $599. Given the price difference I thought the sound quality would be different, I was wrong.

About the price of the Shures. A while back I needed service for my Shure’s. Shure doesn’t fix these, they replace them for $120. The $600 price most likely is 2 middle mans worth of markup.

The sound

Both sound great. You can definitely hear difference in MP3 sample rates. You can hear the fingers brush against the texture of a guitar string. The difference vs normal ipod buds is amazing. There is texture and presence to the sound that either have.

That said I prefer the Ultimate Ears, just. The sound is open and bright yet still has lots -O- Bass. They sound alive, like a really good studio monitor. The sound has more presence than the Shures, Presence like Sennheiser HD 600’s or Magnaplaner speakers. That good.

Both have ridiculous sensitivity, you can hear if the earphone is plugged in, even if no music is playing. That said, start with the volume OFF, loud == pain with either of these. Both seal your ear canal, If you don’t hear lots of Bass, the fit is wrong. Try wetting the tip with saliva ( ick ). They block as much sound as normal earplugs when properly fitted. You can listen to very quiet music in very noisy locations.

Older posts: 1 2 3 4 5 ... 10