svn replacing folders including subdirectories

January 8th, 2010

ok.. well after searching the internet via google… once again I was disappointed to find nothing about replacing a current folder in the svn repo with a newer folder that contains no .svn directories.

Just so you guys know.. the reason i was doing this was to upgrade my version of wordpress..  My site is on subversion control and i just wanted to replace the wp-includes folder with the newer wp-includes folder. So this is how I did it.

First i deleted the old folder:
~$ svn delete old_folder_name

Than i commit the delete with a nice little message:
~$ svn commit -m "deleted old folder"

Than i add the new folder in the repo:
~$ cp /path/to/new_folder /path/to/new_folder_destination

Than i tell svn im adding the new folder:
~$ svn add new_folder/

Than finally i commit:
~$ svn commit -m "added new folder"

Done. Hope this helps… its better than deleting the whole repo and creating a new one with the new folders.. (some of what i read from google searches).

Web Developing

Mounting ext3 in Snow Leopard…

September 27th, 2009

Im glad to say that it is actually possible to mount an ext3 formatted linux drive in mac OS X Snow Leopard using a few tools. Let me share with you how I did it.

Download fuse-ext2
Also make sure you have MacFUSE otherwise fuse-ext2 wont work.

Install both of those and run a few commands in terminal:

first, create a mount point such as: $ sudo mkdir /Volumes/HD
next, navigate to the fuse-ext2 folder: $ cd /usr/local/bin/
execute the fuse command: $ sudo ./fuse-ext2 /dev/nameOFdisk /Volumes/HD/ -o force
note:(nameOFdisk can be found by typing disktool -l).

Heres some useful information if you dont understand my syntax:

$ fuse-ext2 <device|image> <mountpoint> [-o option[,...]]
options:
ro : mount read only
force: mount read/write
allow_others: allow other users to access
debug: noisy debug output

Voila! your drive should mount, and you should have read/write access as well! man i love mac.

Chatterlings, Web Developing

Software Firewall

August 23rd, 2009

Looking for a good software based firewall for your server? Use this package at http://www.shorewall.net/

Chatterlings

wishing tree beeches!

August 18th, 2009

SRV.

July 7th, 2009

I am on a quest to practice Texas Flood by SRV SOOO much that my fingers bleed, and I sound as close as possible to him.

Chatterlings

want another crontab example?

March 6th, 2009

In this example I am showing you how to use the crontab in order to reload a fresh copy of a DB at 12 noon and 12 midnight everyday. Lets take a look:

SHELL=/bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command

0 12,0 * * * /usr/bin/mysql -u username -ppassword database_name < ~/backupfile.sql

You can see that I am connecting to mysql with my -u username and -ppassword ( And no, I did not make a mistake by not putting a space in between -ppassword, its supposed to be like that, if you put a space in between it thinks that *space* is part of your password.) and telling it to import the sql file backupfile.sql to the database database_name. This script is good if you need to reload a DB with fresh new data everyday. For example if you have a TEST CRM that people can use and test, you dont want people to input so much junk, so you have to reset the test data ever so often.

I love cron. hes a good friend of mine! :)

Web Developing

Getting back in it…

February 27th, 2009

Im trying to get back in it! ahhhhh.. I got a golf tournament to play in this Sunday! Im gonna win for sure!!

Chatterlings

valentines day…

February 14th, 2009

Valentines day is stupid… I think the only reason why people celebrate this day is cause they have to brag about all the things their boyfriend or girlfriend got for them. This day is retarded cause why would you have to remind each other that you still love each other? Its fake love. Everyday should be valentines day when your in love… Its just another day for people to have an opportunity to reach their hands in your shallow ass pockets; cause you know your going to spend the money just so she wont be “mad” that you didn’t get her anything. Any girl that gets mad because you didn’t get her anything for valentines day is a whore. It doesn’t mean that we forgot about you, it just means that we don’t feel like we have to buy you something for you to LOVE us.. and if we do have to buy something for you to love us than your a whore.

These feelings I have could exist because i’m single maybe?

Chatterlings

Ubuntu webserver backup crontab…….

January 29th, 2009

My god was this a pain in the ass..  It was impossible finding the correct solutions on the web to do this in Ubuntu, so for those of you who are looking to do a crontab in Ubuntu check out the following:

What im doing here is creating a crontab to backup my www root folder and my db.

To begin the process we first do the following in terminal as root or a regular user:

#>crontab -e
this will invoke nano, and you can input something similar to the following lines:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don’t have to run the crontab
# command to install the new version when you edit this file
# This file also has a username field, that none of the other crontabs do

SHELL=/bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

MAILTO=mailer@mailer.com

# m h dom mon dow user  command

01 01 * * 0 /bin/tar cfP /mnt/nas/backup/www/`date +\%y-\%m-\%d`-server-name-www.tar /var/www
01 01 * * 0 /usr/bin/mysqldump –opt –all-databases > /mnt/nas/backup/mysql/`date +\%y-\%m-\%d`-server-name-mysql.sql

So basically whats happening here is we are tar-ing the www folder and sending it to the NAS drive with a timestamp. file ex will be: 09-01-01-server-name-www.tar

And its basically the same exact thing for the database backup.. Im just doing a mysqldump and the output goes to a sql file that ends up with the filename: 09-01-01-server-name-mysql.sql

Hope this helps someone..

Web Developing

Ruby active link action…

January 20th, 2009

This little code will check to see what page is current, then set the CSS color class “active”. It will make the text/link look selected and stay selected.

index.rhtml

<div id=”nav”>
         <a <% if params[:controller] == ‘name_here’ %>class=”active”<% end %>           href=”../name_here”>Link name</a>
</div>

and then make sure that you have the class “active” defined in your CSS:

main.css

#nav .active {color: #RED}

Web Developing