Linux
Ubuntu Networking
The other day I went to my company’s office and tried to browse and kept getting denied on DNS lookups. Our network guru told me I needed to add a line in resolve.conf to find the nameserver.
/etc/resolve.conf
Add line:
nameserver 192.168.1.31
The problem though was that this file gets overwritten, so I had to ask him again for the setting today. Frustrated at this, I did a bit of research and it looks like if I want to make this change permanent I need to modify dhclient.conf (http://ubuntuforums.org/showthread.php?t=445753)
/etc/dhcp3/dhclient.conf
Add:
supersede domain-name "company.com"; prepend domain-name-servers 192.168.1.31;
Modifying PATH variable in Ubuntu
sudo gedit ~/.bashrc
Add this line to the file (or modify if the file already has an entry for PATH):
PATH=[your path]:”${PATH}”
Save the file
Execute to refresh the file without logging out:
source .bashrc
ImageMagick
I was trying to upload images to WordPress today and hit the php max upload size per image since my new camera is 12MP. Rather than increase the upload size and wait forever to send my pics up, I decided to look for a nice Linux tool for image resizing. Low and behold I have one installed, ImageMagick. I’ve never used this tool before, but some quick investigation tells me that there are APIs for all the popular programming languages plus a command line interface. I know it’s been around for a while, but it’s new to me and it dominates. I’m going to use this post to keep track of common commands I use with this program and how I’ve used the APIs, if it ever gets to that.
convert IMG_0666.JPG -resize 50% OrthoMax.jpg