New site design

July 9th, 2010 -- No Comments

So with me the past few days learning jQuery, I thought I would redesign my site again. This time I have used jQuery in a few places to showcase some of my new things that I have learned. My twitter feed on the right sidebar is being loaded by jQuery. On the bottom of the page you see the link that says back to top, that link when click will slowly slide you back to the top of the page instead of just reloading the whole page. Even after this post I will still be adding more to it.

In the next few days I am hoping to write a tutorial on the basics of jQuery. So keep an eye out for that.

Sorry for being inactive

July 5th, 2010 -- No Comments

I am sorry for the people that do follow my blog here that I have not been active lately. I have started a new job that has been taking all my time and have just been too tired. I will be working on some more selenium and some jQuery tutorials.

Categories: General

Mplayer Playlist

March 31st, 2010 -- No Comments

Ok I know this type of post is not like me but I thought I would post it since I needed to research on how to do this. Well a lot of my developement is done in the Linux environment. All my music comes from CD’s or purchases from iTunes. In the Linux realm I have found that purchased music is not liked. So when I program in the Gentoo I mount my iTunes music folder. Since I am in command line most of the time I use Mplayer to listen to my music. So I needed to figure out how to tell Mplayer to play everything in my Music folder. I got tired or having to pick a new song all the time. So let me show you how I did this.

Ok the first thing you want to do is run the following command from my home directory to create the playlist:

jcostanzo@virtual-gentoo ~$ find /media/prl/iTunes\ Music/ > myMusic

Now the two things you would need to change is where the main folder of your music is and the other thing is what you want to name your playlist. Instead of myMusic you could say JohnsPlaylist. Now that you got the playlist to run it you would run this command

jcostanzo@virtual-gentoo ~$ mplayer -playlist ~/myMusic

If you want to shuffle the playlist you would do

jcostanzo@virtual-gentoo ~$ mplayer -playlist ~/myMusic -shuffle

Well I hope this might have help some other people who maybe had the same struggles I did.

Categories: General, Linux / BSD

CentOS (My Thoughts)

March 17th, 2010 -- No Comments

When I first learned Linux about 12 years ago I started off using Red Hat. You guys who have used it long enough remember the day when you wanted to install an app you had to not only download the application but 5 or 6 dependencies. In todays world that has changed. Things have been made so much easier. Thru the years I have used different distributions from Red Hat, SuSE, Fedora, Ubuntu, and CentOS. If you have used the Fedora and Red Hat land distro’s then you are not going to have much of a problem.

To do a net install it is not as easy like the other distro’s but if you have seen one version of Linux you have seen them all. The big thing about CentOS that I really like is that apps are tested fast and properly. Updates seem to be coming before some of the other versions of Linux. For now I use CentOS to try to stay on top of it to keep my knowledge up on some of these distributions. So go try and download a copy and throw it in a Virtual environment. See what you think and post a comment if you have a different opinion or question(s).

Categories: General, Linux / BSD, Servers

Site Re-design

March 8th, 2010 -- 1 Comment

For the next few weeks I will be working on a new WordPress theme. I will post when it is complete so please do not judge my themes till I get it at 100% I was thinking that I might setup a test environment to test on since WordPress really does not have a tool to check your theme before you make it live.

I guess if anyone has an opinion on how to test a theme before making it live then post a comment or hit me up on twitter @jrock2004

Using Expect

January 7th, 2010 -- No Comments

Are you running a Linux or Unix server that there are process you need to automate? Is there a daily process that are just a waist of your time but not to your server? There is a nice application called Expect that can help you with this. This application can handle several protocols. Some are ssh, telnet, ftp, passwd, fsck, rlogin, tip, etc… This application does not need a server it is just a client. The client is installed where your script will run from. The nice thing about expect is the file can be executed on a webpage as well. So let me show you an example script:

#!/usr/bin/expect
 
###Usage: call the file with a username.
 
spawn ssh -i /var/employee/includes/id_rsa root@10.10.1.12
expect "The authenticity of host '10.10.1.12 (10.10.1.12)' can't be established.
RSA key fingerprint is 47:4a:6a:ce:65:99:e2:93:2b:7t:a9:48:19:64:f6:28.
Are you sure you want to continue connecting (yes/no)?"
send "Yes\r"
expect "root@10.10.1.12's password:"
send "iamthegreatone\r"
expect "#"
send "cd /home\r"
expect "#"
send "rm -Rf $argv\r"
expect "#"
send "cp -a default/ $argv\r"
expect "#"
send "chown -R $argv:513 $argv\r"
expect "#"
send "exit\r"
expect eof

This script is executed by running the following:

root@john-server:~# expect thefilename.exp john

This is a script I use at work to reset my users profiles when they mess them up. As you can see then when you run the file you must pass an argument. So in this case you ssh into the server that has the user directories pass the name of the directory. So this script will remove the current users directory and cp the default profile directory to theirs. It will then set the right permissions for the user. Note: The group 513 may be different from server to server.

Now you do not need to use ssh or anything like that. So if you want to have the script live in the same box you can remove the SSH information. Hope this helps and give it a try it is a nice tool.

Comments Fixed

October 29th, 2009 -- No Comments

I am sorry that my theme was not allowing people to post comments. I have fixed that now and if you hit the comments link in the upper right of a post you can now add some. Sorry if this caused any issues.

Categories: General

CPOSC Event

October 18th, 2009 -- No Comments

Yesterday October 18, 2009 I went to and Open source conference in Harrisburg PA called CPOSC(Central Pennsylvania Open Source Conference). Basically this conference discusses applications that are open source and can help you or your company. Another thing this conference gives you is the ability to meet other people that you can network with. There were a lot of different seminars that you could attend to. Each seminar you had 3 choices that you could only choose one.

Nagios

Well you have seen me do a tutorial on this app but it was a good thing for me. I learned about how you can manage your critical and warning levels. That was hugh. I learned about how you can connect multiple servers.

Drupal

This seminar talked about how you can use Drupal on your site. Drupal is a CMS tool and they have definitely come a long way.

IRC

IRC chat is something that a lot of people go for help. I learned about how you can setup your own channel for your friends and or customers to get instant help. I learned that Freenode which is a popular server has about 51,000 users. In the next few days I will be setting up #jcwebconcepts for my readers to come ask questions.

Python

The next seminar I watch was about the programming language called Python. Now I did not get a tutorial on how to make an application but I was shown some ways that Python makes some difficult code easier. Might have to look into learning some python but I am not sure.

VirtualBox

I got to learn on how to use the nice tool to setup virtual machines. I learned on some ways to setup development servers to test things rather than using real hardware. I definitely will be setting it up on my Linux machines since on my Mac’s I use Parallels.

In between seminars in the lobby there were sponsors from places like Ubuntu, Fedora,  and Zenoss. What was cool is you got to talk to these people and make contacts with their companies. There were more classes but I ended up leaving early. Now this conference was not free but it was well worth the information I received. To get more information you can visit CPOSC site for more information.

Categories: General, Linux / BSD, Mac OS

FreeMind

September 10th, 2009 -- No Comments

Today an employee at my job requested that I install an application called FreeMind. FreeMind is an application that you can take your ideas and organize them. I use it for time and project management.

John Costanzo Map

What is cool is you can export your map to an image, PDF or HTML. This tool can be used for other things but this is my first day using this. So I will keep using this and see if I can find some cons.

Snow Leopard

August 28th, 2009 -- No Comments

Well I got Snow Leopard. I was excited at first cause I was thinking of the great features. After installing it I realized that I did not really get much. Now I am sure my thoughts are going to change real fast. I do like that Quicktime X has a screen recorder. That saves me from having to buy one. In a few days I want to write up a detailed pro and cons of Leopard. I need to use it for a few days so I can give a better review.

Oh I found a good website that shows the applications that run good, somewhat good, and not at all with Snow Leopard. http://snowleopard.wikidot.com/

Categories: General, Mac OS