sed updating URL inside php

If I have to update a lot of php files to correct a URL. I use the following sed command

for i in ./*.php;

do

sed “s/https\:\/\/www.mattpallotta.com\/home\//https\:\/\/www.mattpallotta.com\//g” $i > $i-new;

mv $i-new $i;

done;

This works out well for me.
VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Life in General | Leave a comment

simple file rename with sed

From time to time I need to do bulk file renames on linux and solaris servers. These renames are generally done when I need to run a few apache logs through awstats. We use load balancer for the servers. Every so often the logs are setup with the standard access.log. With a few servers handling the content awstats has a perl script that can be used to combine the logs. So when we dump the logs if we are not renaming the logs we have rename them till the logrotate is updated. Here is the simple script to do that. I run this in bash.

 for filename in *; do target=$(echo $filename | sed -e ‘s/access/access-server1/g’); mv $filename $target; done

We also rotate the logs everyday and the date stamp to the file. This allows us to know what days have been run and delete.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Apple, puters | Leave a comment

Applications for OS X/linux

I am sitting here on the plane flying back from a Microsoft Project server meeting. I haven’t seen much else that compete at that level. Which is why the cost per client is so high. I have played a few others, but their sever products where ASP based with them. We couldn’t install it inside our networks. Same is true of visio. I just haven’t found anything like that either. Any one else have any ideas?

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Apple, puters | Leave a comment

New wiki setup

I setup a new website a couple of weeks ago. Purely a wiki for posting photography knowledge.

Photography Knowledge

It is just something I setting up to how it goes. The plan is a site for info without adds and such.

Tell your friends.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in News, photography | Leave a comment

Gross

Seriously the guy in the other isle just sneezed into the air. Guy next to me is coughing and smells luke crap(actually). And he keeps putting his head in his coat like a turtle is leaning over towards me. I feel the air rage, I can feel it. Gross gross gross. He keeps leaning over like he is farting. That part is funny except
I am next to him. I think I am going ask for a puke bag. That should pit him on edge.

10 minutes later….

I am now waiting for him get out of the bathroom. He will get settled in for a few minutes and I will go to the bathroom.

While later…

Well I didn’t do the bathroom. It have been worse. I open a package of pepper beef jerky. Yea it smelled . I ate the bag just smiling what bag smells like and what my breath will smell like to him. Ah I feel so much better now.

Not only that but we are supposed to get in thirty minutes early. Here’s hope.

The guy on the other isle is still blowing his nose. It sounds so juicy. I am not worries swine flu, cause if he had it in his condition as it is. I don’t think he could lift himself up.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

High Resolution Press Images:

[+] icon_smile.gif
Posted in Rants, Travel | Leave a comment

Too Funny

kenley_collins_meowitzer.jpg

Blogged with the Flock Browser
VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Cats | Leave a comment

Apple Timecapsule worked for me.

I got the new Macbook Pro a month ago and built and the partition as Case Sensitive and migrated my data from the previous Macbook Pro without and problems. I only had a few problems after the move. CAC wasn’t working correctly and found out Modo would not render from the discover modo section. I ignored it thinking something didn’t copy over on the migration and I would just reinstall Modo. Then a buddy of mine asked me to look into a graphics file for his campaign. Well Photoshop CS3 wouldn’t even start up. No I was getting a little worried. So I figured not was a good time to download CS4 Master Suite to upgrade. 6 GB to download wow. Anyway, got it and started the install. No good won’t install with a case sensitive file system. “How can an OS based on BSD not be case sensitive”, was my thought. Ok I moved on. I have everything backup to my timecapsule. First thing I did was make sure I have that Master Suite backed up.

Began the OS rebuild “press C” at boot. Install without case sensitive, and reboot. Select migrate from Time Machine back up. It took about an hour to get the files sizes listed before the migration even tried to start. It tried to start once but kept timing out. Tried that a few time, reboot time capsule. Still not working. Finally connected the latop to the wired network, four hours later I had the laptop working and everything test.

I know exciting.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Apple, puters | Leave a comment

Wedding Plans begin

Well Juli and I have starting to get the ball rolling on the wedding plans. First off we told people we are getting married. Step one complete. I have called around to a few reception places for costs. All I can say is WOW!!!!!!!!!!!!! But they are nice places. I only called two so far, but I am leaning towards one right now. Next up  visiting those two places to see how they look.

Ah how the weekends will fill up. Juli is hitting the magazines, I got her a bunch to jump start her. A few of her friends have also started to hand her books. Their advice to follow I am sure, When this really gets going I am glad I have so much work to keep me distracted.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

High Resolution Press Images:

[+] icon_smile.gif
Posted in Life in General | Leave a comment

Working from home..

I work from home a lot. It is the only way I can catch up and spend time with my friends and family. In the old days I used to have CAT5,6 and in the old days coax baby. Then I used wireless bridges to connect the rooms I was working in. But yesterday I used my Airport Express I bought to play itunes in any room. This time I used to rebuild a Linux server and turn it into a iSCSI server with 2.5TB of storage. So for $99 I can play my itunes and work on a computer/server with out running cables all over the house. I can also run my itunes via my iphone/ipod. What will next year bring.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Life in General | Leave a comment

1500 visits in March!

Am I big time? no way! LOL

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
Posted in Life in General | 1 Comment