Archive for the ‘Ubuntu’ Category

Share Files Between Linux and Mac

Posted on April 21st, 2009 in Everyday Tips, Mac OSX, Ubuntu | No Comments »

It is EXTREMELY easy to happily share files between your linux system and your mac. I use both Ubuntu and Mac OS X. Simply login into you mac desktop, open up your system settings and turn on Remote Login. This enables incoming SSH connections to your mac. If you want to connect while you are away from home, you can set up some sort of dynamic IP service like DynDNS.org. Open up port 22 on your home firewall or router and you can connect to your home mac from anywhere you go with an internet connection.

Once your mac has SSH enabled, log into your Ubuntu machine and click Places –> Connect To Server. Choose SSH as your Service Type. Enter in the IP address of your mac or whatever name you may have assigned to it in your /etc/hosts file or whatever. Use the username and password you use to log into mac and there you go. You can browse files on your mac with your Ubuntu machine in Nautilus.

Recursive searching in vim with grep – vimgrep

Posted on February 17th, 2009 in Everyday Tips, PHP, Ubuntu, Vim, Web Development | 1 Comment »

Vi Gang Sign

One of the smartest people I’ve ever digitally met, Ryan Paul, taught me this awesome tip for doing a project wide search in vim. I needed to look for all occurrences of the patter _Models_ in a PHP project I was working on and you can do it right inside of vim – the best text editor ever invented.

  1. Open vim and make sure you are in the top level folder of your project by typing :pwd
  2. Then type :vimgrep YourPattern **/*.php
  3. To open your search results in their own buffer type :copen

The **/ recursively searches through all your directories for you pattern. :copen opens the search results in their own buffer. You can use the arrow keys to move up and down through the list and hit enter to have it open that result in the main buffer. You can also use :cnext and :cprev to move to the next and previous items in the list. Perhaps you might bind those to keyboard shortcuts so you can move through the search results quickly.

Vim Uppercase & Lowercase

Posted on August 29th, 2007 in Everyday Tips, Ubuntu, Vim | 7 Comments »

I have been using vim for a couple years and every week it seems I learn some new feature or trick you can do. Recently I learned how to convert a selection to either all uppercase or all lowercase letters.

Convert a visual selection to all uppercase letters.

gU

Convert to lowercase letters

gu

How To Get Your Scanner Working In Ubuntu Feisty

Posted on August 1st, 2007 in Everyday Tips, Ubuntu | No Comments »

My scanner (Canoscan N676U) suddenly stopped responding when I upgraded to Ubuntu Feisty. I first noticed the problem when I was unable to import a scan through Gimp. Well it took a couple hours to figure this one out, but the sollution turned out to be easy to implement. From what I understand, the problem comes from the USB suspend functions built into the new kernel. I also understand that this isn’t just an Ubuntu problem. So if you are on another distro, this tip may work for you also.

Read the rest of this entry »

Ruby on Rails + SSL + ISPConfig + Apache 2.0 + Mongrel

Posted on June 13th, 2007 in Ruby on Rails, Sys Admin, Ubuntu | No Comments »

If you are using ISPConfig to manage the virtual hosts on your web server, you will notice that there is no way to separate SSL vs non-SSL Apache directives using the standard web interface. This is a problem if you are writing Ruby on Rails applications and proxying requests through Apache to a Mongrel cluster because Mongrel won’t know what type of requests it is receiving. Being behind the proxy, Mongrel doesn’t know if the original requests are coming via HTTP or HTTPS. The solution is to add RequestHeader set X_FORWARDED_PROTO ‘https’ as a line in your Apache virtual host configuration for the SSL virtual host. I will tell you how to get ISPConfig to handle that for you. I will also show how to get GoDaddy.com ssl certificates working and how our Apache 2.0 randomized proxy balancer works.

Read the rest of this entry »

FTP Login Delay With Proftpd – Ubuntu Perfect Setup

Posted on June 11th, 2007 in Sys Admin, Ubuntu | 2 Comments »

I manage serveral servers and – for the most part – they are all set up using the Perfect Setup for Ubuntu. Overall the setup is great, but I have been noticing a very annoying delay when trying to log in via FTP. Everything works, but when I initially connect, 5 – 10 seconds pass by before I’m prompted for my login credentials. After many hours of pain and sadness, I finally discovered the solution.

Read the rest of this entry »

Long Delay Before SSH Authentication

Posted on May 18th, 2007 in Sys Admin, Ubuntu | 3 Comments »

If you are experiencing a long, annoying delay when attempting to connect to a remote server via SSH – especially if you have recently noticed this problem after installing/upgrading Ubuntu Feisty – try commenting out the “GSSAPIAuthentication yes” line in your /etc/ssh/ssh_config file:

Read the rest of this entry »

Mail Not Delivered To Hotmail/MSN Accounts

Posted on May 8th, 2007 in Sys Admin, Ubuntu | 8 Comments »

If you have a VPS or your own dedicated server and you can’t send mail to Hotmail or MSN email accounts, the good news is that the solution is easy. I manage a few Postfix mail servers and I was getting lines like this in my /var/log/mail.log file.

Read the rest of this entry »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes